in reply to Using Admin Passwords in Script
Use the facilities provided by the OS.
Preferably
If neither the -U option nor the -P option is specified, sqlcmd tries to connect by using Microsoft Windows Authentication mode.
Otherwise set up a user or group profile for running the script(s) that has the userid & password environment variables (SQLCMDUSER & SQLCMDPASSWORD) set in the profile. Profiles are encrypted.
That way, the scripts can only be run by those authorised to do so by the login id or group membership.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Admin Passwords in Script
by OzVegan (Acolyte) on May 20, 2011 at 05:20 UTC |