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

Attach database using sp_attach_single_file_db Expand / Collapse
Posted Wednesday, February 20, 2013 2:17 PM



Group: General Forum Members
Last Login: Tuesday, March 24, 2015 1:58 PM
Points: 1,971, Visits: 1,351
Lets say I have an .mdf but no corresponding .ldf for a correctly detached database. Now I want to reattach it, but set the log file size and auto-growth rate at the onset.

While using the stored procedure sp_attach_single_file_db, I would like to specify the Initial Size as well as the AuAuto-growtho that I don't have to run a second script to Alter Database Modify File ...

Is there a way to combine the two into one? Or, should I be using the stored procedure sp_attach_db and in the @filename2 parameter add the SIZE = xxxx, FILEGROWTH = xxxx to the end somehow?

Any suggestions are always appreciated.

Chris Powell

George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.
Post #1422302
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse