Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-05-06 : 09:13:58
|
| Goran writes "I would like to use osql from a bat file. But I don'twant to hardcode userid and password. When I run thebatfile I want to be prompted for userid and password. How do I do this ??? (must work on NT/2000)" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-05-06 : 09:33:32
|
| The only way that this could work is to write some code to prompt for a user name and password, then pass them into the batch file. If you don't specify a user and password to osql, it will use Windows Authentication. |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-05-06 : 09:33:39
|
| I don't know about the prompting, but you can just use some parameters on the batch file. %1 %2 etc.Or you can use NT Authentication on it, the -U option will do this.Damian |
 |
|
|
|
|
|