.NET Provider Connection NPipe Issue

Report SqlBase bugs and possible workarounds.
Clifford Bass

.NET Provider Connection NPipe Issue

Post by Clifford Bass » 03 Jun 2015, 22:56

Hi,

I have the following code which works fine when running from a machine other than the sb.sample.edu machine:

Code: Select all

   Dim cnnIsland As New SQLBaseConnection( _
      "DataSource=sb.sample.edu;" & _
      "Transport=npipe;" & _
      "ServerName=Test1;" & _
      "Database=Island;" & _
      "User=*")

   cnnIsland.Open
   MessageBox.Show("Connected!")
   cnnIsland.Close
If I run it on the sb.sample.edu machine it gives me an error:

Gupta.SQLBase.Data.SQLBaseException: Could not create a connection to named pipe at:
\\sb.sample.edu\pipe\SQLBASE\SERVER\Test1. Check that your connection string is valid and server is running.

If I change the data source to localhost it works on the sb.sample.edu machine; but of course is useless on any other machine. It seems that it should work with the sb.sample.edu data source no matter what machine it is being run on.

Clifford Bass

Mike Vandine

Re: .NET Provider Connection NPipe Issue

Post by Mike Vandine » 09 Jun 2015, 08:56

Hi Cliff,

I will get someone to have a look at this. Sounds like something fundamentally wrong here.

Mike

dosborne

Re: .NET Provider Connection NPipe Issue

Post by dosborne » 09 Jun 2015, 17:08

The default server setting for named pipes is LocalOnly.
Has the setting be changed to On?

This is in the server section of the SQL.INI

Code: Select all

[dbntsrv]
namedpipes=1
EDIT: Second time through I realized that might not be the issue.
Does an nslookup sb.sample.edu return the same IP both from that machine and another?

The driver supports diagnostic error logging.
Set the environment variable SQLBASE_TRACE. It follows the same scheme as the C API tracing:
set "SQLBASE_TRACE=connection.type=file;connection.level=50;connection.file=<path to log file>"

If you don't see anything obvious there, please attach it here, or send it to support.

Clifford Bass

Re: .NET Provider Connection NPipe Issue

Post by Clifford Bass » 15 Jun 2015, 18:45

Hi,

This is the setting in the dbntsrv section:

NamedPipes=Yes

I will see about doing the trace soon; probably tomorrow and will let you know.

Clifford

Clifford Bass

Re: .NET Provider Connection NPipe Issue

Post by Clifford Bass » 15 Jun 2015, 18:47

Hi,

Forgot to mention. The nslookup returns the same results both on the server and on another machine.

Clifford

Clifford Bass

Re: .NET Provider Connection NPipe Issue

Post by Clifford Bass » 17 Jun 2015, 20:40

Hi Daniel,

The trace showed something odd; in that it apparently decided to look for the SQL.INI file even though everything was supplied. Whether that is a cause or not....? Connecting from SQLTalk works fine from the local machine and the remote machine.

Code: Select all

 2308:  Verbose: ,0: SqlbaseConnection.Open
 2308:  Info   : ,0: Connecting using connect string: datasource=sb.sample.edu;transport=npipe;servername=Test1;database=Island;user=*
 2308:  Verbose: ,0: Finding sql.ini
 2308:  Info   : ,0: Using ini file found using legacy search method:  C:\Program Files\Gupta\SQLBase1173\sql.ini
 2308:  Error  : ,0: Could not create a connection to named pipe at : \\sb.sample.edu\pipe\SQLBASE\SERVER\Test1.  Check that your connection string is valid and server is running.
 2308:  Verbose: ,0: SQLBaseException thrown with message = Could not create a connection to named pipe at : \\sb.sample.edu\pipe\SQLBASE\SERVER\Test1.  Check that your connection string is valid and server is running.
   at Gupta.SQLBase.Data.SQLBaseException.LogStackTrace()
   at Gupta.SQLBase.Data.MessageLayer.PipeMessageSender.Connect()
   at Gupta.SQLBase.Data.MessageLayer.NamedPipeConnector.Open()
   at Gupta.SQLBase.Data.SQLBaseConnection.InitializeAndOpenConnector()
   at Gupta.SQLBase.Data.SQLBaseConnection.Connect(Boolean isServerConnection)
   at Gupta.SQLBase.Data.SQLBaseConnection.CreateNewConnection(ConnectionPool pool)
   at Gupta.SQLBase.Data.SQLBaseConnection.CreateConnection()
   at Gupta.SQLBase.Data.SQLBaseConnection.Open()
Cliff

Return to “SqlBase Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 0 guests