WIN XP
Windows 2000
we have a standard build script as follows to build a database locally.
osql -d Master -i script name -o script log -E -S localhost
The script fails with the following error message
[TCP/IP Sockets] SQL Server does not exist or access denied
[TCP/IP Sockets]ConnectionOpen (Connect())
If -S option is removed, the script runs fine.
I Googled on this problem and did the following.
In the client library I disabled Named Piped protocol and enabled only
TCP/IP protocols.
Stopped and restarted SQL Server.
I also added an alias localhost with network libary set to TCP/IP. Unchecked
Dynically check port
number and set the port to 1433.
Still the problem persists.
BTW this is a new build machine and Sql server is installed for the first
time on that machine.
TIADid you try -S 127.0.0.1 or -S (local) or -S <the actual machine name>?
Or, why can't you just leave the -S parameter off?
http://www.aspfaq.com/
(Reverse address to reply.)
"SQL Server DBA" <sqlsdba@.gmail.com> wrote in message
news:1109697584. 61f025d955437a9ee32b16bfa728bcfd@.teranew
s...
> WIN XP
> Windows 2000
> we have a standard build script as follows to build a database locally.
> osql -d Master -i script name -o script log -E -S localhost
> The script fails with the following error message
> [TCP/IP Sockets] SQL Server does not exist or access denied
> [TCP/IP Sockets]ConnectionOpen (Connect())
> If -S option is removed, the script runs fine.
> I Googled on this problem and did the following.
> In the client library I disabled Named Piped protocol and enabled only
> TCP/IP protocols.
> Stopped and restarted SQL Server.
> I also added an alias localhost with network libary set to TCP/IP.
Unchecked
> Dynically check port
> number and set the port to 1433.
> Still the problem persists.
> BTW this is a new build machine and Sql server is installed for the first
> time on that machine.
> TIA
>|||I'm not following why you need to specify the name of the server...
according to BOL:
The -S parameter, needs:
[-S server_name[\instance_name]]
Further:
"If you do not specify a server, the name of the workstation is used."
I'd recommend leaving the -S off.
Steve
"SQL Server DBA" <sqlsdba@.gmail.com> wrote in message
news:1109697584. 61f025d955437a9ee32b16bfa728bcfd@.teranew
s...
> WIN XP
> Windows 2000
> we have a standard build script as follows to build a database locally.
> osql -d Master -i script name -o script log -E -S localhost
> The script fails with the following error message
> [TCP/IP Sockets] SQL Server does not exist or access denied
> [TCP/IP Sockets]ConnectionOpen (Connect())
> If -S option is removed, the script runs fine.
> I Googled on this problem and did the following.
> In the client library I disabled Named Piped protocol and enabled only
> TCP/IP protocols.
> Stopped and restarted SQL Server.
> I also added an alias localhost with network libary set to TCP/IP.
Unchecked
> Dynically check port
> number and set the port to 1433.
> Still the problem persists.
> BTW this is a new build machine and Sql server is installed for the first
> time on that machine.
> TIA
>|||"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23GiDLPoHFHA.1528@.TK2MSFTNGP09.phx.gbl...
> Did you try -S 127.0.0.1 or -S (local) or -S <the actual machine name>?
> Or, why can't you just leave the -S parameter off?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
I will have to do a big justification on why -S should be removed. I just
joined this project.
These scripts were running fine on older machines. The problem is with this
new machine only.
changing the script (removing -S) will be my last option.
thanks all.|||"SQL Server DBA" <sqlsdba@.gmail.com> wrote in message
news:1109698545. da57de61dec89a895ce5ac06b889c11e@.teranew
s...
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:%23GiDLPoHFHA.1528@.TK2MSFTNGP09.phx.gbl...
> I will have to do a big justification on why -S should be removed. I just
> joined this project.
> These scripts were running fine on older machines. The problem is with
> this new machine only.
> changing the script (removing -S) will be my last option.
I have another machine where this script works. However that machine is Win
2000 [ version 5.00.2195].
The one which is giving problem is WIn XP [ version 5.1.2600 ].
Is this a useful information?|||> I will have to do a big justification on why -S should be removed.
Other than "it breaks, and is not necessary anyway"?|||> I have another machine where this script works. However that machine is
Win
> 2000 [ version 5.00.2195].
> The one which is giving problem is WIn XP [ version 5.1.2600 ].
> Is this a useful information?
That depends. Did you try any of my other suggestions?
1. .
2. (local)
3. 127.0.0.1
4. <the actual IP address>
5. <the actual workstation name>
6. "do a big justification" on leaving off the unnecessary parameter|||"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:etYDHeoHFHA.2356@.TK2MSFTNGP12.phx.gbl...
> Win
> That depends. Did you try any of my other suggestions?
> 1. .
> 2. (local)
success
> 3. 127.0.0.1
(failed)
> 4. <the actual IP address>
> 5. <the actual workstation name>
> 6. "do a big justification" on leaving off the unnecessary parameter
did not try.|||"SQL Server DBA" <sqlsdba@.gmail.com> wrote[vbcol=seagreen]
> success
>
sorry. this one too works.?
so we have following two commands working
osql -d Master -i file.sql -o file.out -E -S (local)
osql -d Master -i file.sql -o file.out -E -S 127.0.0.1
but this one fails
osql -d Master -i file.sql -o file.out -E -S localhost
[TCP/IP Sockets] SQL Server does not exist or access denied
[TCP/IP Sockets]ConnectionOpen (Connect())
I double checked C:\WINDOWS\SYSTEM32\DRIVERS\etc\hosts file and saw an entry
for 127.0.0.1 localhost.
so why only localhost is failing.|||"SQL Server DBA" <sqlsdba@.gmail.com> wrote in message
news:1109707082. 5fa894f609537b1ba2e3d37d057d3898@.teranew
s...
> "SQL Server DBA" <sqlsdba@.gmail.com> wrote
> sorry. this one too works.?
>
> so we have following two commands working
> osql -d Master -i file.sql -o file.out -E -S (local)
> osql -d Master -i file.sql -o file.out -E -S 127.0.0.1
> but this one fails
> osql -d Master -i file.sql -o file.out -E -S localhost
even IP address works
osql -d Master -i file.sql -o file.out -E -S 170.x.x.x
runs OK.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment