Groups | Blog | Home
all groups > sql server (alternate) > april 2004 >

sql server (alternate) : Premission to create database!


ilamparithi NO[at]SPAM msn.com
4/14/2004 6:42:12 AM
Hi all,

How to determine whether a user has the right to create a databse in
MS SQL Server programatically.

With Regards,
Simon Hayes
4/14/2004 4:22:02 PM

[quoted text, click to view]

See the PERMISSIONS() function in Books Online:

IF SELECT PERMISSIONS() & 1 = 1
PRINT 'Can create a database'

Note that you must be in the master database for this to work.

Simon

ilamparithi NO[at]SPAM msn.com
4/14/2004 9:53:52 PM
[quoted text, click to view]

Thanks Simon.

This is what i was looking for.

With Thanks,
AddThis Social Bookmark Button