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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of keyword with encryption.

574


How to enter comments in transact-sql statements?

543


What samples and sample databases are provided by microsoft?

561


Where do you find the default Index fill factor and how to change it?

594


Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

507






Differentiate between sql temp table vs table variable?

509


What is difference between materialized view and view?

476


What is the difference between functions and stored procedures?

610


Can you pass expressions to stored procedure parameters?

496


Which is faster statement or preparedstatement?

525


List the different normalization forms?

531


Explain nested trigger in sql?

584


how will add additional conditions in sql?

572


how many layers of tcp/ip protocol combined of? : Sql server database administration

511


What is sleeping status in sql server?

513