0% found this document useful (0 votes)
73 views3 pages

How To Fix An SQL Server Database Skfuser in SUSPECT Mode

The document describes an error message "Unable to connect to database PC_Name" that users may encounter when logging into an SKF software. One common cause is the skfuser database being in SUSPECT mode. To resolve it, the database status must be changed, checked for errors and repaired with data loss allowed, then set back to multi-user mode. Proper database backups are also recommended to minimize future data loss.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
73 views3 pages

How To Fix An SQL Server Database Skfuser in SUSPECT Mode

The document describes an error message "Unable to connect to database PC_Name" that users may encounter when logging into an SKF software. One common cause is the skfuser database being in SUSPECT mode. To resolve it, the database status must be changed, checked for errors and repaired with data loss allowed, then set back to multi-user mode. Proper database backups are also recommended to minimize future data loss.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 3

`

Knowledge Base Article


Product Group: Software
Product: CMSW7400 - @ptitude Analyst
Version: 4.0 and higher

Abstract
Occasionally when a user logs in to SKF @ptitude Analyst, the error message
"Unable to connect to database PC_Name" is displayed. There are several
reasons why this error message would be encountered. This article documents
a fix to one of the causes of this error.

Overview
One common cause of the error mentioned above is if the skfuser database is in
(SUSPECT) mode.

Verify whether the skfuser database is in (SUSPECT) mode by following the


steps below:

 Log in to SQL Server Management Studio as SA user.

 Expand the Databases hierarchy and find the skfuser database.

 If the word (SUSPECT) and a yellow triangle with an exclamation mark


are displayed next to skfuser, the ideal action would be to restore a
current backup of the database. If there is no current backup
available, the procedure below should be followed.

When a database is in (SUSPECT) mode, the database server will not allow any
operations to be performed until the database is repaired.

A database may go into (SUSPECT) mode for such reasons as improper


shutdown of the database server, corruption of the database files, etc. The
exact cause of a database going into (SUSPECT) mode can be found using the
following query:

DBCC CHECKDB ('skfuser') WITH NO_INFOMSGS,


ALL_ERRORMSGS

The output resulting from the query will provide any errors in the database.

SKF Reliability Systems 2950 Rev A


5271 Viewridge Court * San Diego, California, 92123 USA Page 1 of 3
Telephone 1-800-523-7514 Web: www.skf.com
`

To fix the issue, follow the procedure below:

1. Stop all SQL services. Create a copy of the skfuser.mdf and skfuser.ldf
database files (from the Microsoft SQL Server “DATA” folder) and paste
into the Microsoft SQL Server “Backup” folder. Then, restart the SQL
services again.

2. Log in to SQL Server Management Studio as SA user.

3. The database must be cleared of (SUSPECT) mode. Open a New Query


window and execute the following statement:

EXEC sp_resetstatus skfuser

This statement will clear the suspect flag and make the database
accessible and online.

3. The next command changes the database status to ‘Emergency’.


Emergency mode allows access to the database but with no consistency
guarantee. This option allows us to export the table data to minimize
the data loss.

ALTER DATABASE skfuser SET EMERGENCY

4. Check the database by running the following statement:

DBCC checkdb(skfuser)

5. The database must now be restricted and changed to single-user mode.


To do this, execute the following statement:

ALTER DATABASE skfuser SET SINGLE_USER WITH


ROLLBACK IMMEDIATE

6. Because the database was in suspect mode, there is an expectation that


some data may have been lost. Unfortunately, the following statement
will need to be executed in order to get the database back into working
condition:

DBCC CHECKDB ('skfuser',


REPAIR_ALLOW_DATA_LOSS)

SKF Reliability Systems 2950 Rev A


5271 Viewridge Court * San Diego, California, 92123 USA Page 2 of 3
Telephone 1-800-523-7514 Web: www.skf.com
`

7. Now, set the database back to multi-user mode by executing the


following statement:

ALTER DATABASE skfuser SET MULTI_USER

8. Run the Rebuild_loginname_username_links.sql script usually found


in C:\Program Files\SKF-RS\SKF @ptitude Analyst\DBAssist\SQL Server
(on a Windows XP machine).

9. Log in to SKF @ptitude Analyst as normal.

Remember! To minimize data loss, is important to have a database backup


process in place. Discuss this with IT or a SKF Technical Support
Representative.

----

For further assistance, please contact the Technical Support Group by phone at
1-800-523-7514 option 8, or by e-mail at TSG-CMC@skf.com.

SKF Reliability Systems 2950 Rev A


5271 Viewridge Court * San Diego, California, 92123 USA Page 3 of 3
Telephone 1-800-523-7514 Web: www.skf.com

You might also like