Solved

ping sql servername

Posted on 2007-03-17
13
3,896 Views
Last Modified: 2010-03-28
i have sql 2005 installed on Laptop its only a development copy
I have my servername as computername\sqlinstance

when i ping computername\sqlinstance nothing returned

I look in cliconfg.exe and do not see alias .......

Is there something i need to set so i can ping my sql server on my laptop
Name pipes set
0
Comment
Question by:TRACEYMARY
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
13 Comments
 
LVL 16

Expert Comment

by:rboyd56
ID: 18741107
You cannot ping the instance name. You can only ping the computer name (or ip address).

Ping does not understand the concept of an instance.

Why do you want to ping the sql server?
0
 
LVL 11

Expert Comment

by:andrewbleakley
ID: 18741474
try a vb script that will open a connection to the server instance something like
-----
Dim Connection
Dim ConnString
Dim SQL
On Error Resume Next
'define the connection string, specify database driver
ConnString="DRIVER={SQL Server};SERVER=HOMER;UID=sa;" & _
"PWD=as;DATABASE=AdManger"

'declare the SQL statement that will query the database
SQL = "SELECT * FROM TABLE_NAME"

'create an instance of the ADO connection and recordset objects
Set Connection = CreateObject("ADODB.Connection")

'Open the connection to the database
Connection.Open ConnString
if err.Number > 0 Then
  WScript.Echo "Connection Failed : " & Err.Description
else
  WScript.Echo "Connection fine"
end if
Connection.Close
Set Connection = Nothing
0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 18742979
I was trying to use bcp from sql and it keeps giving me the
Error = [Microsoft][ODBC SQL Server Driver]Cannot generate SSPI context
I looked around it said to try and ping computer

0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
LVL 11

Expert Comment

by:andrewbleakley
ID: 18743018
have you tried everything in this http://support.microsoft.com/kb/811889
ping the name of he server that sqk is running on not th instance name
0
 
LVL 16

Expert Comment

by:rboyd56
ID: 18744826
The cannot generate SSPI context error is caused by an invalid Service Principle Name (SPN) for SQL Server. MOre than like the SPN is assigned for an older service account, like the system account, and never got updated when the service account was changed.

Download the setspn utility from this site:

http://www.microsoft.com/downloads/details.aspx?familyid=5fd831fd-ab77-46a3-9cfe-ff01d29e5c46&displaylang=en

At command prompt run these commands:

Setspn -L <SQL Server machine name>

Setspn -L <ql server service account>

Post the results to both of these commands. They do not have to be run on the SQL Server itself, but have to be run on a machine in the same domain.
0
 
LVL 16

Expert Comment

by:rboyd56
ID: 18744834
You can also use BCP passing the -U and -P parameters. This will use SQL Server authenication which will avoid the error as well. The error only occrs when TCP/IP and NT authentication is used.

So you can also change you client machine to use named pipes as well to avoid the error.
0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 18745208
SQL 2005

Setspn -L <SQL Server machine name>
Setspn -L <ql server service account>

comes back with invalid command

i put in the name of computer on first

Used bcp command with username and password
(i know the bcp is supported in 2005 and the sqlcmd replaces so just using the bcp that i know)

SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.
SQLState = 01000, NativeError = 2
Warning = [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
NULL

All services are started with local system account
shared memory enabled
named pipes enabled
tcp ip enabled

client protocols all enabled 1 shared memory, 2 tcp/ip 3, named pipes, 4 via

0
 
LVL 16

Expert Comment

by:rboyd56
ID: 18745784
What is your BCP command?

Did you download setspn and install it before you ran the command?

BTW: sqlcmd is a substitute for OSQL, not bcp.

Sounds like the server parameter you specified was not correct.


0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 18747956
in 2005 i have
Just create a new login with sa rights

declare @filename varchar(250)
declare @bcpcommand varchar(2000)
set @filename = 'C:\ET_CHRGL.txt'

SET @BCPCOMMAND = 'bcp "SELECT  * FROM TRACEY.DBO.TEST" queryout "'
set @bcpcommand = @bcpcommand  + @filename + '" -U BCPUser -P BCPUser -c -t "," -r "\n"'

exec master.dbo.xp_cmdshell @bcpcommand

usually i have -S ServerName

Get
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.
SQLState = 01000, NativeError = 2
Warning = [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
NULL
0
 
LVL 16

Accepted Solution

by:
rboyd56 earned 500 total points
ID: 18748161
This BCP command does not have a server name:

SET @BCPCOMMAND = 'bcp "SELECT  * FROM TRACEY.DBO.TEST" queryout "'
set @bcpcommand = @bcpcommand  + @filename + '" -U BCPUser -P BCPUser -c -t "," -r "\

If you add the server name do you still get the error?

You can also creat a TCP?IP alias and see if that works. That would indicate a problem with the shared memory library.
0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 18752714
Still get the error with servername and then using U and p
Memory library error hmm...where can i fix this.

You been helping me out lately ha, never a dull moment at my place last friday was disk error then replication,...this is just an install of 2005 lol

Keeps me busy
0
 
LVL 16

Expert Comment

by:rboyd56
ID: 18753154
Did you try creating a tcp/ip alias on the server?
0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 18768130
I try as soon as my pc responds..it crashed yesterday.
Not a good week.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how the fundamental information of how to create a table.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question