C++ + Sockets + SQL

Hello, dev-community :)
I post a question first time, so pls sorry for my bad english)
I have stucked with developing of c++ application for my own purposes (education). 
So my app is some kind of proxy-server, but its only for sql-traffic (well it is for all traffic, but i will use it for sql-traffic). Clients connect to this server (not to MSSQL server directly), like it sql management studio does. I can authorize them (using
some rules, but it's not for now) and re-send data-packets, which they are sended to me. Then re-send to them answer of MSSQL server (as similar packets). 
Well, in simple terms, i want to create my own "agent". And re-send packets from "agent" i will be via sockets (or may be there is another simplier way? :)).
So, my main target for now is: i can connect to this "proxy" via sql management studio and do some simple operations with database (select-queries for now will be OK :) )
And my question is: How can i connect to MSSQL server instance by sockets? What algorithm should i use? But first of all, is it possible at all? Or i just hitting my head against the wall now? What should i do?
ps. I know about TDS protocol, which MSSQL uses, but my proxy will be re-sending already constructed packets. 
pss. I have already posted this message on social-msdn forum.

The Poco C++ library has a clear implementation of secure sockets using openSSL.
You could use this entire library (which is great btw ) or check out the "SecureSocketImpl" class for details on how to implement it yourself.
http://pocoproject.org/poco/docs/

Similar Messages

  • "ODBC Error= [17] [] "[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQ

    Hi,
    I am getting the above error when trying to connect to a database located on remote database. if the database is on same system no problem.
    any clue???????pls help me.

    The full error msg is as follows and the back ground of the problem is decribed below...pls help me out.
    I have written some perl programs to be called by java to execute some database related tasks. My database located at a remote win2K server and database is MSSql and my programs are executing on WIN2k server. The problem is with perl talking to remote database...the following error is displaying...
    "ODBC Error= [17] [] "[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied."

  • Essbase Studio - Failed to Establish Connection With SQL Database Server

    Hi all,
    I am new to Hyperion and am having trouble deploying what seems a simple cube in Essbase Studio.
    My environment is Windows 2003, EPM 11.1.1.2, SQL Server 2000.
    I have the following two issues which may be related.
    1. The EPM System Diagnostic tool says that Hyperion Foundation cannot connect to the SQL database.
    Error:
    Failed: Connection to database
    Error: java.net.UnknownHostException: <server name: <server name>
    Recommended Action:
    Every other EPM application is able to connect to the database. I have tried re-configuring Foundation Services and checking the config files and nothing looks wrong. I would appreciate advice on how to fix this.
    2 In Essbase Studio, I was able to connect to the database where the source data is, build the minischema and create dimensions and measures. But when I run the cube deployment wizard I get the error:
    Message: Failed to deploy Essbase cube
    Caused By: Failed to build Essbase cube dimension: (Time)
    Caused By: Cannot incremental build. Essbase Error(1021001): Failed to Establish Connection With SQL Database Server. See log for more information
    …ODBC Layer Error: [08001] ==> [[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.]
    I have checked the DSN as well as the connections set up within Studio, and they are all able to connect to the database. I am using the admin user for the Essbase server and have created a different user for the databases where the data resides and the shared services database. I tried using the same user all the way through and this didn’t help.
    Can you please advise what else I can check or change to resolve this issue.
    Also, can you work in EAS with cubes that are created in Studio? I tried looking at it and I got an error that the rule file couldn’t be accessed because it was created in Studio.
    After the above failures, I tried creating a cube in EIS, with mixed success. I have been able to load the members and data without errors. But when I try to view the data in the cube, I am seeing field names for the measures instead of the data itself.
    ...Definitely more questions than answers at this stage of my learning.
    Regards
    Michelle

    Michelle,
    I don't know if you found an answer to you question after so many months but I was hoping I could be helpful.
    The issue you are experience happens often when the dimension that you are getting an error on, in this case TIME, is built from a snowflake lineage and there is a bad foreign key reference. This dimension is most like high-up in your outline build process for Essbase Studio and this prevents the build from happening usually early on.
    Check your logs also. They are in Hyperion > Products > logs > essbase > essbasestudio.
    You can also make your logs more verbose by setting a configuration variable in the essbase studio server.properties file but that should only be used for debugging as it really saps performance.
    And, yes, you can of course edit an Essbase Studio deployed cube in EAS. However, any changes you make to the cube in EAS are subject to being wiped-out upon the next Essbase Studio deployment of that Applicaion/Database combo.
    If you want to provide more detail, screenshots, etc. I would be glad to help where I can.
    Cheers,
    Christian
    http://www.artofbi.com

  • Data Quality - Failed to create connection to MDR.

    Hi All,
    I have installed Data Quality 11.7.2 on windows 2003 server using SQL 2005 (Both SQL 2005 server and Data Quality are in the same server) , The install was successful. But when I try to Open 'Data Quality Project Architect' it throws an error
    Failed to create connection to MDR.
    Driver error messgage = qodbc_mssql:
    Unable to connect, Database error message =] [microsoft][odbc sql server driver]
    [ tcp/ip sockets] sql server does not exist or access denied
    I checked the ODBC connection and tested it successfully too.
    I am not able to pass through the 'Meta Data Repository Connection' as its failing in 'Setup SQL connection option'
    Any help is appreciated !!!
    Thanks
    Ranjit Krishnan

    Hi Paul,
    Thanks for you reply, OBDC connection was created under System DSN, also tired the users DSN option too, but did not work.
    Recreated the ODBC connection many times still no luck.
    The 'Project Architect' client and the MDR (SQL 2005 Server) are on the same machine.
    Thanks
    Ranjit Krishnan

  • Problm making sqlserver2000 dsn

    whenever I am creating DSN in SQL2000,than I recived this msg
    Connection Failed:
    SQLState:'01000'
    SQL Server Error: 53
    [Micosoft][ODBC SQL Server Driver][DBNETLIB] ConnectionOpen (Connect()).
    Connection failed:
    SQLState:'08001'
    SQL Server Error:17
    [Micosoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied
    plz advised me for solution......................

    I would add one more bit of flexibility...
    What if your user had their own JDBC driver they wanted to use in place of the JdbcOdbc one? With the code snippets we've seen, they would have to put their driver in the classpath or else class.forName() won't find it.
    Of course, you could use the overload of forName() that let's you specify a classloader, but that actually won't work because the DriverManager will refuse to talk to any Driver class not loaded from the system classloader.
    The solution is to make a ShimDriver that implements the Driver interface, have its methods proxy the methods of a driver you load with your own classloader (if you wish), and manually register an instance of your ShimDriver with the DriverManager (which won't complain because it was loaded with the system classloader).
    Why go to the trouble? So that your properties file can have an extra line 'driver_url=jar:file:/path/to/driver/jar/file!/'.
    See http://www.kfu.com/~nsayer/Java/dyn-jdbc.html

  • How expensive is Java GUI

    Developers,
    A small question - Assume i have 6 JComponents of some sort arranged in a JFrame. Based on a Socket thread which is running continuosly in the background and executing a SQL statement the Components would need to be repainted().
    Each component does some slightly complex calculations - say calculating average of 1000 numbers as an example -
    Realistically can this be done - ie will the performance be reasonable enough - Where do you think the bottleneck will be - In the Socket SQL query or in repaiting.
    Many Thanks

    What I suggest Just find out whether there is any push Solution you can provide
    As i feel If you use Push based solution I mean query database again and again Just tell the Database/Server to give you the updated data when changed
    CSJakharia

  • A question about transparent gateway,sb help me plz!!

    hi all:
    i met a problem while trying the transparent gateway for ibm drda
    1.i have the listner.ora configured like this:
    =================================================================
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = felix)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = tg4drda)
    (SID_NAME = TEST)
    (ORACLE_HOME = E:\oracle\oradrda)
    =================================================================
    2.and the tnsnames.ora configured like this:
    =================================================================
    TEST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.10.11)(PORT = 1521))
    (CONNECT_DATA =
    (SID = TEST)
    (SERVER = DEDICATED)
    (HS = ok)
    (HS = OK)
    =================================================================
    3.and the initTEST.ora configured like this:
    =================================================================
    set DRDA_CONNECT_PARM=localhost:446
    DRDA_REMOTE_DB_NAME=test (database name of db2)
    =================================================================
    then i log on as user system and create a database link dblink1.But when i try the sql statment "select * from t1@dblink1"
    such error came up:
    # ORA-28545: error diagnosed by Net8 when connecting to an agent
    NCRO: Failed to make RSLV connection
    #ORA-02063:preceding 2 lines from dblink1
    somebody help me plz,tell me how to deal with such a problem,thanks a lot!!!
    Best regards!

    Hi Felix,
    Please take a look at note 234517.1 on metalink (copied below).
    This note explains how to resolve the following error messages when using Transparent Gateways or Generic Connectivity:
    ORA-3113; ORA-2019; ORA-2085; ORA-12154; ORA-28545; ORA-28546; ORA-28509; ORA-942; ORA-904; ORA-28500;ORA-28528
    SCOPE & APPLICATION
    This note should help to solve common error messages when using generic
    connectivity or gateways.
    Common errors with gateways or generic connectivity
    Here are the English descriptions of each error; to compare your message
    with the message below, you can alter your current SQL*Plus session
    and compare your message with the messages listed in this note:
    alter session set nls_language=american;
    ORA-3113:
    SQL> connect system/manager@tg4msql;
    ERROR:
    ORA-03113: end-of-file on communication channel
    Resolution:
    You can't connect with SQL*Plus directly to the foreign
    data store. HS or Gateways are only designed to work with
    a database link from an Oracle database to the foreign
    data store
    ORA-2019:
    SQL> select * from all_catalog@demo;
    select * from all_catalog@demo
    ERROR at line 1:
    ORA-02019: connection description for remote database not found
    Resolution:
    Create a database link to connect to the foreign database
    create [public] database link <db link name>
    connect to <user of the foreign datastore>
    identified by <password of this user>
    using '<SQL*Net ALIAS>';
    For case sensitive usernames/passwords of foreign databases,
    surround the user and password with double quotes.
    create [public] database link <db link name>
    connect to "<user of the foreign datastore>"
    identified by "<password of this user>"
    using '<SQL*Net ALIAS>';
    ORA-2085:
    SQL> select * from all_catalog@tg4msql_v91;
    select * from all_catalog@tg4msql_v91
    ERROR at line 1:
    ORA-02085: database link TG4MSQL_V91.DE.ORACLE.COM
    connects to HO.WORLD
    Resolution:
    This problem is related to GLOBAL NAMES.
    The simplest way to disable global naming is to alter
    the current session.
    alter session set global_names=false;
    The other solution is to add a global_name to the
    gateway/hs:
    HS_DB_NAME = <datasource>
    HS_DB_DOMAIN = <DOMAIN>
    But the HS_DB_NAME must not exceed 8 characters and
    must not contain any extra characters. If this is not
    possible, the globale naming can be disabled by setting
    GLOBAL_NAMES = FALSE in the init.ora of the database
    as well
    ORA-12154:
    SQL> select * from all_catalog@demo;
    select * from all_catalog@demo
    ERROR at line 1:
    ORA-12154: TNS:could not resolve service name
    Resolution:
    The database link uses a SQL*Net alias not specified
    in the TNSNAMES.ORA of the database server.
    Query the data dictionary to figure out the 'HOST'
    specified for the database link:
    select db_link, host from user_db_links;
    or
    select db_link, host from dba_db_links;
    The 'HOST' value is the alias of the SQL*Net.
    Please make sure it exists in the TNSNAMES.ORA file
    present at the Oracle database server.
    ORA-28545:
    SQL> select * from all_catalog@demo;
    select * from all_catalog@demo
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    NCRO: Failed to make RSLV connection
    ORA-02063: preceding 2 lines from DEMO
    Resolution:
    There's something wrong with the SQL*Net connection:
    - checking the SQL*Net -> Listener configuration with TNSPING:
    tnsping <SQL*Net alias>
    TNS-12545: Connect failed because target host or object
    does not exist
    The HOSTNAME specified in the TNSNAMES.ORA is invalid
    Try with the OS ping to resolve the hostname / IP adddress
    TNS-12541: TNS:no listener
    The hostname specified in the listener.ora points to a
    machine without an Oracle listener, the listener on that
    machine is not running or the port number is wrong.
    NO ERROR with TNSPING:
    This might be caused by an invalid SID configuration.
    Please make sure, that the SID in the listener refelects the
    SID specified in the TNSNAMES.ORA. Make sure you don't mix
    SID syntax with SERVICE_NAME syntax.
    If everything is configured well, please make sure that
    lsnrctl status shows at least one service handler for
    hsodbc. Probably restart the listener AFTER changing
    the listener.ora file.
    Still no error found, then please enable listener tracing
    (level support) and have a look at the listener.trace file
    after retrying the same select statement again.
    In the file you should see the connect from the Oracle
    database to the listener. After a few lines you should see that
    the listener tries to open 2 pipes. Does this work or does it
    fail and again a few lines later you see a hex/ascii block that
    conatins an error stack like:
    ERR=12500, CODE=12500, EMFI=4, CODE=12560, EMFI=4?
    Then please check again the listener.ora file; is the
    ORACLE_HOME directory specified within the listener.ora file
    correct? Or if you are using environment variables in the
    listener.ora please replace them with absolute paths.
    ORA-28546
    CAUSE 1:
    SQL> select * from all_catalog@demo;
    ERROR at line 1:
    ORA-28546: connection initialization failed, probable Net8 admin error
    ORA-02068: following severe error from DEMO
    ORA-03113: end-of-file on communication channel
    Resolution:
    This error might be caused by a misplaced 'HS=' or 'HS=OK' key
    word in the tnsnames.ora.
    Make sure HS= or HS=OK is present and that the SID Connect String
    looks like:
    (CONNECT_DATA =
    (SID = tg4msql)) <= there are 2 closing brackets! The HS
    (HS=)) <= key word is OUTSIDE of connect_data
    CAUSE 2:
    SQL> select * from all_catalog@test;
    ora-28546: connection initialization failed, probable net8 admin error
    ora-29511 lost rpc connection to heterogeneous remote agent SID ...
    ora-02063 preceding 2 lines from test
    Resolution:
    This behaviour can be found in situations with a version missmatch.
    For example the Oracle database is release 9.2.0.4 and the gateway
    itself 9.2.0.1
    => The fix is to apply the same database patchset (gateway patches
    are part of the database patchsets) to the gateway home as well;
    or if the gateway 9.2.0.1 was installed into a 9.2.0.4 database
    directory to reapply the database patchset.
    ORA-28509:
    Older gateways report this error instead of giving a
    deltailed error description.
    Resolution:
    This error indicates the same as the errors described above.
    They can be solved by checking the SQL*Net configuration
    for the gateway / generic connectivity setup.
    ORA-942:
    SQL> select irgendwas from demo@demo;
    select irgendwas from demo@demo
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ...(the text here depends on the library/odbc...
    ORA-02063: preceding 2 lines from DEMO
    Resolution:
    make sure the table exists in the foreign data store.
    Pay attention that some foreign data stores are case
    sensitive and thus the table_name must be surrounded
    by double quotes.
    ORA-904:
    SQL> select irgendwas from "demo"@demo;
    select irgendwas from demo@demo
    ERROR at line 1:
    ORA-00904: "IRGENDWAS": invalid identifier
    Resolution:
    Make sure the column name specified exists at the foreign
    table and if it is case sensitive, surround it by double quotes.
    ORA-28500:
    CAUSE 1:
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned
    this message:
    [Generic Connectivity Using ODBC][H006] The init parameter
    <HS_FDS_CONNECT_INFO> is not set. Please set it in init<orasid>.ora
    file.
    ORA-02063: preceding 2 lines from HSODBC
    Resolution:
    The connect information to the remote database or the ODBC DSN is not
    found. Add the proper connect string required by the gateway or hs/
    generic connectivity agent.
    CAUSE 2:
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ORA-28541: Error in HS init file on line 11.
    ORA-02063: preceding 2 lines from HSODBC
    Resolution:
    The init.ora of the gateway / generic connectivity contains an
    invalid parameter in line 11
    CAUSE 3:
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC]DRV_InitTdp: errors.h (2005): ;
    [Microsoft][ODBC SQL Server Driver][SQL Server]Error authenticating user
    'sa'. (SQL State: 00000; SQL Code: 18456)
    ORA-02063: preceding 2 lines from HSODBC
    Resolution:
    The username password for the database link is wrong or no connect
    information was specified.
    Make sure that for case sensitive usernames/passwords the create
    database link statement contains the double quotes for the
    username/passwords.
    Further make sure you specified a username and password. OS
    Authentication is currently not supported by most of the
    gateways of by generic connectivity.
    CAUSE 4:
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned
    this message:
    [Generic Connectivity Using ODBC]DRV_InitTdp: errors.h (2005): ;
    [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does
    not exist or access denied.[Microsoft][ODBC SQL Server Driver]
    [TCP/IP Sockets]ConnectionOpen (Connect()).
    (SQL State: 00000; SQL Code: 10061)
    ORA-02063: preceding 2 lines from HSODBC
    Resolution:
    Make sure the foreign database is up and running on the configured
    machine.
    ORA-28528:
    SQL> select * from DecimalType@hsodbc;
    ERROR:
    ORA-28528: Heterogeneous Services datatype
    conversion error
    Resolution:
    The language of the foreign data store (remote database)
    does not match with your Oracle database settings.
    Starting with 9.2.0.l4 this error might occure for example '
    if numeric values will be truncated.
    Adapt in the Gateway/Generic Connectivity initialisation file
    the parameter HS_LANGUAGE.
    HS_LANGUAGE must be set to the LANGUAGE used in the FOREIGN
    database.
    as a play with 2 settings and check out which one works:
    1. Try:
    HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
    Do you still get the error? Yes, proceed with the second try:
    2. Try:
    HS_LANGUAGE=GERMAN_GERMANY.WE8ISO8859P1
    (or to any other territory that uses a komma as decimal separator)
    ORA-24274:
    SQL> select * from all_catalog@<db_link>;
    select * from all_catalog@<db_link>
    ERROR at line 1:
    ORA-28522: error initializing heterogeneous capabilities
    ORA-28522: error initializing heterogeneous capabilities
    ORA-28559: FDS_CLASS_NAME is <GTW>9.2.0.5.0_128, FDS_INST_NAME is <link>
    ORA-02063: preceding 3 lines from %s
    ORA-00604: error occurred at recursive SQL level 1
    ORA-24274: no row exists in the HS$_BASE_CAPS table for these parameters
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_HS_UTL", line 431
    ORA-06512: at "SYS.DBMS_HS_CHK", line 51
    ORA-06512: at "SYS.DBMS_HS_UTL", line 48
    ORA-06512: at "SYS.DBMS_HS", line 38
    ORA-06512: at line 1
    Resolution:
    This special combination of errors might occure after applying
    the Oracle database and gateway patchset 9.2.0.5 WITHOUT
    running catpatch (=the upgrade script of the database).
    => Please run catpatch. If it ran successfully but connectivity
    still fails you may run
    cathnohs.sql and caths.sql to recreate the HS data
    dictionary tables. BUT BE CAREFUL: Running CATHNOHS drops ALL
    gateway/generic connectivity related database links!
    Hope this helps,
    Mark.

  • CR2008 unable to connect to Cisco CCX Historical Database (7.1) Vista PC.

    Does anybody already have experiance with CR2800 connection to  Cisco Historical Database?
    I configured according cisco admin guide, which is based on CR XI.
    Client DSN config. using SQL Server <IP address of Unified CCX server>\CRSSQL.
    Default Port 1433. Default database: db-cra
    Then creating a new connection using MS OLE DB Provider for ODBC Driver
    Selecting the before created DSN name.
    After clicking Finisth the following error message occurs:
    Failed to open connection
    Details: ADO Error Code 0x80004005
    Source: Microsoft OLE DB Provider for ODBC Drivers
    Description: Microsoft ODBC SQL Server Driver  TCP/IP Sockets SQL
    Server does not exist or access denied
    SQL State: 08001
    Native Error: 17 Database Vendor Code: 17
    Thanks for a feedback

    Hi Don
    This advice helped me a lot! Thank you for your help!
    The CR2008 connection to CCX Database could be done successfull.
    It might be a helpfull info for others with a similar problem:
    Creating a DSN according "Cisco Unified Contact Center Express Historical Reporting Administrator and Devolper Guide 7.0(1)"
    (Wich is based on Crystal Report XI).
    With the following exeption:
    In Step Creating Custom Reports , Befor you Begin, copy files from Cisco CCX Historical Reports folder on Cisco CCX HR client system to C:\Program Files\Business Objects\Crystal Reports 11 folder has to change to:
    copy files from Cisco CCX Historical Reports folder on Cisco CCX HR client system to C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86.
    The file crw32.exe resides in this folder and not in the folder explained in the Cisco Guide.
    Therefore the shorcut to crw32.exe properties, explained in the Cisco guide, has to be as follows:
    "C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\launchHRC.exe" crw32.exe
    (Quotation marks included, blank between launchHRC.exe" and crw32.exe.
    With this shortcut CR 2008 will start together with Cisco Historical Report Appl. on CCX server.
    Starting only 2008 will result in the following error message:
    Login failed.
    Details: ADO Error Code: 0x80004005
    Source: Microsoft OLE DB Provider for ODBC Drivers
    Description: [Microsoft][ODBC SQL Server Driver]Cannot generate SSPI
    context
    SQL State: S1000
    As explained in the Cisco Guide after creating a DNS the test will fail by clicking Test Data Source.

  • Scheduler cannot log into the repository.(BCAG0460)

    Hi All,
    Could anyone please help me in the issue described below?
    We are using BO 6.5 ZABO version for our Business Reporting purpose. The BO application is installed on one server and the BO Repository is residing on another server. We have been experiencing the following error messages, especially during the Weekends.
    ==============================================
    -Error- 11/10/08  08:08:13:961000  (<server_name>@BCASchedulersGroup_BCA_0) Scheduler cannot log into the repository.     (BCAG0460) - Cannot obtain SQLBO connection.     (BCAG0680)
    HYT00
    [Microsoft][ODBC SQL Server Driver]Timeout expired
    0
    -Error- 11/10/08  08:08:13:961000  (<server_name>@BCASchedulersGroup_BCA_0) Bad connection to repository (4865)     (BCAG1180)
    -Error- 11/10/08  09:37:52:689000  (<server_name>@BCASchedulersGroup_BCA_0) Scheduler cannot log into the repository.     (BCAG0460) - Cannot obtain SQLBO connection.     (BCAG0680)
    -Error- 11/10/08  09:37:52:689000  (<server_name>@BCASchedulersGroup_BCA_0) Bad connection to repository (4865)     (BCAG1180)
    -Error- 11/10/08  10:37:29:836000  (<server_name>@BCASchedulersGroup_BCA_0) Scheduler cannot log into the repository.     (BCAG0460) - Cannot obtain SQLBO connection.     (BCAG0680)
    -Error- 11/10/08  10:37:29:836000  (<server_name>@BCASchedulersGroup_BCA_0) Bad connection to repository (4865)     (BCAG1180)
    -Error- 11/10/08  10:53:42:214000  (<server_name>@BCASchedulersGroup_BCA_0) Scheduler cannot log into the repository.     (BCAG0460) - Cannot obtain SQLBO connection.     (BCAG0680)
    08001
    [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.
    17
    ==============================================
    On last week of Sept'2008 we faced similar issue and we tried fixing the issue by recreating the bomain.key file & restarting the BO services on the servers, but it didn't help as the actual cause was network connectivity issue between the BO application server and the BO repository server.
    This issue again reappeared on last week of Oct'2008. We tried rebooting the servers and restarting the BO services. The issue got resolved.
    I would like to know the followings:
    1) Why this issue occurs once in a week, mainly on weekends?
    2) Is it necessary to reboot the servers and restart the BO services on a periodic manner? If Yes, what should be the frequency of doing this activity?
    3) What would be the consequences if the BO applications and the BO repository are made to reside on the same server?
    Thanking in advance to all those generous souls willing to help me out in tackling the issue at the earliest.

    Hi Suraj,
    Following information might help you to resolve your query.
    Cause
    There are two possible causes for this error.
    - The WebIntelligence services are set as 'System Account'.
    - The Broadcast Agent was not installed properly.
    Resolution
    1. Change the WebIntelligence Manager and Orb services parameters from 'Log on as' to 'This Account'.
    2. Logon with the local machine administrator account who installed and configured Informix.
    3. Restart these two services.
    4. Re-install BCA following the steps listed in the 'Note for Informix Users' section in the Readme file.
    Regards,
    Sarbhjeet Kaur

  • Accessing MS Sql Server with Java classes - problem connecting to socket

    I found an example at this location which uses java classes to connected to MS Sql Server.
    http://search400.techtarget.com/tip/1,289483,sid3_gci1065992,00.html
    --bummer - it is a login location - so I will include the article
    Anyway, the example is using Websphere, but I am still on Jbuilder (will get wsad soon). So I planted the classes from the example in
    C:\Borland\JBuilder\jkd1.4\jre\lib\ext\...the classes
    Then I copied the code from the example to my jpx project and got an error that it could not connect to the socket. The only thing I changed in the code was the connection string:
    --original string from example:
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://1433", "");
    I was getting an error with the 2 argument version of DriverManager - and the second argument here was empty (properties argument). Here was my connection string:
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://Myserver:1433;User=sa;Password=");
    I am only using the 1 argument version of DriverManager. Note that the password=" is blank because my RnD workstation is standalone - no one accesses the sql server except me - so no password. I also left out the last semicolon I noticed. Any suggestions appreciated how I could fix this.
    Thanks
    source of article:
    http://search400.techtarget.com/tip/1,289483,sid3_gci1065992,00.html
    iSeries 400 Tips:
    TIPS & NEWSLETTERS TOPICS SUBMIT A TIP HALL OF FAME
    Search for: in All Tips All search400 Full TargetSearch with Google
    PROGRAMMER
    Sample code: Accessing MS SQL Server database from the iSeries
    Eitan Rosenberg
    09 Mar 2005
    Rating: --- (out of 5)
    Nowadays with the help of Java the iSeries can be integrated with other databases quite easy. This tip shows you how. The code included here uses the free Microsoft driver that can be downloaded from here. (SQL Server 2000 Driver for JDBC Service Pack 3)
    If your SQL server does not include the Northwind Sample Database you can find it here.
    http://www.microsoft.com/downloads/details.aspx?familyid=07287b11-0502-461a-b138-2aa54bfdc03a&displaylang=en
    The download contains the following files:
    msbase.jar
    mssqlserver.jar
    msutil.jar
    Those files needs to be copied to the iSeries directories (/home/r_eitan/ExternalJARs).
    Here's the directory structure (on the iSeries) for this sample:
    /home/r_eitan/ExternalJARs - Microsoft files (msbase.jar,mssqlserver.jar,msutil.jar)
    /home/r_eitan/JdbcTest02 - My code (Main.java,Main.class)
    The Java code
    import java.sql.*;
    import java.io.*;
    class Main {
    * Connect to Microsoft SQL server and download file northWind.products as tab
    * seperated file. (products.txt)
    public static void main(String args[]) {
    try {
    PrintStream outPut = new PrintStream(new BufferedOutputStream(new FileOutputStream("products.txt")));
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    //Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://1433", "");
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://Myserver:1433;User=sa;Password=");
    System.out.println("Connection Done");
    connection.setCatalog("northWind");
    String sqlCmdString = "select * from products";
    Statement statement = connection.createStatement();
    ResultSet resultSet = statement.executeQuery(sqlCmdString);
    ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
    int columnCount = resultSetMetaData.getColumnCount();
    // Iterate throught the rows in resultSet and
    // output the columns for each row.
    while (resultSet.next()) {
    for (int index = 1; index <=columnCount; ++index)
    String value;
    switch(resultSetMetaData.getColumnType(index))
    case 2 :
    case 3 :
    value = resultSet.getString(index);
    break;
    default :
    value = """ + resultSet.getString(index) + """;
    break;
    outPut.print(value + (index < columnCount ? "t" : ""));
    outPut.println();
    outPut.close();
    resultSet.close();
    connection.close();
    System.out.println("Done");
    catch (SQLException exception)
    exception.printStackTrace();
    catch (Exception exception)
    exception.printStackTrace();
    --------------------------------------------------------------------------------------------------

    My guess is that the server's host name isn't right. It necessarily (or even usually) the "windows name" of the computer. Try with the numeric IP address instead (type "ipconfig" to see it).
    First aid check list for "connection refused":
    - Check host name in connect string.
    - Check port number in connect string.
    - Try numeric IP address of server host in connect string, in case name server is hosed.
    - Are there any firewalls between client and server blocking the port.
    - Check that the db server is running.
    - Check that the db server is listening to the port. On the server, try: "telnet localhost the-port-number". Or "netstat -an", there should be a listening entry for the port.
    - Try "telnet serverhost the-port-number" from the client, to see if firewalls are blocking it.
    - If "telnet" fails: try it with the numeric ip address.
    - If "telnet" fails: does it fail immediately or after an obvious timeout? How long is the timeout?
    - Does the server respond to "ping serverhost" or "telnet serverhost" or "ssh serverhost"?

  • Using sockets with java from PL/SQL in Oracle 8.1.7 DBA

    Hey all,
    I've been struggling for a couple of weeks now with a problem. I wrote a framework around a toolkit which makes socket connections to another server. I am attempting to use the framework from within a PL/SQL script, which is calling the framework class files which have been loaded into Oracle 8.1.7 database. The problem seems to be if I grant all permissions, or socket permissions for all hosts/ports, or even the ones I know about are being used, I get a hang when trying to connect. The funny thing is, using the toolkit, if I invoke their classes directly within code written from Oracle's code editor, it will work.
    I suspect there is
    a) Some hidden permission issue
    b) A bug in the sockets implementation Oracle is using for their JVM.
    Can anyone offer insight to this problem?
    Thanks,
    Dave Blake
    [email protected]

    Hello,
    I'm trying to investigate the same thing.
    I want to make a soap-client with PL/SQL with 8i 8.1.6.0.0
    Did you succeed some additional information ??
    I tried to run the following example:
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    but it only works with 9i.
    With 8i the errors encountered were : XMLTYPE undefined
    Perhaps if we find the definition of XMLTYPE and we process it to 8i we'll be able to run the example ??
    thank's

  • Java.sql.SQLException: No more data to read from socket

    Hello,
    we're now facing some strange problem which is probably caused by some malfunctioned connections being present in connection pool. The MGP process is failing for some clients with following error message. During the MGP process, some users are processed without any problems and some encounter this exception. I tried to restart the DB and both OL servers (we have 2 OL servers, on one of them is running MGP), but it didn't help.
    Some time before I restarted the servers, we were also occasionally facing "Server connections exceeded" error message, but I don't think this is relevant...
    We're using 10gR2 OL servers and 10gR2 RDBMS.
    Any ideas what could be wrong?
    <pre>
    Applied Record     Counts:
    Insert Count     = 0
    Update Count     = 0
    Delete Count     = 0
    Composed PubItems
    (<PubItem Name>, <Duration     in Milli Seconds>):
    JPOCZ_C$ALL_CLIENTS,16
    JPOCZ_PA_STATESTOCKSUM,1484
    JPOCZ_PA_MEMOS,31
    JPOCZ_TASKMOTYPES,47
    JPOCZ_PA_VISITDETAILS,16
    JPOCZ_PA_STATESTOCK,859
    JPOCZ_DISTRIBS,47
    JPOCZ_ITEMPRICING,438
    Compose Error:
    java.sql.SQLException: No more data to read from socket
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:985)
         at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:746)
         at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:705)
         at oracle.jdbc.ttc7.Ocommoncall.receive(Ocommoncall.java:108)
         at oracle.jdbc.ttc7.TTC7Protocol.rollback(TTC7Protocol.java:427)
         at oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:1410)
         at oracle.lite.sync.JupConnection.rollback(Unknown Source)
         at oracle.lite.sync.MGP$MGPG.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    </pre>

    I'm not using localhost, but the host name. We just today notified some other network problems on this server and discovered there're 2 network cards - one of them which wasn't connected was configured for DHCP and the other one was configured properly with fixed IP address. We disabled the disconnected network card and it looks like the problems with other applications is solved so we'll se if the Mobile Server is also cured...

  • SQL error 17410 No more data to read from socket

    Hi, I may have reached some stability limit of my JDBC thin driver, DB version and
    the complexity of my use cases??
    DB= 9.0.1.0
    Jev/OC4J = 9.0.2
    So this includes the JDBC thin driver included that looks like version; 9.0.2.7.99
    It made no sense but changing a dynamic where clause being set onto a View over an Entity
    like; vo.setWhereClause("myid = "+theID+" and someFk ="+theFkId);
    To a dynamic where clause with bind params for efficiency:
    vo.setWhereClause("myid = :1 and someFk = :2");
    vo.setWhereClauseParam(0, theId);
    vo.setWhereClauseParam(1, theFkId);
    I checked that my bind variables are same data type as what's declared in the Entity.
    This intermitantly causes:
    JBO-26066, which is a wrapper over SQLException 17410 No more data from socket
    Deep into the stack trace are unmarshalUB1(MARengine.java) ...
    leading me to believe this isn't my code but a bug/stress issue with the driver.
    Any thoughts?
    curt

    Steve et al,
    I'd like to re-ask does it make sense what I've done?
    A standard VO over an Entity with no where clause.
    vo.setWhereClause ("myId = :1 and myTypeCd = :2");
    vo.setWhereClauseParam(0, "123")
    vo.setWhereClauseParam(1, new Integer("1"));
    If this makes sense and should work, then I'd like to debug why for me it throws this No more data to
    read from socket error..
    Nothing obvious turns up in the BugDB for this related to bind variables and JDBC based on what you've described so far. An unscientific test would be to download the latest 9.2 JDBC driver and try that to see if the problem persists.I downloaded the latest 9.2 -g debug drivers and got this interesting trace:
    DRVR OPER OracleConnection.getDefaultFixedString() returning false
    DRVR OPER ResultSetUtil.needIdentifier(typeCode=1): return: false
    DRVR SQLS Input SQL:  "SELECT JotfObligationsSum.UNO#,         JotfObligationsSum.OBLIGATION_BALANCE,          JotfObligationsSum.OBLIGATION_TYPE_CD,         JotfObligationsSum.ENTERED_DT,          JotfObligationsSum.RECORD_VERSION,         JotfObligationsSum.ENTERED_BY,          JotfObligationsSum.ROWID FROM JOTF_OBLIGATIONS_SUM JotfObligationsSum WHERE (JotfObligationsSum.Uno# = '1000270' and JotfObligationsSum.Obligation_Type_Cd=1)"
          pStmt = conn.prepareStatement("SELECT JotfObligationsSum.UNO#,         JotfObligationsSum.OBLIGATION_BALANCE,          JotfObligationsSum.OBLIGATION_TYPE_CD,         JotfObligationsSum.ENTERED_DT,          JotfObligationsSum.RECORD_VERSION,         JotfObligationsSum.ENTERED_BY,          JotfObligationsSum.ROWID FROM JOTF_OBLIGATIONS_SUM JotfObligationsSum WHERE (JotfObligationsSum.Uno# = '1000270' and JotfObligationsSum.Obligation_Type_Cd=1)");  // JBO-JDBC-INTERACT
    [803] (30) DRVR OPER OracleStatement.setFetchSize(rows=1)
    Binding param 1: 1000270
    [804] (0) DRVR OPER OraclePreparedStatement.setObject(paramIndex=1, object)
    DRVR OPER OraclePreparedStatement.setObject(paramIndex=1, object, targetSqlType=12, scale=0)
    DRVR OPER OraclePreparedStatement.setString(paramIndex=1, x=1000270)
    Binding param 2: 1
    [805] (0) DRVR OPER OraclePreparedStatement.setObject(paramIndex=2, object)
    DRVR OPER OraclePreparedStatement.setObject(paramIndex=2, object, targetSqlType=4, scale=0)
    DRVR OPER OraclePreparedStatement.setInt(paramIndex=2, x=1)
    DRVR WARN DBError.findMessage(errNum, obj): returned No max length specified in defineColumnType
    SQLWarning: reason(Warning: No max length specified in defineColumnType) SQLstate(null) vendor code(17108)
    DRVR OPER OraclePreparedStatement.executeQuery()
    DRVR OPER OraclePreparedStatement.executeUpdate()
    DRVR OPER OracleConnection.getAutoCommit() returned false
    DRVR WARN DBError.findMessage(errNum, obj): returned No more data to read from socket
    SQLException: SQLState(null) vendor code(17410)
    java.sql.SQLException: No more data to read from socketNotice that the first Select DRVR log shows the bind params already substituted?
    what's the issue of no defined max length? That column is a Number(5) and the bind param is being
    set from an Integer.
    For the duplicate class issue, try searching the *.jpr file to see if somehow you have duplicate entries in there for the class it's complaining about. LOL, this is a good one. The first line in generated *Impl.java files is the package declaration.  If
    you bring up a java file and accidentally remove the first line, you'll get this odd error message.
    Duplicate class found for abc.class
    Thanks, curt

  • SQL Server 2000 Driver for JDBC - Error establishing sockets

    Hi there
    I am using Microsoft SQL Server 2000 Driver for JDBC to connect to SQL Sever 2000. It is just a test application to see if it would connect to the datacase successfully. But I got the following errors. I already set up the classpath and installed all SQL Server 2000 Driver for JDBC sp 3. Dont know why it still failed...can anyone help me out of this? Thanks.
    When i am using simple JDBC-ODBC bridge Driver it's working fine.
    For this Server Pack3 , i have checked every thing like--
    TCP / IP Poart is Enable.
    I am working in client machine, my MSSQLServer 2000 Placed in server Machine.
    when i am giving Telnet ServerIP 1433 it's giving following response.
    connecting to ServerIP ....... could not open connection to the host , on port 1433:connection Failed
    My Sample Code is :--
    String user="sa";
    String password="imcindia";
    Connection con1 = null;
    CallableStatement cstmt = null;
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
    con1=DriverManager.getConnection("jdbc:microsoft:sqlserver://ServerName:1433;DatabaseName=dmo1o2d",user,password);
    Statement st=con1.createStatement();
    st.execute("use dm0102d");
    st.execute("setuser 'dm01012'");
    cstmt = con1.prepareCall("{?=Call dms_ex_create_folder('ABC','18753','NB21','u')}");
    cstmt.execute();
    Here are Error Code :
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
         at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
         at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
         at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
         at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
         at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection refused: connect
         at java.sql.DriverManager.getConnection(Unknown Source)
         at TestConnection1.main(TestConnection1.java:24)
    one can help me to over come this problm,
    Thanks in advance.
    venkat

    hey i also have this problem i have been looking for solution for this problem for along time i tried every possible solution i tried every service pack for the SQL but it didn't connect to the port!!!
    it's a network problem ur java code is correct dont worry about it.
    finally i had to install MySQL and it's work fine now but if u insist on usning SQL u have to use the JDBC-ODBC Bridge it will work by :
    first add data source database , follow these steps
    1- go to Administrative tools
    2-Data Sources(ODBC)
    3-System DNS tab and add then choose SQL SERVER the last option then finish
    4-write the name; Note: this name is the one that u will write in ur URL for example if u write Hello the URL will be "jdbc:odbc:Hello"
    5- choose the server, its recommended to write "." or (local)
    6-change the database to its an important step to choose the database that u want to use, choose northwind if u want to use it
    finish
    second
    adding this code:
    import java.sql.*;
    class JdbcTest1 { 
    public static void main (String[] args) { 
    try { 
    // Step 1: Load the JDBC driver.
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    // Step 2: Establish the connection to the database.
    String url = "jdbc:odbc:Hello";
    Connection conn = DriverManager.getConnection(url,"user1","password");
    } catch (Exception e) { 
    System.err.println("Got an exception! ");
    System.err.println(e.getMessage());
    it will work without any problems

  • Error establishing socket (Microsoft SQL Server 2000 Driver for JDBC)

    I tray connect to MS-SQL2000 using JDeveloper and retrieve an error: "[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[Microsoft][SQLServer 2000 Driver for JDBC]PC160832\NCI_DBA_01"
    I followed the steps:
    1 - Install the JDBC Driver for MS-SQL2000
    2 - Create a new AddJavaLibPath :"AddJavaLibPath C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib"
    3 - Specify Default Project Libraries: "msbase.jar, msutil.jar and mssqlserver.jar"
    4 - Create a new connection: "Java class name: com.microsoft.jdbc.sqlserver.SQLServerDriver" "URL: jdbc:microsoft:sqlserver://PC160832\NCI_DBA_01:1433;SelectMethod=cursor"
    5 - Retrieve the error: "[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[Microsoft][SQLServer 2000 Driver for JDBC]PC160832\NCI_DBA_01"

    Were you able to resolve this? If so could you tell me how. I have the same problem.
    Thanks!!!

Maybe you are looking for

  • Can't speed up read-out-loud speed

    Hi, I'm experiencing the read-out-loud making long pause between words when it is activated. I tried with "Edit=>Preferences=>reading=>words per minute" but it didn't not really work. It only made each word being read faster, but it didn't shorten th

  • SENDER SERVER OFF-LINE

    Hi, experts! I have to implement a file to Idoc scenario. However, sender server can be off-line sometimes. How does file sender comm channel control this case? Would be a problem if sender server is off-line? or could sender CC get the file retrying

  • WRT-54G with a rouge's gallery of users

    I have an older revision 4 of the WRT-54G that I use as a hotspot/switch/router/etc. which it manages to handle suprisingly well. My internet connection is so fast it saturates the wireless users. On the wire I can get faster speeds as G maxes out at

  • Need list of recurring jobs in scheduler

    Hello, I need a list of all the reports scheduled. And the recurring jobs specific. I need also al the parameters one needs to fill in the form when scheduling a report (like: every thurstday, next runtime, to emailadress, etc etc). BO had the tool i

  • Service on ESS with display option

    Hi, We use ESS with EP. The service PZ03 & PZ28 for Bank information and Previous employer details respectively, when attached, provide change option to the employee. I have a requirement wherein i want them only in a display mode. Is there anyway th