Showing posts with label offline. Show all posts
Showing posts with label offline. Show all posts

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 da
tabase. I am using osql with the -E command. Do I need to use something else?
Justin,
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

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 :)

bring online - any restrictions?

Hiya,
Are there any conditions under which a database administrator is not able to
bring a database back online when it is (Suspect\offline)? The System Admin
istrator had no problem bringing it back online but the usual dba got a perm
issions error.
Thanks!I have had that occur a few times for no apparent reason. I think it is rela
ted to the reason that it went offline in the first place.|||Just verify that this dba has the necessary perimissions to this database.
If this dba is the dbo of the database or is a member of the sysadmin role
there should be no problem.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Bring db online/offline

Hello there,

I have a user who can bring offline a database but he cannot bring the
database back online.

The error which pops up is:

Error5011: User does not have permission to alter database dbname
ALTER DATABASE statement failed.
sp_dboption command failed.

Any ideas?

ThanksI would guess that only sysadmins can bring a database online, because
if the database is not readable, there's no way to know who has
db_owner permissions. This behaviour is documented for RESTORE - a
db_owner can backup a database but not restore it - and it seems likely
that the same logic applies in the case of ALTER DATABASE, even if it
isn't documented.

Depending on what you're trying to achieve, setting the database to
RESTRICTED_USER might be a possibility.

Simon

Bring Database Online/Offline

In SQL Server 2005, I tried to take a database offline by selecting "take offline." My computer had a problem during this now I get the following error...

ALTER DATABASE failed because a lock could not be placed on database 'CJISData'. Try again later.
ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 5061)

I can't bring the database online or take it offline. I am not sure where to go from here. Any help will be appreciated. Thanks.

Bernie

Make sure you drop all connections on the database first or use the WITH ROLLBACK IMMEDIATE.

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de

Bring database online

I have seen a db_option that would take the database offline , but how do
you bring it online again ?
Is offline similar to detaching the database ? Using SQL 2000
ThanksALTER DATABASE pubs SET OFFLINE
go
ALTER DATABASE pubs SET ONLINE
go
SQLVarad(MCDBA-1999,MCSE-1999)
>--Original Message--
>I have seen a db_option that would take the database
offline , but how do
>you bring it online again ?
>Is offline similar to detaching the database ? Using SQL
2000
>Thanks
>
>.
>|||SP_dboption is provided only for backward compatibility and this system
procedure may not be there in next version.
So as "Vyas" suggested you can use ALTER database command to set the
set/reset database options.
FYI, the command used to set the database online using db_option:-
sp_dboption <dbname>,'offline',false
Thanks
Hari
MCDBA
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:edPvvTWpDHA.372@.TK2MSFTNGP11.phx.gbl...
> I have seen a db_option that would take the database offline , but how do
> you bring it online again ?
> Is offline similar to detaching the database ? Using SQL 2000
> Thanks
>