Well sometimes sp_reanmedb may not work you know because if
some one is using the db it will not accept this command so
what do you think you can do in such cases?
Answers were Sorted based on User's Feedback
Answer / kumar
In This case you take following action
1. Alter DataBase <dbname> set single_user with rollback
immediate
2. Sp_renamedb 'olddb','newdb'
3. Alter DataBase <dbname> set multi_user
By
Kumar.T
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / guest
In such cases we can first bring to db to single user using
sp_dboptions and then we can rename that db and then we can
rerun the sp_dboptions command to remove the single user mode.
| Is This Answer Correct ? | 2 Yes | 0 No |
What happens if the update subquery returns no rows in ms sql server?
What is resultset concur_updatable?
I have a table emp , Fields with empname,dnname,dno,salary. now I want copy distinct salary with all emp detail from emp into new table which is not already exist in database. how would I do this ?
How to encrypt data between dialogs?
What are the different types of lock modes in sql server 2000?
Difference between LEN() and DATALENGTH() in sql server ?
how many bits ip address consist of? : Sql server database administration
What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?
how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?
what is replication? where do u use Go Keyword?
What is dbcc command in sql server?
What are the different authentication modes in sql server?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)