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
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
Yes you need to. As it is an application, it has to pass the credentials.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Guys