[dba-SQLServer] Build a database

jwcolby jwcolby at colbyconsulting.com
Wed Jul 11 11:05:43 CDT 2007


Worked great.  I discovered that it can only create databases on the machine
that is running the server instance used to execute the command, and the
path has to already exist.  After discovering these two things it works
GREAT.  

Thanks!

John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Eric Barro
Sent: Wednesday, July 11, 2007 11:05 AM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer] Build a database

CREATE DATABASE [dbname] ON (NAME = 'dbname_Data', FILENAME = 'C:\Program
Files\Microsoft SQL Server\MSSQL\data\dbname.MDF', SIZE = 21, FILEGROWTH =
10%) LOG ON (NAME = 'dbname_Log', FILENAME = 'C:\Program Files\Microsoft SQL
Server\MSSQL\data\dbname_Log.LDF' , SIZE = 1, FILEGROWTH = 10%) 

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, July 11, 2007 8:01 AM
To: dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] Build a database

Is there SQL code to programmatically build a database container in SQL
Server?  If not, is it possible at all, i.e. stored procedure etc, and if
so, what would the code for that look like?  

John W. Colby
Colby Consulting
www.ColbyConsulting.com 

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com


 

_______________________________________________
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