Hi All,
I am getting the following error message when I am trying to connect to SQL 2000 Server from SQL 7 Server using BCP/OSQL/ISQL etc., Can any one help me in fixing this problem.
NULL
COULD NOT CONNECT TO SQL SERVER
NULL
SQLState: 08001 Native Error: 6
Info. Message: [Microsoft][ODBC SQL Server Driver][Named Pipes]Specified SQL server not found.
NULL
SQLState: 01000 Native Error: 53
Info. Message: [Microsoft][ODBC SQL Server Driver][Named Pipes]ConnectionOpen (CreateFile()).
Thanks & Regards
Balaji Prabhu.TBalaji,
What is the respective OS?Do you have only 'Named pipes' enabled?
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Balaji Prabhu.T" <Balaji Prabhu.T@.discussions.microsoft.com> wrote in
message news:C15C3280-F0A5-418B-912B-018EE518AF14@.microsoft.com...
> Hi All,
> I am getting the following error message when I am trying to connect to
SQL 2000 Server from SQL 7 Server using BCP/OSQL/ISQL etc., Can any one help
me in fixing this problem.
> NULL
> COULD NOT CONNECT TO SQL SERVER
> NULL
> SQLState: 08001 Native Error: 6
> Info. Message: [Microsoft][ODBC SQL Server Driver][Named Pipes]Specified
SQL server not found.
> NULL
> SQLState: 01000 Native Error: 53
> Info. Message: [Microsoft][ODBC SQL Server Driver][Named
Pipes]ConnectionOpen (CreateFile()).
> Thanks & Regards
> Balaji Prabhu.T
>
Showing posts with label bcp. Show all posts
Showing posts with label bcp. Show all posts
Friday, March 30, 2012
Monday, March 19, 2012
ODBC BCP Error Handling in C++
(Please let me know if there is a better group to post this on...)
I have written a C++ program that BCP's data into SQL Server using ODBC.
I'm currently at the point that I am testing worst-case scenarios. In the
scenario that while the BCP is running, I pull the network cable from SQL
server, I get failed calls to bcp_sendrow, but I am unable to get details on
the error. I have tried calling SQLGetDiagRec with handle types of
SQL_HANDLE_ENV, SQL_HANDLE_DBC, and SQL_HANDLE_STMT.
Any suggestions would be appreciated.
Thanks.
-Thomas
I figured it out myself. In case anyone is interested, here is how to
determine whether the connection to the database is still alive...
SQLHDBC m_hConn;
...
SQLINTEGER siDead = SQL_CD_FALSE;
::SQLGetConnectAttr(m_hConn
,SQL_ATTR_CONNECTION_DEAD
,&siDead //SQL_CD_TRUE or SQL_CD_FALSE
,sizeof(siDead)
,NULL);
if (siDead == SQL_CD_TRUE)
{
//Database connection is dead
}
I have written a C++ program that BCP's data into SQL Server using ODBC.
I'm currently at the point that I am testing worst-case scenarios. In the
scenario that while the BCP is running, I pull the network cable from SQL
server, I get failed calls to bcp_sendrow, but I am unable to get details on
the error. I have tried calling SQLGetDiagRec with handle types of
SQL_HANDLE_ENV, SQL_HANDLE_DBC, and SQL_HANDLE_STMT.
Any suggestions would be appreciated.
Thanks.
-Thomas
I figured it out myself. In case anyone is interested, here is how to
determine whether the connection to the database is still alive...
SQLHDBC m_hConn;
...
SQLINTEGER siDead = SQL_CD_FALSE;
::SQLGetConnectAttr(m_hConn
,SQL_ATTR_CONNECTION_DEAD
,&siDead //SQL_CD_TRUE or SQL_CD_FALSE
,sizeof(siDead)
,NULL);
if (siDead == SQL_CD_TRUE)
{
//Database connection is dead
}
ODBC BCP Error Handling in C++
(Please let me know if there is a better group to post this on...)
I have written a C++ program that BCP's data into SQL Server using ODBC.
I'm currently at the point that I am testing worst-case scenarios. In the
scenario that while the BCP is running, I pull the network cable from SQL
server, I get failed calls to bcp_sendrow, but I am unable to get details on
the error. I have tried calling SQLGetDiagRec with handle types of
SQL_HANDLE_ENV, SQL_HANDLE_DBC, and SQL_HANDLE_STMT.
Any suggestions would be appreciated.
Thanks.
-ThomasI figured it out myself. In case anyone is interested, here is how to
determine whether the connection to the database is still alive...
SQLHDBC m_hConn;
..
SQLINTEGER siDead = SQL_CD_FALSE;
::SQLGetConnectAttr(m_hConn
,SQL_ATTR_CONNECTION_DEAD
,&siDead //SQL_CD_TRUE or SQL_CD_FALSE
,sizeof(siDead)
,NULL);
if (siDead == SQL_CD_TRUE)
{
//Database connection is dead
}
I have written a C++ program that BCP's data into SQL Server using ODBC.
I'm currently at the point that I am testing worst-case scenarios. In the
scenario that while the BCP is running, I pull the network cable from SQL
server, I get failed calls to bcp_sendrow, but I am unable to get details on
the error. I have tried calling SQLGetDiagRec with handle types of
SQL_HANDLE_ENV, SQL_HANDLE_DBC, and SQL_HANDLE_STMT.
Any suggestions would be appreciated.
Thanks.
-ThomasI figured it out myself. In case anyone is interested, here is how to
determine whether the connection to the database is still alive...
SQLHDBC m_hConn;
..
SQLINTEGER siDead = SQL_CD_FALSE;
::SQLGetConnectAttr(m_hConn
,SQL_ATTR_CONNECTION_DEAD
,&siDead //SQL_CD_TRUE or SQL_CD_FALSE
,sizeof(siDead)
,NULL);
if (siDead == SQL_CD_TRUE)
{
//Database connection is dead
}
Monday, March 12, 2012
ODBC and DB-Lib bcp
Question - I have a little app that uses the ODBC Bulk Operations and DB-Lib
bcp functions to load data into a table from variables (bcp_sendrow). It
works great on SQL 2000, but I'm encountering some problems on SQL 6.5.
Basically on the SQL 6.5 box the bcp_init function is returning FAIL instead
of SUCCEED. It works on SQL 2000, so it doesn't appear to be my code, but
I'm not 100% on that either. Anyone know why this might be happening and
what could be done to fix it?
ThanksFigured out the problem. MDAC versioning.
"Mike C#" <xyz@.xyz.com> wrote in message
news:e7s8QiKvGHA.3552@.TK2MSFTNGP03.phx.gbl...
> Question - I have a little app that uses the ODBC Bulk Operations and
> DB-Lib bcp functions to load data into a table from variables
> (bcp_sendrow). It works great on SQL 2000, but I'm encountering some
> problems on SQL 6.5. Basically on the SQL 6.5 box the bcp_init function is
> returning FAIL instead of SUCCEED. It works on SQL 2000, so it doesn't
> appear to be my code, but I'm not 100% on that either. Anyone know why
> this might be happening and what could be done to fix it?
> Thanks
>
bcp functions to load data into a table from variables (bcp_sendrow). It
works great on SQL 2000, but I'm encountering some problems on SQL 6.5.
Basically on the SQL 6.5 box the bcp_init function is returning FAIL instead
of SUCCEED. It works on SQL 2000, so it doesn't appear to be my code, but
I'm not 100% on that either. Anyone know why this might be happening and
what could be done to fix it?
ThanksFigured out the problem. MDAC versioning.
"Mike C#" <xyz@.xyz.com> wrote in message
news:e7s8QiKvGHA.3552@.TK2MSFTNGP03.phx.gbl...
> Question - I have a little app that uses the ODBC Bulk Operations and
> DB-Lib bcp functions to load data into a table from variables
> (bcp_sendrow). It works great on SQL 2000, but I'm encountering some
> problems on SQL 6.5. Basically on the SQL 6.5 box the bcp_init function is
> returning FAIL instead of SUCCEED. It works on SQL 2000, so it doesn't
> appear to be my code, but I'm not 100% on that either. Anyone know why
> this might be happening and what could be done to fix it?
> Thanks
>
Subscribe to:
Posts (Atom)