Hi,
I have developed socket on VB using wsock32.dll, which connects to the data from AS400. This data is then stored in SQL server. MTS is uset to handle the dll objects.
During the process of insertion system returns an error
[ODBC SQL Server Driver][TCP/IP Sockets] ConnectionRead (recv())
[ODBC SQL Server Driver][TCP/IP Sockets] General Network Error
After this error, system does not connect to SQL server and to AS400, until the MS DTC service on MTS is stopped and restarted.
Please help on this.
Note:
I have introduced a trace in each ster to analyze at what point error is happening. I found out that system is not giving problem while opening a connection to SQL server, it only gives an error while inserting the records in SQL server. I think, there might be problem with the locking machanism.
I will appericiate your helps, mean while I try to solve the problem related to locking.
regardsIs there some reason that you didn't want to use DTS packages for this? DTS does quite well connecting to our AS/400 (though it took a bit of configuration).
Regards,
Hugh Scott
Originally posted by attinder
Hi,
I have developed socket on VB using wsock32.dll, which connects to the data from AS400. This data is then stored in SQL server. MTS is uset to handle the dll objects.
During the process of insertion system returns an error
[ODBC SQL Server Driver][TCP/IP Sockets] ConnectionRead (recv())
[ODBC SQL Server Driver][TCP/IP Sockets] General Network Error
After this error, system does not connect to SQL server and to AS400, until the MS DTC service on MTS is stopped and restarted.
Please help on this.
Note:
I have introduced a trace in each ster to analyze at what point error is happening. I found out that system is not giving problem while opening a connection to SQL server, it only gives an error while inserting the records in SQL server. I think, there might be problem with the locking machanism.
I will appericiate your helps, mean while I try to solve the problem related to locking.
regards|||We might have used DTS but we are using the same socket with different applications. They may or may not use SQL server|||Hi Hugh,
You indicated that connecting to AS 400 requires quite a bit of configuration. Can you please elaborate on this point? I need it urgently.
Thanks
Originally posted by hmscott
Is there some reason that you didn't want to use DTS packages for this? DTS does quite well connecting to our AS/400 (though it took a bit of configuration).
Regards,
Hugh Scott|||Okay, here is what I remember:
1. We used the IBM Client Access Express drivers. We are using V5R1M0 with SP SI02795. The SP is critical, since there is a bug in the original release which won't let you connect to a database w/ more than 9 characters in the name (thanks IBM!).
2. The main hassle is that the driver always prompts you for a user name/password unless you config it appropriately. The prompt is not visible when the DTS package runs as a job (since it appears on the virtual desktop of the SQL Agent service account).
If that doesn't make sense to you, stop. Read up on SQL Service accounts and make sure that SQL Agent is set up to run under a service account.
3. Okay, proceeding ahead:
a. The SQL Agent account must be set up with 10 characters or less (SQLAdmin is okay, SQLAgentAccount is not).
b. Set up an account on the AS/400 with the same name as the SQL Agent account.
c. Set the password for both accounts to be identical (and again, no more than 10 characters)
4. Use the ODBC Administration GUI to set up a new connection. Specify that the connection should use the Windows user name/account information. It is helpful to do this set up while logged in as the SQL Agent Service account. It's not critical, but it is helpful.
Some additional notes:
1. We are using MS W2K SP4 (Advanced)
2. We are using MS SQL 2K (SP3a + MS03-031)
3. To verifiy that you have everything working correctly, log in to the server as the SQL Service account. Open a DTS package. Create a connection object for the AS/400. Create a destination connection object. Add a data pump task. When you specify the details of the data pump task, you should never be prompted for the password.
Alternatively: A friend of mine has had good success with the Hit Software OLE DB drivers for AS/400. I have never used them/don't know anything about them. But they may be worth trying. www.hitsw.com.
HTH,
hmscott
Showing posts with label dll. Show all posts
Showing posts with label dll. Show all posts
Thursday, March 8, 2012
Tuesday, March 6, 2012
[Microsoft][SQLServer 2000 Driver for JDBC]net dll not initi
We are currently in the middle of piloting a new application using
MSDE, and some of our users are getting the following SQLException
when attempting to query the database. The exception occurs
sporadically, and it only seems to happen after the application is
used for an extended duraton of time. Also, once the exception
occurs, it seems like the only way to obtain a good connection again
is to restart the JVM. Successive calls to get a connection from the
drivermanager fail otherwise.
Our calling application uses JNI to call a java function which is
responsible for creating the database connection and querying the
database.
Any help would be appreciated!
Here's the exception:
[Microsoft][SQLServer 2000 Driver for JDBC]net dll not initialized
(WSAStartup): socket write error
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]net
dll not initialized (WSAStartup): socket write error
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.sub mitRequest(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
Source)
Hello,
WSAStartup is a Windows API that is called (typically once) during an
application's startup to start using Winsock calls. Since you have been
using sockets up until the failure, it had to be called prior to that. It
looks like somehow the Winsock got uninitialized or unloaded but the JVM is
unaware of that.
Can you try opening a socket directly when this happens to confirm? You
could try something like:
java.net.Socket conn = new java.net.Socket("localhost", 1433);
and if you get the same failure, I would say this is an issue in the JVM.
Thanks,
Kamil
Kamil Sykora
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/securXity.
| NNTP-Posting-Date: Wed, 13 Jul 2005 00:58:48 -0500
| Subject: [Microsoft][SQLServer 2000 Driver for JDBC]net dll not initi
| From: akraai@.hotmail-dot-com.no-spam.invalid (akraai)
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| Mime-Version: 1.0
| Content-Type: text/plain; charset=ISO-8859-15
| Content-Transfer-Encoding: 8bit
| User-Agent: newsSync (SQL Server) 112669
| Message-ID: <foWdneohifEFMEnfRVn_vg@.giganews.com>
| Date: Wed, 13 Jul 2005 00:58:48 -0500
|
| We are currently in the middle of piloting a new application using
MSDE, and some of our users are getting the following SQLException
when attempting to query the database. The exception occurs
sporadically, and it only seems to happen after the application is
used for an extended duraton of time. Also, once the exception
occurs, it seems like the only way to obtain a good connection again
is to restart the JVM. Successive calls to get a connection from the
drivermanager fail otherwise.
Our calling application uses JNI to call a java function which is
responsible for creating the database connection and querying the
database.
Any help would be appreciated!
Here's the exception:
[Microsoft][SQLServer 2000 Driver for JDBC]net dll not initialized
(WSAStartup): socket write error
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]net
dll not initialized (WSAStartup): socket write error
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.sub mitRequest(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
Source)
|
MSDE, and some of our users are getting the following SQLException
when attempting to query the database. The exception occurs
sporadically, and it only seems to happen after the application is
used for an extended duraton of time. Also, once the exception
occurs, it seems like the only way to obtain a good connection again
is to restart the JVM. Successive calls to get a connection from the
drivermanager fail otherwise.
Our calling application uses JNI to call a java function which is
responsible for creating the database connection and querying the
database.
Any help would be appreciated!
Here's the exception:
[Microsoft][SQLServer 2000 Driver for JDBC]net dll not initialized
(WSAStartup): socket write error
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]net
dll not initialized (WSAStartup): socket write error
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.sub mitRequest(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
Source)
Hello,
WSAStartup is a Windows API that is called (typically once) during an
application's startup to start using Winsock calls. Since you have been
using sockets up until the failure, it had to be called prior to that. It
looks like somehow the Winsock got uninitialized or unloaded but the JVM is
unaware of that.
Can you try opening a socket directly when this happens to confirm? You
could try something like:
java.net.Socket conn = new java.net.Socket("localhost", 1433);
and if you get the same failure, I would say this is an issue in the JVM.
Thanks,
Kamil
Kamil Sykora
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/securXity.
| NNTP-Posting-Date: Wed, 13 Jul 2005 00:58:48 -0500
| Subject: [Microsoft][SQLServer 2000 Driver for JDBC]net dll not initi
| From: akraai@.hotmail-dot-com.no-spam.invalid (akraai)
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| Mime-Version: 1.0
| Content-Type: text/plain; charset=ISO-8859-15
| Content-Transfer-Encoding: 8bit
| User-Agent: newsSync (SQL Server) 112669
| Message-ID: <foWdneohifEFMEnfRVn_vg@.giganews.com>
| Date: Wed, 13 Jul 2005 00:58:48 -0500
|
| We are currently in the middle of piloting a new application using
MSDE, and some of our users are getting the following SQLException
when attempting to query the database. The exception occurs
sporadically, and it only seems to happen after the application is
used for an extended duraton of time. Also, once the exception
occurs, it seems like the only way to obtain a good connection again
is to restart the JVM. Successive calls to get a connection from the
drivermanager fail otherwise.
Our calling application uses JNI to call a java function which is
responsible for creating the database connection and querying the
database.
Any help would be appreciated!
Here's the exception:
[Microsoft][SQLServer 2000 Driver for JDBC]net dll not initialized
(WSAStartup): socket write error
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]net
dll not initialized (WSAStartup): socket write error
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.sub mitRequest(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
Source)
|
Labels:
application,
attempting,
database,
dll,
driver,
following,
initi,
jdbcnet,
microsoft,
microsoftsqlserver,
mysql,
oracle,
piloting,
server,
sql,
sqlexceptionwhen,
users,
usingmsde
Subscribe to:
Posts (Atom)