Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Jons
Starting Member
1 Post |
Posted - 2009-07-09 : 08:36:40
|
I am new to SQL. Is it possile to script the process of setting multiple DBs to read write then back to read only? All of the DBs are named pgsnapshotyyyymmdd. The yyyymmdd are only business days. |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-07-09 : 10:39:53
|
set your output to text, execute this, copy the resultsselect 'ALTER DATABASE [' + name + '] SET READ_WRITE;' + char(10) + 'GO' from sys.databases where name like 'pgsnapshot________' |
|
|
|
|
|