Friday, March 30, 2012

role in sql2000

Hi,
I have a role created in one db. I need to copy that role to another db same
strucxture in the same server.
How do I do that. Role without allthe permissions
ThanksOn 6 Jul, 19:39, "mecn" <mecn2...@.yahoo.com> wrote:
> Hi,
> I have a role created in one db. I need to copy that role to another db same
> strucxture in the same server.
> How do I do that. Role without allthe permissions
> Thanks
A role without permissions is nothing more than a role name. So just
do:
sp_addrole 'role_name';
If you require the members as well then script it using Enterprise
Manager: All Tasks > Generate Script, on the Options tab select
"Script database users and database roles".
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Thanks,
I need to copy the role with all object permissions assign ed the the role
in one db to another db with the same structrue.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1183747694.859143.26150@.n2g2000hse.googlegroups.com...
> On 6 Jul, 19:39, "mecn" <mecn2...@.yahoo.com> wrote:
>> Hi,
>> I have a role created in one db. I need to copy that role to another db
>> same
>> strucxture in the same server.
>> How do I do that. Role without allthe permissions
>> Thanks
> A role without permissions is nothing more than a role name. So just
> do:
> sp_addrole 'role_name';
> If you require the members as well then script it using Enterprise
> Manager: All Tasks > Generate Script, on the Options tab select
> "Script database users and database roles".
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>

No comments:

Post a Comment