SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 DB impementation scripts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqlfresher2k7
Aged Yak Warrior

606 Posts

Posted - 08/02/2007 :  10:11:26  Show Profile  Reply with Quote
I need to create a Database(DDL),DML implementation scripts..

Is below scripts is the correct way of creating database for the implemenation.Since i am not including the creation of primary ,transaction file since i dont know the path of user servers..

IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'TESTDB')
DROP DATABASE [TESTDB]
GO
CREATE DATABASE [TESTDB]




rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 08/02/2007 :  23:32:46  Show Profile  Reply with Quote
It'll create db in default location on the server.
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

606 Posts

Posted - 08/03/2007 :  09:51:07  Show Profile  Reply with Quote
Thanks rmiao !!
What are the issues if it creates the database in default location.
Please help me in writing the scripts to create the database on the user specified path.
Thanks for your help in advance
Go to Top of Page

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 08/03/2007 :  11:29:31  Show Profile  Reply with Quote
Can you take user specified path as parameter and use it in the statement?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000