Monday, March 26, 2012

Read only database to read-write

I have MSSQL 2000 database wich I made read only for some reason. Now I want
to make it writeable again.
I right click on the database in EM, go to options, remove the checkmark
near the 'read only', and when I click OK i get an error message wich says
that I can't take the database offline because database is in use.
How can a ReadOnly database be in use in such manner that I can't change
that? And, whas is ment by 'taking the database offline'?
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hrI suggest you use the ALTER DATABASE command to change database options. One
of the possibilities it has is to throw out current users, for instance.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Mario Splivalo" <majk@.fly.srk.fer.hr> wrote in message
news:slrnc5vrd4.j1r.majk@.fly.srk.fer.hr...
> I have MSSQL 2000 database wich I made read only for some reason. Now I
want
> to make it writeable again.
> I right click on the database in EM, go to options, remove the checkmark
> near the 'read only', and when I click OK i get an error message wich says
> that I can't take the database offline because database is in use.
> How can a ReadOnly database be in use in such manner that I can't change
> that? And, whas is ment by 'taking the database offline'?
> Mike
> --
> "I can do it quick. I can do it cheap. I can do it well. Pick any two."
> Mario Splivalo
> msplival@.jagor.srce.hr|||Hi,
Yes, I agree with tiber on this, Issue the below command from Query analyzer
to make database READ_WRITE.
Alter database pubs1 set read_write with rollback immediate
(Replace pubs1 with actual database name.)
Note:
Rollback immediate option is equalent to Kill statement, it just closes all
the connected sessions. Otherwise even a read only session connected to the
database will create a block and will not allow you to change the database
options even if the database is read only.
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uANAkFLEEHA.3716@.TK2MSFTNGP10.phx.gbl...
> I suggest you use the ALTER DATABASE command to change database options.
One
> of the possibilities it has is to throw out current users, for instance.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Mario Splivalo" <majk@.fly.srk.fer.hr> wrote in message
> news:slrnc5vrd4.j1r.majk@.fly.srk.fer.hr...
> want
says
>

No comments:

Post a Comment