SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Copy Permissions for a database

By Ryan Randall,

Copies the permissions from an existing database user to a new database user.

Usage:
exec copy_permissions_for_database 'From_User', 'To_User'

* From_User must exist in the database.
* To_User must not exist in the database.
* To_User must exist as a login on the server.

I used http://www.sqlservercentral.com/columnists/awarren/sqlpermissionspublicrole_2.asp as a starting point.

Total article views: 1624 | Views in the last 30 days: 4
 
Related Articles
FORUM

open existing database

can't open existing database

BLOG

Restoring a database that doesn't exist

When restoring a database that doesn't exist, say for instance when a client sends a database to you...

SCRIPT

SQL Procedure for adding Database in existing Always-On HADR.

SQL Procedure for adding Database in existing Always-On HADR.

FORUM

Import .dbf tables into existing SQL 2005 database

Import .dbf tables into existing SQL 2005 database

FORUM

Convert a existing SQL Server 2000 database to 2005

Convert a existing SQL Server 2000 database to 2005

Tags
 
Contribute