Re: Adding Logins

From: Narayana Vyas Kondreddi (answer_me@hotmail.com)
Date: 12/27/02


From: "Narayana Vyas Kondreddi" <answer_me@hotmail.com>
Date: Fri, 27 Dec 2002 20:08:37 -0000


You can find a way of generating scripts at this link:
http://vyaskn.tripod.com/generate_scripts_repetitive_sql_tasks.htm

If you just want to loop through rows, you can find some examples of WHILE
loops here:

http://vyaskn.tripod.com/code/notify_users.txt

You should be able to directly convert the above example.

--
HTH,
Vyas, MVP (SQL Server)
SQL Server FAQ, articles, code samples, interview questions and more @
http://vyaskn.tripod.com/
"Brian" <bpstings6@attbi.com> wrote in message
news:008a01c2addd$fa85de10$d6f82ecf@TK2MSFTNGXA13...
I need to add 300 new sql id to my server. I have the list
in sql table, - 2 columns, id and pw. Versus adding eaach
one individually, I wanted to create a script to read the
table row by row and create the logins and be done. I
tried using a cursor to go row by row, but had trouble.
Any thoughts or site I might visit to get more info or
find an already exisitng script?
Thnks, Brian


Relevant Pages

  • 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: Report in FM 6 or 7
    ... achieve this report format will have to be done via scripting. ... but they will simplify the script and Sort Order. ... End Loop ... The normal 'Dancer' field is used so that if there are more than one ...
    (comp.databases.filemaker)
  • Re: recreate database script not work
    ... I got a script which is supposed to regenerate database systax. ... REM gen_dbse_9.sql ... end loop; ...
    (comp.databases.oracle.server)
  • Re: Loop Problem (At Least I think)
    ... If there are no images matching the product ... "" Then" statement (the one below the loop, outside of it), is this just ... >> script to finish. ... > 2) Read the database table and acess the dictionary object for the ...
    (microsoft.public.scripting.vbscript)
  • Re: How to set up a global variable in a sub-routine?
    ... the 'global variables' are more like constants ... ... single script, I need a way to tell it only once where the file is and ... So, if you construct a loop with a loop variable, you ... >programmers avoid global variables completely. ...
    (perl.beginners)