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

How to Schedule a SQL Server Database Creation Script Expand / Collapse
Author
Message
Posted Thursday, May 29, 2008 4:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 29, 2008 4:06 AM
Points: 1, Visits: 0
Hi guys,

i need to create a database..
i don't how to script it create the database dynamically..
if anyone could help it will be greatly appreciated..
by the way i am using sql server 2005...

i have already tried the following script..
it doesn't work though....

USE master
GO
CREATE DATABASE Student
ON
( NAME = Student_dat,
FILENAME = 'c:\program files\microsoft sql server\mssql\data\Studentdat.mdf',
SIZE = 20MB,
MAXSIZE = 70MB,
FILEGROWTH = 5MB )
LOG ON
( NAME = 'Student_log',
FILENAME = 'c:\program files\microsoft sql server\mssql\data\Student.ldf',
SIZE = 10MB,
MAXSIZE = 40MB,
FILEGROWTH = 5MB )
GO


cheers.....
Post #508274
Posted Friday, July 24, 2009 1:05 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, July 14, 2014 1:03 PM
Points: 178, Visits: 614
I'm sorry to resurrect this guy from the dead, but I'm curious as to what the conventional wisdom is for the SCPTXFR tool for sql 2008?
I know I can right click in SSMS and generate scripts for the entire database. What if I want to regularly create and back up those scripts?
Post #759443
Posted Thursday, March 25, 2010 6:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, June 15, 2010 2:18 AM
Points: 15, Visits: 21
SQL Server Management Objects (SMO) are objects designed for programmatic management of Microsoft SQL Server.

We can integrate SMO into any .NET based applications.
SMO is also compatible with SQL Server version 7.0, SQL Server 2000, and SQL Server 2005, which makes it easy to manage a multi-version environment.

Following code is used to run the Microsoft SQL Server Query files(script files) kept in
applications bin\Debug folder, with SMO.


Cheers,
Bijayani
Proud to be a part of Team Mindfire.

Mindfire: India's Only Company to be both Apple Premier & Microsoft Gold certified.
Post #889759
Posted Monday, July 12, 2010 5:46 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 12, 2010 5:44 AM
Points: 2, Visits: 0
Hello,

Hey....It's really interesting article & I found something new procedure for working.


Thanks


Regards
Lew

Database Creations
Post #950681
Posted Monday, July 12, 2010 5:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 12, 2010 5:44 AM
Points: 2, Visits: 0
Hello,

Hey....It's really interesting article & I found something new procedure for working.


Thanks


Regards
Lew

Database Creations
Post #950685
Posted Wednesday, August 29, 2012 12:39 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 29, 2012 12:36 PM
Points: 1, Visits: 2
Great article. Does this same option exist in SQL 2008 R2? It is not located in the same area as mentioned in the article and I would like to do something like this in SQL 2008? Or is there a better way in 2008 for automatically generating database creation scripts rather than EM?

Thanks,
John
Post #1351837
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse