Link to home
Start Free TrialLog in
Avatar of Charlie_Melega
Charlie_Melega

asked on

Connecting to SQL DB

Hello,


I am writing a script in WQL (WMI for SQL) and I need to first connect to a machine running SQL and then specify the database to use. Of course, I can use the "USE" command to specify database to use but I am having an issue knowing which statement(s) I need to sue to establish the actual connection to the SQL DB instance name. Since the WQL query will be run locally on the machine the same SQL box, I am not sure if I need to specify credentials in the connection attempt but if that option is available, I would be interested in this as well.
Any help is appreciated.

Thank You
Avatar of TempDBA
TempDBA
Flag of India image

Yes you need to. As it is an application, it has to pass the credentials.
ASKER CERTIFIED SOLUTION
Avatar of Daniel_PL
Daniel_PL
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Charlie_Melega
Charlie_Melega

ASKER

Thanks Guys