Can You Pass the User Password to TSQL through a File

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Can You Pass the User Password to TSQL through a File


Is there any way to pass the user password to the tsql command using a file?


I tried the following:


lx-had12:/home/sql> tsql -SNTS-ENTDBD1 -Ufunnys -P << /sddprod/parms/.prod_ssql

> select count(*) from prod.dbo.GLACNT

> go




I am not sure I am not connected to the SQL Server instance, as I usually see the following when I connect:


lx-had12: home/sql> tsql -SNTS-ENTDBD1 -Usql


locale is "en_US.UTF-8"

locale charset is "UTF-8"

using default charset "UTF-8"




Solomon Funny

Database Services

Federal Home Loan Bank of New York

30 Montgomery Street

Jersey City, NJ 07322

(201) 356-1235

[hidden email]


Confidentiality Notice: The information contained in this e-mail and any attachments (including, but not limited to, any attached e-mails) may be legally privileged and confidential. If you are not an intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately. You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person.
unixODBC-support mailing list
[hidden email]