Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2000 - SQLSTATE = 08S01 Connection failur DB error code = 999

Status
Not open for further replies.

hvisionexpo

Programmer
Apr 19, 2005
43
US
I have a client-server app using SQL 2K.

1. With one of the databases it keeps giving this error when I perform a select. SQL 2000 - SQLSTATE = 08S01 Connection failur DB error code = 999
2.
If I open a table in SQL Enterprise it gives an error:
[Microsoft][ODBC SQL Server Driver][SQL Server] Location: recbase.cpp:1375
Expression: m_offBeginVar < m_SizeRec
SPID: 53
Process ID: 284
[Microsoft][ODBC SQL Server Driver][SQL Server]



Any suggestions to fix this are welcome.
 
DBCC CHECKDB ( 'mydb' , NOINDEX ) gave these 2 errors:


able error: Object ID 548197003, index ID 0, page (1:7997), row 1. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 8224 and 1106.


CHECKDB found 0 allocation errors and 2 consistency errors in table 'hcfa' (object ID 548197003).
 
Run a DBCC CHECKDB on the database. Looks like you have database corruption.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
The output from the CheckDB should tell you the recovery level that you need to use to fix the problem.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
CHECKDB found 0 allocation errors and 2 consistency errors in database 'mydb'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (mydb).
DBCC execution completed. If DBCC printed error messages, contact your system administrator.


What command can I use to make th DB in single user mode to run repair_allow_data_loss?

THANKS
 
Ok I was able to set it to single-user mode by going to properties. But now I cannot run the SQL since it rejects th connection.

In order for me to use repair_allow_data_loss option it wants the DB in single user mode and if I switch to single user mode I cannot get the SQL SUery analyzer.

HELP PLEASE.
 
SINGLE_USER mode means just that. One connection. If you use Enterprise Manager and open Query Analyzer (even if you open it from EM) that is two connections. Also, there are jobs that might be making connections.

1. Find all jobs that run on the database. Disable them.
2. Find all connections to the database (sp_who2). Kill them (KILL <spid> ex. KILL 23). Do not KILL processes owned by SA.
3. Close Enterprise Manager.
4. Run:
Code:
ALTER DATABASE dbname
SET SINGLE_USER
5. Run your code.
6. When all done, run
Code:
ALTER DATABASE dbname
SET MULTI_USER
7. Enable all jobs that were disabled in step 1.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top