all groups > sql server (alternate) > march 2007 >
You're in the

sql server (alternate)

group:

I have a database on a network drive that I use for archiving purposes, but when the server is rebooted the database becomes suspect.



I have a database on a network drive that I use for archiving purposes, but when the server is rebooted the database becomes suspect. war_wheelan NO[at]SPAM yahoo.com
3/30/2007 7:08:51 AM
sql server (alternate): I created the db with the attached script and I am able to access it
until I reboot the server. I've tried enabling flag 1807 via the SQL
server service and the startup parameters of the instance. In all
cases the database always come up suspect after a reboot. There was
one instance where I was able to recover, but I am not sure how that
happened.

Does anyone have an idea of how I can reboot the server without the
database becomming suspect?

USE MASTER
GO
DBCC TRACEON(1807)
GO
--DBCC TRACEOFF(1807)
--DBCC TRACESTATUS(1807)
GO
CREATE DATABASE ReadyNAS ON
( NAME = ReadyNAS_Data,
FILENAME = '\\NAS1\NASDisk\SQL Server\ReadyNAS\ReadyNAS_Data.mdf',
SIZE = 100MB,
MAXSIZE = 20GB,
FILEGROWTH = 20MB)
LOG ON ( NAME = ReadyNAS_Log,
FILENAME = '\\NAS1\NASDisk\SQL Server\ReadyNAS\ReadyNAS_Log.ldf',
SIZE = 20MB,
MAXSIZE = 100MB,
FILEGROWTH = 10MB)
Re: I have a database on a network drive that I use for archiving purposes, but when the server is rebooted the database becomes suspect. war_wheelan NO[at]SPAM yahoo.com
3/31/2007 7:16:11 AM
[quoted text, click to view]


I've figure out how to reboot the server and make the networked
database accessible again. After the reboot, I need to manually
restart the SQL Server service.

Does anyone have an idea why I need to restart the service when I is
configured to start automatically? Also is there a way to have this
happen automatically via a script of something?
Re: I have a database on a network drive that I use for archiving purposes, but when the server is rebooted the database becomes suspect. Erland Sommarskog
3/31/2007 9:49:11 PM
(war_wheelan@yahoo.com) writes:
[quoted text, click to view]

I would guess what happens is that the SQL Server service starts up
before the network connection has been established. Since the database
is not found at the point, it's marked suspect.

One thing you could try is to set the database to autoclose. I'm not sure
that it will actually work; maybe SQL Server still tries to access the
database on startup.

I don't know if it's possible to delay SQL Server starting up by making
it depending on the network service that makes network shares available.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
Re: I have a database on a network drive that I use for archiving purposes, but when the server is rebooted the database becomes suspect. Greg D. Moore (Strider)
4/1/2007 12:00:00 AM
[quoted text, click to view]

Yes, my guess is that SQL Server is starting BEFORE the workstation service
(I believe that's the one required) so that UNC shares are not available
until AFTER SQL Server starts.

Restarting SQL Server works because the drives are available at that point.

You can go into the properties of the SQL Server service and play around
with dependencies and that should allow you to fix it.



--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

Re: I have a database on a network drive that I use for archiving purposes, but when the server is rebooted the database becomes suspect. war_wheelan NO[at]SPAM yahoo.com
4/18/2007 6:44:41 AM
On Apr 1, 10:01 am, "Greg D. Moore \(Strider\)"
[quoted text, click to view]


I tried setting the database to auto_close and also tried read_only
which didn't correct the problem. What I mean is I still had to
restart the service when the database was set to read_only, but I was
able to access it. I also found that accessing the tables from the
read_only database was quicker. On the other hand, when I set the
database to auto_close I couldn't access it after a reboot even when
restarting the service. The only was that I was able to access the
database was to remove the auto_close options.
Re: I have a database on a network drive that I use for archiving purposes, but when the server is rebooted the database becomes suspect. Greg D. Moore (Strider)
4/18/2007 2:15:07 PM


[quoted text, click to view]

Ok, not really sure why you took this approach. Did you try my advice?



[quoted text, click to view]

--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

AddThis Social Bookmark Button