[dba-SQLServer] SQL Server 2005 - Copying a database

jwcolby jwcolby at colbyconsulting.com
Thu Sep 10 07:53:34 CDT 2009


Interesting Arthur.

So from the gui I right click on the db of interest, /tasks / copy database.  A wizard opens and I 
do my thing, naming the files, where they should go etc.

Are you saying that SQL Server saves that somewhere as TSQL and I can go look at it?

John W. Colby
www.ColbyConsulting.com


Arthur Fuller wrote:
> I've never had to do this, but I think that this approach would work. The
> whole Management Studio UI (and Enterprise Manager before it) are nothing
> but front ends that hide T-SQL commands. Whenever I want to know what SSMS
> is doing under the covers, I execute the command of interest using the GUI
> and then view the query syntax (include query with results).
> Arthur
> 
> On Thu, Sep 10, 2009 at 8:24 AM, jwcolby <jwcolby at colbyconsulting.com>wrote:
> 
>> I need to programmatically copy a database to a new name (make a copy), and
>> specify where the data
>> file and log file goes.  Can anyone give me help in figuring that out?  I
>> want to write a stored
>> procedure to do this and call that from Access.
>>
>>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 
> 



More information about the dba-SQLServer mailing list