Domanda

Ho scaricato il programma di installazione 53.5 MB di SQL Server 2005 Express da questo URL:

Microsoft SQL Server 2005 express Edition

Poi corsi sqlcmd andando in ordine promp, ma dimostra l'errore

HResult 0x2, livello 16, Stato 1
Named pipe Provider: Impossibile aprire una connessione a SQL Server 2 .
Sqlcmd: Errore: Microsoft SQL Native Client: è verificato un errore mentre stabilisce una connessione al server. Durante la connessione a SQL Server 2005, questo errore può essere causato dal fatto che sotto le impostazioni predefinite di SQL Server non consente le connessioni remote ..

Sqlcmd: Errore: Microsoft SQL Native Client: Timeout accesso scaduto

.

Poi ho scaricato e installato Sql Command Line Utility da questo URL:

Feature Pack per Microsoft SQL Server 2005 - novembre 2005

Poi anche mostra lo stesso errore.

Poi ho installato SQL Native Client, quindi anche non ha funzionato. Ma quando ho installato Management Studio, quindi dal Management Studio stabilita la connessione, ma non da sqlcmd dal prompt dei comandi.

Si prega di aiuto.

È stato utile?

Soluzione

What if you do something like:

sqlcmd -S W\SQLEXPRESS -E -d master -q "select * from sys.tables"

Just typing sqlcmd on its own won't work - how should the utility know what server to connect, what database to use, and what command to run??

You need to tell sqlcmd what you want to do! Get a list of its command options using sqlcmd -?, study them, and use them! Or read the MSDN docs on Using the sqlcmd utility with SQL Server Express - btw: searching MSDN for answers and documentation would be a good idea for all your SQL Server problems......

The SQL Native Client is definitely needed, yes - not sure what you mean by the second package there.

Altri suggerimenti

"Just typing sqlcmd on its own won't work - how should the utility know what server to connect, what database to use, and what command to run??" Funny thing. As I read the Microsoft documentation, just typing sqlcmd while sitting on the server should open a connection to this server. At least it can, depending on settings for security. Typing sqlcmd without any options for login/security may very well fail, but the utility will defintely try.

And SQLCMD without quit is just that, right?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top