# Solved: SQL Server 6.5, Unable to Connect, Unavailable



## urwethe (Jul 28, 2004)

Hi,

I am getting this error message "A connection could not be established to FEPNT1 - [DB-Library] Unable to connect: SQL Server is Unavailable or does not exist."

I can't connect to any databases, and I was told that the transaction log is full (Error 1105)

I was also told to increase the size of the transaction log or truncate the transaction log. I was also told that I can
increase the size of the transaction log using the ALTER DATABASE statement. I was also told to truncate the transaction log, 
I can set the Truncate Log On Checkpoint database option, or run the DUMP TRANSACTION command with NO_LOG parameter.

Since i can't connect to any database by any method, including Query Analyzer, how can I get to my databases in the first place so I can truncate my log file(s) ? 
Can I hack into SQL Server, namely going to the OS and copying the database file(s) and running a command line executable to truncate the log file(s) 
since I can't get to them via any windows interface? Please help give direction here.

Thanks!


----------



## Rockn (Jul 29, 2001)

Can you start the database from the SQL admin interface?


----------



## MustBNuts (Aug 21, 2003)

If you have full blown SQL, do you have Enterprise Manager Tools? You can open and view your databases, identify the one you're having problems with, right click on it and then click on Shrink. It will bring up a dialog and you can go through and shrink the log.

Hope this helps,

MBN


----------



## Rockn (Jul 29, 2001)

I don't believe that option is available in SQL 6.5

I had similar problems where I had to go in and change the settings to truncate log on checkpoint and manually resize the transaction log. By default I believe it is something like 2MB at install.


----------



## coderitr (Oct 12, 2003)

Use ALTER DATABASE SET RECOVERY SIMPLE to set the database to skip transaction logging altogether. Unless you're using the database in a wide enteprise and need incremental backups, you don't really need the transaction log that much. The database backup will include all the data that was present at the time of the backup. As for the connect problems, are you trying to connect from the machine where SQL Server is installed or another machine on the network?


----------



## urwethe (Jul 28, 2004)

Hi, all:

I have full Enterprise 6.5 tools but:
When I select my local instance, I can go no further. Whether I select tools or query or try to expand to see databases, NOTHING works, I get the same error message referenced above. I am trying to do this on the same server where everything resides. Perhaps I could install SS 6.5 on another box and try to get to it remotely. I have SS 2000 on my pc but I can't register the 6.5 server due to version compatibility issues. 

So should I try to install SS 6.5 elsewhere and connect remotely? Or is there any way behind the scenes I can hack into this thing?? Thanks for your help!!


----------



## urwethe (Jul 28, 2004)

Hello all, 

Still need some direction on how I can hack into my database to get to my data.

Thanks


----------



## Rockn (Jul 29, 2001)

Will the SQL service restart from the SQL Services Manager? You will need to start it before you can do anything in the Enterprise Manager


----------



## urwethe (Jul 28, 2004)

Hi,
I am able to stop and start the SQL Service Manager.


----------



## Rockn (Jul 29, 2001)

And you can open SQL Enterprise Manager and access your databases? If you can have you change the db to Truncate Log on Checkpoint? Once you do this restart your server...REBOOT.


----------



## urwethe (Jul 28, 2004)

Hi,
My boss wants me to do the following:
Install Full SServer 6.5 on another machine. 
For the database that has the data, 
Copy the <database-name>.dat file and log file to the new server
Bring up enterprise manager with the local instance
Attach the database, associating the .dat file I just copied.

I think my boss is all wet and this won't work in version 6.5. What are your thoughts?


----------



## Rockn (Jul 29, 2001)

This will not work! If you install SQL on another computer you will still have to create the database object manually. Copying a .dat file will NOT transfer a database, transaction logs etc. He is just going to make your life harder when it doesn't work his way and corrupts your database. I don't really think he has a clue. BTW...his method won't work in any version of SQL Server.


----------



## urwethe (Jul 28, 2004)

Thanks for the sanity check!!! BTW, NO BACKUPS EXIST. Fortunately we have CSV files that were exported to before the corruption, with data up through Feb 1 of this year. I think I will just bite the bullet and import the CSV into a new application and sell the old server on EBAY !!!


----------



## Rockn (Jul 29, 2001)

You can re-create the database on another computer if it comes to that. Did you do what was posted in post #10? It would be much easier to fix the current db than doing all of the jumping through hoops with CSV files. You don't need much of a server to run 6.5 and if it suits your needs why change?


----------



## urwethe (Jul 28, 2004)

Hi,
I can open Enterprise Manager but I can't open any databases at all . I get the error message "A connection could not be established to FEPNT1 - [DB-Library] Unable to connect: SQL Server is Unavailable or does not exist." . When I try to open in SQL Query I get the same error and I always get the same error. So I can't even get to first base on this one.


----------



## urwethe (Jul 28, 2004)

2006/03/29 11:43:20.76 spid1 Recovering database 'model'
2006/03/29 11:43:20.78 spid1 Recovery dbid 3 ckpt (259,22) oldest tran=(259,0)
2006/03/29 11:43:20.84 spid1 Clearing temp db
2006/03/29 11:43:20.85 kernel initializing virtual device 1, IN_RAM
2006/03/29 11:43:20.96 kernel Read Ahead Manager started.
2006/03/29 11:43:20.96 kernel Using 'SQLEVN60.DLL' version '6.00.000'.
2006/03/29 11:43:21.04 kernel Using 'OPENDS60.DLL' version '6.00.01.02'.
2006/03/29 11:43:21.04 kernel Using 'NTWDBLIB.DLL' version '6.50.409'.
2006/03/29 11:43:21.06 ods Using 'SSNMPN60.DLL' version '6.5.0.0' to listen on '\\.\pipe\sql\query'.
2006/03/29 11:43:21.06 ods Using 'SSMSSO60.DLL' version '6.5.0.0' to listen on '1433'.
2006/03/29 11:43:22.98 spid10 Recovering database 'msdb'
2006/03/29 11:43:22.99 spid11 Recovering database 'pubs'
2006/03/29 11:43:22.99 spid12 Recovering database 'FEDM_dbs'
2006/03/29 11:43:22.99 spid11 Recovery dbid 5 ckpt (779,23) oldest tran=(779,22)
2006/03/29 11:43:22.99 spid10 Recovery dbid 4 ckpt (3591,12) oldest tran=(3591,11)
2006/03/29 11:43:22.99 spid12 Recovery dbid 6 ckpt (2096701,18) oldest tran=(2096701,0)
2006/03/29 11:43:23.03 spid11 1 transactions rolled forward in dbid 5.
2006/03/29 11:43:23.03 spid10 1 transactions rolled forward in dbid 4.
2006/03/29 11:43:23.15 spid1 Recovery complete.
2006/03/29 11:43:23.17 spid1 SQL Server's default sort order is:
2006/03/29 11:43:23.17 spid1 'bin_cp850' (ID = 40)
2006/03/29 11:43:23.17 spid1 on top of default character set:
2006/03/29 11:43:23.17 spid1 'cp850' (ID = 2)
2006/03/29 11:43:23.20 spid1 Launched startup procedure 'sp_sqlregister'
2006/03/29 12:00:00.18 backup TRANSACTION dumped with following info: Database Name:FEDM_dbs, Creation Date and Time:Mar 29, 2006(12:00), Pages dumped:3, 
Previous Sequence:38803 11880051, Current Sequence:38803 12960046 Striped:NO, Number of Dump Devices:1, device infoVOLID=SS0007 NAME=fedm_log TYPE=DISK FILE=7)
2006/03/29 12:00:00.43 spid10 A history record could not be written to msdb.sysbackuphistory or msdb.sysrestorehistory
2006/03/29 12:00:00.45 spid10 Error : 1105, Severity: 17, State: 1
2006/03/29 12:00:00.45 spid10 Can't allocate space for object 'sysbackuphistory' in database 'msdb' because the 'default' segment is full. 
If you ran out of space in Syslogs, dump the transaction log. Otherwise, use ALTER DATABASE or sp_extendsegment to increase the size of the segment.
2006/03/29 12:27:19.26 kernel SQL Server terminating due to 'stop' request from Service Control Manager


----------



## Rockn (Jul 29, 2001)

It's really hard to do this stuff unless you are sitting in front of the server. There is another forum I go to once in a while that may have more expertise than my help is giving you. 
http://www.sqlteam.com/Forums/default.asp
Just join and ask the question. I am sure someone there has a quick answer for you.


----------



## urwethe (Jul 28, 2004)

Thanks!!


----------



## urwethe (Jul 28, 2004)

Was a network problem. 

a) NetLogon services were down  were setup Manual  changes to automatic

b) Default protocol for SQL was Names Pipes  changed to TCP/IP

c) Start and stop services using SQL Server Manager.

Thanks for your help!!


----------

