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



Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not ac..

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

Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not ac..

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

Post New Answer

More SQL Server Interview Questions

How to write character string constants or literals in ms sql server?

0 Answers  


What is the use of =,==,=== operators?

0 Answers  


What is implicit cursors?

0 Answers  


Which is the latest version of sql server and when it is released?

0 Answers  


To which devices can a backup be created and where should these devices be located? : sql server management studio

0 Answers  






How fixed length strings are truncated and padded?

0 Answers  


Give main differences between "Truncate" and "Delete".

0 Answers   HCL,


What are transactions in sql?

0 Answers  


What do you mean by a dependent functionality in a build?

0 Answers   HCL,


Determine when to use stored procedure to complete sql server tasks?

0 Answers  


Do you know the isolation level that sql server support?

0 Answers  


What are the system database in sql server 2005?

0 Answers  


Categories