|
|
|
Forum 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.....
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 12:51 PM
Points: 167,
Visits: 492
|
|
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?
|
|
|
|
|
Grasshopper
      
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.
|
|
|
|
|
Forum 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
|
|
|
|
|
Forum 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
|
|
|
|
|
Forum 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
|
|
|
|