p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning Microsoft SQL Server 2012 Programming (http://p2p.wrox.com/forumdisplay.php?f=681)
-   -   SQLCMD, pg 405/406 (http://p2p.wrox.com/showthread.php?t=89931)

sidejack April 26th, 2013 12:58 PM

SQLCMD, pg 405/406
Ok gang, looking at page 405/406 of the book (i.e. SQLCMD)
Tried the code on page 406 (since I'm using Windows authentication, blank password) and I get:

"Sqlcmd: Error: Microsoft SQL Server Native Client 11.0: Named Pipes Provider: Could not open a connection to SQL Server [2].."

along with Login timeout expired & A network-related or i....

Tried it will my user name and/or password anyway, same results


sidejack April 29th, 2013 04:36 PM

I can't take all the credit; I have a student smarter than I.

To run SQLCMD in the command line, one first needs to connect to the server, which in the example below is ORACLE-PC\SQLEXPRESS (case sensitive)


At the 1> prompt, connect to the database (example uses Master) followed by GO

1>USE Master
Changed database to 'Master'.

Now one is ready to enter SELECT statements (use GO to execute)

All times are GMT -4. The time now is 07:07 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.