Re: Creating a new database via a store procedure
From: Steve Thompson (SteveThompson_at_nomail.please)
Date: 07/25/03
- Next message: Steve Thompson: "Re: How can I find out where a login attempt originated?"
- Previous message: Neil W.: "Starting Service with SQL Authentication"
- In reply to: PRAYMOND: "Creating a new database via a store procedure"
- Next in thread: Dan Guzman: "Re: Creating a new database via a store procedure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 25 Jul 2003 14:39:25 -0400
"PRAYMOND" <PRAYMOND@MORNEAUSOBECO.COM> wrote in message
news:09c001c352ba$9e46ca60$a601280a@phx.gbl...
> I would like to have a store procedure that will create a
> database after verifying some condition. This stored
> procedure must be callable by an user. I tought that
> since the creator of the stored proc had the Create Table
> wright that any user having the wright to execute this
> stored procedure would execute in the context of the
> creator and then would be able to create the table. This
> does not seem to work. Am I missing something here. I
> want to do this because I want to implement some security
> policy via an external tool that would permit copy or
> creation of specific database to some user. Not an
> overall copy or creation of all databases.
I do not believe that a CREATE DATABASE statement is allowed in a stored
procedure. I hunted through BOL looking for a reference for you, but could
not find one.
Regarding create database permissions, from BOL:
"CREATE DATABASE permission defaults to members of the sysadmin and
dbcreator fixed server roles. Members of the sysadmin and securityadmin
fixed server roles can grant CREATE DATABASE permissions to other logins.
Members of the sysadmin and dbcreator fixed server role can add other logins
to the dbcreator role. The CREATE DATABASE permission must be explicitly
granted; it is not granted by the GRANT ALL statement.
CREATE DATABASE permission is usually limited to a few logins to maintain
control over disk usage on an instance of SQL Server."
Steve
- Next message: Steve Thompson: "Re: How can I find out where a login attempt originated?"
- Previous message: Neil W.: "Starting Service with SQL Authentication"
- In reply to: PRAYMOND: "Creating a new database via a store procedure"
- Next in thread: Dan Guzman: "Re: Creating a new database via a store procedure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|