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
 General SQL Server Forums
 Database Design and Application Architecture
 CREATE DB - Doubt

Author  Topic 

mageshks
Yak Posting Veteran

59 Posts

Posted - 2007-06-21 : 06:17:38
I want to create a database,before that i want to check whether i have the permission to create a DB.(Im not creating this DB from Master)

if db_id('TEST_DB') is null
CREATE DATABASE TEST_DB.

What code i have to add before the above piece of code.So that my query shouldnt make any error like 'Permission denied..'

Thanks in Advance

nr
SQLTeam MVY

12543 Posts

Posted - 2007-06-21 : 07:30:21
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=85372


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -