Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 What is the System Stored procedure for Creating Databse

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-05 : 09:33:26
jagadish writes "Hi All,
What is the name of stored procedure for Creating new database?
Can you give with Example?
Is there any drawback of Creating database usning System Stored Procedure than Manually creation?

Plz..Plz let me know
Its Urgent

Thanks in Advance..

Regards,
Jagadish"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-05 : 09:35:17
Is this you wanted?

Create Database DBName

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-09-05 : 09:35:28
There is no stored procedure to create a database, you'd use the CREATE DATABASE command. You could write a stored procedure to create a database, although it's not really a good idea.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-09-05 : 15:50:04
"although it's not really a good idea"

Ahem! ... we use an SProc to create all databases. It ensure that the database has a consistent suffix ("_LIVE", "_TEST", "_TEMP" or "_RESTORE" [emergency restore for single-table-type extraction purposes which, itself, should NOT be added to the automated backup process])

The SProc ensures that "house rules" for naming DB are followed - all caps {yeah, well that's what house rules say) and that a matching default IIS user login has been created ... and so on.

Kristen
Go to Top of Page
   

- Advertisement -