Re: Create Login like another login...



That's a pretty old script you're using and it's written for SQL Server
2000, calling objects in the master database.

You can update the script using some of the security catalog views instead
of tables in master. For example, fn_my_permissions will tell you what
effective permissions the current user has.

As for the error message below, it looks like you probably had a typo
somewhere when creating or running the sproc. Probably a datatype mismatch.


joe.


"Paul" <Paul@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CFECA19B-9C34-4D52-B9FC-1FA95817EE78@xxxxxxxxxxxxxxxx
One bit of functionality I like in Oracle's Enterprise manager, that I
haven't located in SQL Server is the ability to create a new login with
all
the same rights, roles etc of an existing user.

I am using SQL Server 2005. I have tried
USP_GEN_USER_RIGHTS_BASED_ON_EXISTING_LOGIN written by GREG LARSEN, but I
get
an error when executing it.

==================
Msg 213, Level 16, State 7, Line 2
Insert Error: Column name or number of supplied values does not match
table
definition.
==================

Does anyone point me to a way of doing this?

Paul


.



Relevant Pages

  • Re: Scripting in Windows 2000 Advanced Server
    ... "mssqlserver service which is clustered". ... used them in a script to determine if a service is running. ... to attempt to connect to the master database in the default instance of SQL ... ' Cannot start SQL Server - ignore error. ...
    (microsoft.public.windows.server.scripting)
  • Re: Error 15401 using sp_grantlogin (not addressed by current KB articles)
    ... Restarting Windows 2000 resolved the problem for this particular account, ... confused when it sees a duplicate SID. ... > One way to get SQL Server to agree with the renamed NT ... > Preview (to ensure the script was created), ...
    (microsoft.public.sqlserver.security)
  • Re: Scripting a SQL database
    ... Virtually everything SQL Server Enterprise Manager does can be ... To run the generated script in ASP, ... You can also create a DTS (Data Transformation Package) ... that you'll want to select the "copy database objects and data" ...
    (microsoft.public.inetserver.asp.db)
  • Re: SQL Security
    ... except I'm having problems making it work in a script. ... ;Set properties of DB objects and open connection to database ... > from Books Online (within the SQL Server program group): ... > communicate with SQL Server. ...
    (microsoft.public.sqlserver.server)
  • Re: Scripting a SQL database
    ... Virtually everything SQL Server Enterprise Manager does can be ... To run the generated script in ASP, ... You can also create a DTS (Data Transformation Package) ... that you'll want to select the "copy database objects and data" ...
    (microsoft.public.sqlserver.server)