Wednesday, January 23, 2013

MSSQL Connect to a database from a TSQL script

Step 1:

Switch to SQLCMD mode from the query menu in Management Studio:

Step 2:
Add the connection info using:
:Connect server_name[\instance_name] [-l timeout] [-U user_name [-P password]]
Till Next Time

No comments: