March 17, 2011 at 2:42 pm
I am developing within JD Edwards and need to periodically call a stored procedure to run. I created a batch file on the shared drive of an SQL2K that will call a stored procedure to update a table on an SQL2K5 server.
When I launch the batch file directly from the SQL2K server from the command line, everything runs fine, but if I try to launch it from a remote PC (simulating the call from the JD Edwards Enterprise server) I get the following message:
c:\>osql.exe /U jdesql /P snac674 /Q "EXECUTE poller.dbo.JDE_EOS_Summary 3,1002,
111076"
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2].
[SQL Native Client]Login timeout expired [SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
I checked both the SQL 2K (holds production data) and also the SQL 2K5 server (JDE DB Server) and both appear to allow remote connections.
Are there any SQL DBA's who may shed some light on this?
March 17, 2011 at 3:35 pm
Sounds like there might be a firewall between the remote PC and the SQL 2005 machine. Can you telnet from the remote PC to the SQL 2005 machine on port 1433? (Assuming SQL is on port 1433)
March 18, 2011 at 8:48 am
Yes.
Currently I am able to replicate the issue on my local machine as well.
The BATCH file is sitting in a shared directory (with proper security for the client to read and execute it) on the SQL 2K server where the Stored Procedure resides.
I can run the batch via an RDP session from the servers command line directly and it works.
When I call the procedure from my local machine (on internal network) I get the message detailed above.
I checked the MS MSSQL support technet and followed the instruction on firewall configuration, but the SQL2K5 server's firewall is disabled (no real idea why).
I also verified that the remote connections option were enabled on the DB server and also that the browser services were enabled.
Also: I have a stand alone application running at all my plants (PA - corp, FL, CA) that monitors the shop floor production and it calls this stored procedure at shift end and it works fine from them. Obviously these stand alone apps are not using the command line utility to launch the batch file.
March 18, 2011 at 9:08 am
Are you trying to run the query against the default SQL instance on the server?
You aren't specifying the -S parameter to OSQL. From BOL:-
If no server is specified, osql connects to the default instance of SQL Server on the local computer. This option is required when executing osql from a remote computer on the network.
March 18, 2011 at 9:13 am
Ian Scarlett (3/18/2011)
Are you trying to run the query against the default SQL instance on the server?You aren't specifying the -S parameter to OSQL. From BOL:-
If no server is specified, osql connects to the default instance of SQL Server on the local computer. This option is required when executing osql from a remote computer on the network.
By golly, I think that did it!!! It worked from my local machine!
I will continue to test and see if it resolves the issue through the main utility.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply