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 adventureworkslt tables are related?

0 Answers  


What is filtered index?

0 Answers  


wat will be the sql query to extract only last 3 records from table supose table hving thousands for records

19 Answers  


Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

0 Answers  


how to generate XML out of QUERY?

1 Answers   McAfee,






Explain different types of collation sensitivity?

0 Answers  


How to rebuild master databse?

0 Answers  


Explain about Normalization?

0 Answers   Infosys,


What are the various Operating system files that every SQL server 2005 database has and what is the purpose.

0 Answers   Microsoft,


MULTICAST DELEGATES IN C#.NET WITH REAL TIME EXAMPLE

2 Answers   IBM, TCS,


1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?

10 Answers   Perot Systems,


What do you mean by table and field in sql?

0 Answers  


Categories