Thursday, February 16, 2012

Bringing a DB online

Hi all
I have tried to search for answers to this, but couldn't find anything specific. I have taken a database Offline, I can't get it to come back online. I tried the ALTER DATABASE dbname SET ONLINE, but get the error message. User must be in the Master database. I am using osql with the -E command. Do I need to use something elseJustin,
try using
osql -E -d master
ALTER DATABASE dbname SET ONLINE
go
Alternatively you can reset the default database for your windows login, and
then miss out the -d master argument.
HTH,
Paul Ibison|||Hi;
Execute the below command from command prompt
OSQL -E -S server (enter)
1>use master
2>go
1>Alter database dbname set online
2>go
Thanks
Hari
MCDBA
"Justin Cook" <anonymous@.discussions.microsoft.com> wrote in message
news:6BEB437E-CDB1-4F8D-927A-EB1E2D140AC6@.microsoft.com...
> Hi all,
> I have tried to search for answers to this, but couldn't find anything
specific. I have taken a database Offline, I can't get it to come back
online. I tried the ALTER DATABASE dbname SET ONLINE, but get the error
message. User must be in the Master database. I am using osql with the -E
command. Do I need to use something else?
>|||THANK YOU THANK YOU :)

No comments:

Post a Comment