February 28, 2012 at 10:53 am
I am having to move some of the .ndf files from one drive to another. But I am not able to detach them. The error thats being popped up is as follows.
Detach database failed for Server 'FTWP1IRHOTV02\SPOT_OP2'. (Microsoft.SqlServer.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot drop the database 'Orderplacement' because it is being used for replication. (Microsoft SQL Server, Error: 3724)
May I know whats causing it?
February 28, 2012 at 10:57 am
No offense but you try googling for this? I am guessing this database was replicated at one point?
http://blog.sqlauthority.com/2009/09/05/sql-server-fix-error-cannot-drop-the-database-because-it-is-being-used-for-replication-microsoft-sql-server-error-3724/[/url]
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
February 28, 2012 at 11:01 am
If you're just moving files to another drive you don't need to detach. Use ALTER DABASE to set the new location, then take the DB offline, move the files and then bring it back online.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 28, 2012 at 12:53 pm
Havent Tried it yet. Will try it after business Hrs. Will update once done. Thank u Very much any way
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply