Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Quickly Moving Databases Expand / Collapse
Author
Message
Posted Friday, February 08, 2008 6:49 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 7:22 AM
Points: 1,052, Visits: 862
BOL 2000
"sp_attach_db should only be executed on databases that were previously detached from the database server using an explicit sp_detach_db operation. If more than 16 files must be specified, use CREATE DATABASE with the FOR ATTACH clause."



Post #453200
Posted Friday, February 08, 2008 7:25 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:56 PM
Points: 32,771, Visits: 14,935
Is that more than 16 data files? Or is it with log files?

sp_attach_db has hardcoded 16 file limit because of the parameters. Look at the code. If you're doing more than that, someone must have modified your procedure.








Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #453237
Posted Tuesday, January 12, 2010 11:57 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, February 27, 2011 10:31 PM
Points: 23, Visits: 92
Is there any risk in using sp_detach in production database? I would like to move some of my data file in different array partition to have more disk space. I'm just worried about the uncommitted transaction in my production database.

If i have a downtime schedule let say tomorrow at 8:00 am then i detach my database at 8:30 am. What will happen to the transactions? Is the sp_detach will not delete the uncomitted transcation then this will comit after sp_attach? i know the transaction is in logs, I just want to make sure that i will not do anything wrong in my data.

Thanks for the expert advice.
Post #846709
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse