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 |
How adventureworkslt tables are related?
What is filtered index?
wat will be the sql query to extract only last 3 records from table supose table hving thousands for records
Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?
how to generate XML out of QUERY?
Explain different types of collation sensitivity?
How to rebuild master databse?
Explain about Normalization?
What are the various Operating system files that every SQL server 2005 database has and what is the purpose.
MULTICAST DELEGATES IN C#.NET WITH REAL TIME EXAMPLE
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 ?
What do you mean by table and field in sql?