Ms sql server linked server with OraOLEDB.Oracle provider session handling

Hi everyone!!
Here's my situation:
I have a MS SQL Server 2008 R2 with a linked server to Oracle via OraOLEDB.Oracle provider.
I use a .net application to open a connection to my sql-server, execute a select that collects data through the linked-server-connection from the oracle database and after that I close to connection to the sql.
It does work so far,
but when I start my application, exit it proberly and start it again it seems that i get the same session as before (which is for some reasons very bad).
Is that the right/normal behavior?
Is there any way to avoid that?!
How does the OraOLEDB.Oracle provider handle the sessions if used in/as a linked server?
thanks and greetings,
exoc
Edited by: 944414 on Jul 4, 2012 5:43 AM

Hii Rouann,
Does the error occur when you call the stored procedure from SSIS package and map SSIS variables to the parameters in the stored procedure? Can you run the store procedure from SSMS properly? If you can run the stored procedure from SSMS, the issue seems
to occur due to the date format mismatch between the SSIS variables and the parameters in the stored procedure.
If you cannot run the stored procedure from SSMS as well, the issue should occur due to the incorrect data conversion within the store procedure itself as Tom mentioned.
Regards,
Mike Yin
TechNet Community Support

Similar Messages

  • How to migrate an existing Microsoft SSIS deployment if it is decided to replace SQL Server with an Oracle database?

    Hi Oracle Gurus!
    Currently, I am designing an ETL solution that transforms and loads a lot of data from flat files and sends it to an SQL Server 2008 R2 database for storage. However, at a future point of time, it may be decided to add or even replace SQL Server with an Oracle 11g database.
    Currently, I am writing script transforms in C# to dynamically generate SSIS packages to tansform and load the data into SQL Server. But considering that in future, an Oracle 11g or 12c database might be added to, or replace the SQL Server database, how do I make my script transforms (or whatever else I am developing currently for SQL Server) reusable to the extent possible?
    Or more precisely, what steps do I take, from an Oracle point of view, to ensure that any future migration of data to an Oracle database would be smooth to the extent possible?
    Looking up to my Oracle Gurus for enlightenment in this matter!
    Novice Kid

    When you're writing your on C# code to load data into the SQL Server you have to modify the routines so that they will work with Oracle.
    One approach is to use the extproc agent which would allow you to directly call external programs with all the logic in it to perform the load of your files and to put the data into the Oracle database. Another option would be to use utl_file package (or equivalents) which will allow you to open external files from your Oracle database and to directly read its content and then to pass it to the related tables.

  • Problems with oraOLEDB.Oracle Provider

    Hello,
    I recently installed the oraOLEDB.Oracle Provider with no issues. When using an oledbdatareader from a .net app we are receiving weird results when pulling more than 100 records from Oracle 8 database. The reader outputs unreadable data after the 100 record. Interestingly enough this only happens when we select individual fields for example select user_id from users. When we do select * from users everything is fine. Also In this particular database the encoding is UTF8. When we pull from another Oracle 8 instance with no encoding we receive no distorted results. Anybody ever encountered or heard of anything like this?
    thanks in advance,
    jim.

    Your procedure has a single OUT parameter ... and yet it appears you are trying to stuff something into it ... that is never going to work. Additionally everything else about your stored procedure would have gotten you a FAIL grade were you been in my beginning PL/SQL class.
    The syntax, a cursor loop, is obsolete and has been for more than 10 years.
    The formatting and use of case makes even the few lines written hard to read.
    And either no commit ever takes place or you are trying to do incremental commits in origseq: Both of which are bad practice.
    This code should use BULK COLLECT to collect all relevant records into an array and then pass the array to origseq ... no loops ... and end with a commit.
    Demo here: http://www.morganslibrary.org/reference/array_processing.html

  • Installed SQL Server with license key provided by Microsoft still it showing expiry date after 6 months

    I Installed Sql Server 2008 in my Windows 2008 Server everthing good but after installed when i check expiry date of SQL SERVER using query its showing after 180 Days my Sql will be expiry.
    Did i done any mistake while installed or do i want to any activation process after installation of Sql Server.
    Please any one get back with reply. I looking forward for a reply.
    Its an emergency basis.

    Hi,
    It look like you install the evaluation version:
    http://msdn.microsoft.com/en-us/sqlserver/bb671064.aspx
    [Personal Site] [Blog] [Facebook]

  • Oracle 10g connectivity with sql server 2000 through oracle transpa gateway

    dear gurus.
    i am to connecto oracle 10g with sql server 2000 through oracle transparent gateway.
    i have installed transparent gateway and proper configured. also link is created.
    but when i execute query "select * from city@inventory" , so an error displayed.
    ORA-12500: TNS:listener failed to start a dedicated server process.
    kindly suggest me what could be the cause.
    regards,

    if the listener fails to spawn a dedicated server process it is commonly indicating an issue with the listener. So posting the listener and also a listener trace including a description of the env where you installed the gateway into which directory would be helpfull. Please keep also in mind if you have for example a 10.2.0.3 database and you install into this directoty a 10.2.0.1 gateway you have to reapply the patchset again do get consistent file version.
    So please describe more detailed your env.

  • How do SQL server 2000 and Oracle linked?

    Hi,
    How do SQL server 2000 and Oracle linked?
    Thanks in Advance
    Baloch.

    use the like to setup ODBC and datasource
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    and then create link server in sql server after you test conenction with oracle

  • Oracle equivalent for MS Sql Server WITH(NOLOCK)

    Hi all :-)
    What is the equivalent of MS Sql Server WITH(NOLOCK)
    hint in Oracle ... or ... how can I achieve the same
    effect in Oracle SELECT queries ?

    = dirty read .
    to the op : read the concepts guide before going further; Oracle implements a different concurrency model than SQL Server

  • SQL Server with Oracle

    Hello All,
    I am trying to invoke the SQL Server database from Oracle for which I have done the following:
    1) Created DSN for SQL Server database
    2) Created the init<DSN Name>.ora file under <oracle home>\database as follows:
    HS_FDS_CONNECT_INFO = sharepoint
    HS_FDS_TRACE_LEVEL = OFF
    3) Created a listener entry as follows:
    sharepoint =
    +(ADDRESS_LIST=+
    +(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))+
    +(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))+
    SID_LIST_sharepoint=
    +(SID_LIST=+
    +(SID_DESC=+
    +(SID_NAME=sharepoint)+
    +(ORACLE_HOME = <path>)+
    +(PROGRAM=hsodbc)+
    +)+
    +)+
    4) Added a new TNS entry in tnsnames.ora file as follows:
    sharepoint =
    +(DESCRIPTION=+
    +(ADDRESS=+
    +(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))+
    +(CONNECT_DATA=(SID=sharepoint)))(HS=OK)+
    I have created a DBLink in Oracle database using the new tns name.
    When I try to access a table using DBLink in Sql plus / Toad I am getting the following error:
    ORA-02068: Following severe error from sharepoint
    ORA-03135: connection lost contact.
    I have confirmed whether the listener is up and also I got OK result using tnsping.
    My windows firewall is off (as of now) and also I have no entry to timeout in SQLNET.ORA file.
    Am I missing something here.
    Please help me out.
    Regards,
    Anoop

    I can only comment on the SQLSever gateways I had to install recently, maybe some of these notes will jog your memory.
    Assuming you have installed the gateway on the SQLServer server with just the defaults.
    I notice your pfile is called init{DSN}.ora. I named mine initdg4msql{SQLSvrDBname}.ora
    The FDS info line was: HS_FDS_CONNECT_INFO={servername}//{SQLSvrDBName}
    ( This assumes the default SQLServer TCP port is being used, else syntax is different. )
    The gateway listener.ora config for mine was:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1800))
    (ADDRESS = (PROTOCOL = TCP)(HOST = serverhostname )(PORT = 1800))
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=dg4msql{SQLSvrDBName})
    (ORACLE_HOME=D:\oracle\product\11.1.0\tg_1)
    (PROGRAM=dg4msql)
    Rgds

  • Help with translating SQL query from SQL Server syntax to Oracle syntax

    Hi,
    is it someone that can help me translate following SQL query from SQL Server syntax to Oracle syntax.
    SELECT ID,
    [LMT(MTR)] = MAX(case when TYPE = 'LMT' then VALUE end),
    [AAD(KGM)] = MAX(case when TYPE = 'AAD' then VALUE end),
    [VOL(MTQ)] = MAX(case when TYPE = 'VOL' then VALUE end)
    FROM yourtable
    GROUP BY ID
    Your help is highly appreciated, thanks in advance.

    Like this,
    SELECT ID,
    MAX(case when TYPE = 'LMT' then VALUE end) LMT_MTR,
    MAX(case when TYPE = 'AAD' then VALUE end) AAD_KGM ,
    MAX(case when TYPE = 'VOL' then VALUE end) VOL_MTQ
    FROM yourtable
    GROUP BY ID-Arun

  • I am trying to have access tables of the Sql Server through the Oracle

    I am trying to have access tables of the Sql Server through the Oracle and this being occurred the error:
    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 HSMSQL
    I created the ODBC with name HSMSQL.
    I made all the configurations in the archives
    tnsnames.ora:
    HSMSQL=
    (DESCRIPTION=
    (ADDRESS= (PROTOCOL = tcp)(HOST = wsus)(PORT = 1521))
    (CONNECT_DATA =
    (SID = HSMSQL)
    (HS = OK)
    listener.ora:
    (SID_DESC = (SID_NAME=HSMSQL)
    (ORACLE_HOME= C:\oracle\ora92)
    (PROGRAM =hsodbc)
    initHS_SID.ora:
    HS_FDS_CONNECT_INFO = HSMSQL
    HS_FDS_TRACE_LEVEL = OFF
    -- Create database link
    create database link HSMSQL.US.ORACLE.COM
    connect to TESTE identified by TESTE2
    using 'HSMSQL';
    But when I execute query the error occurs:
    Select * from TabTeste@HSMSQL
    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 HSMSQL
    Please they help me, thanks, Paulo.

    Hi,
    It seems that your configuration is Ok. By the way, the workaround for this error is:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Transparent gateway for ODBC][H001] The environment variable <HS_FDS_CONNECT_INFO> is not set.
    * Set HS_FDS_CONNECT_INFO in the hs{sid}init.ora file to the data source name.
    Example: HS_FDS_CONNECT_INFO = <ODBC DataSource Name>
    * Make sure the hs{sid}init.ora file exists in the ORACLE_HOME/hs/admin directory and has the same name as the SID in the LISTENER.ORA.
    Example: If SID=hsodbc in the listener.ora file, then the hs{sid}init.ora file would be named ORACLE_HOME/hs/admin/inithsodbc.ora
    For more information see if this [url http://forums.oracle.com/forums/thread.jspa?forumID=61&threadID=576975]thread can help you.
    Cheers

  • Error while Viewing SQL Server data from Oracle

    Dear Friends,
    I am using Oracle10g XE.
    I have made a connection to view or insert data in SQL Server Database from Oracle.
    I  have done all the things with the help of below link.
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    Everything worked fine. but when i run below query
    select "EmployeeNo" from hrtattendance@mysqlserverdsn
    it gives an error which is mentioned below
    ERROR at line 1:
    ora-28545: error diagnosed by Net8 when connecting to an agent
    Unable to reteieve text of  NETWORK/NCR MESSAGE 65535
    ORA-02063: preceding 2 lines from MYSQLSERVERDSN
    Please help. I will be thankful.
    Regards,

    Dear Klaus,
    Here u go.
    C:\>C:\oraclexe\app\oracle\product\10.2.0\server\bin\hsodbc
    Oracle Corporation --- TUESDAY   JUN 24 2014 16:28:20.146
    Heterogeneous Agent Release 10.2.0.1.0 - Production  Built with
       Driver for ODBC
    C:\>C:\oraclexe\app\oracle\product\10.2.0\server\bin\tnsping MYSQLSERVERDSN
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-JUN-2
    014 16:28:33
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    Used parameter files:
    C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT
    =1522)) (CONNECT_DATA=(SID=MYSQLSERVERDSN)) (HS=OK))
    TNS-12541: TNS:no listener
    C:\>C:\oraclexe\app\oracle\product\10.2.0\server\bin\lsnrctl status LISTENERMYSQLSERVERDSN
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-JUN-2014 16:28
    :48
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       32-bit Windows Error: 61: Unknown error
    Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       32-bit Windows Error: 2: No such file or directory
    C:\>
    Regards,

  • Connect SQL Server 2008 in Oracle BI EE

    Hi all,
    Am very very new to Oracle BI and i want to know how to connect my local SQL server database in Oracle BI EE to create new reports.
    Thanks ,
    Sathish

    Sathish,
    See the below link will helpful to you,
    1. Step 6). Create RCU using Repository Creation Utility 11.1.1.3.3 software. from
    http://www.bisptrainings.com/2011/11/obiee-installation-11g-using-ms-sql.html
    2. http://www.skurabigroup.com/blog/?p=745
    If you face ODBC Driver Error with SQL Server
    1. http://total-bi.com/2011/05/obiee-11g-strange-odbc-driver-error-with-sql-server/
    2. http://danishhotta.com/?p=179
    Thanks,
    Balaa...

  • Access SQL-Server Data from Oracle 10gXE

    Hello,
    I want to access sql-server data from oracle 10g XE. I need the same functionality provided by Sql-server by Linked Servers, by which we can query on any data source(oracle, Excel, Access).
    do, Oracle 10gXE provide us with same functionality ???
    any pointers ???

    Yes, it does work with Express Edition.
    Here is a thread from the XE forum with examples.
    Re: Database Link to MS Access
    They refer to a MS Access database, but the procedure is the same.
    Doug

  • Transfer tables from sql server 2008 to oracle 11g

    Hi ,
    I have to transfer 2-3 tables (5 Lacs records each) from sql server 2008 to oracle Ent. 11g (platform Linux)
    i have to upload data with some conditions.
    not allowed to install oracle client on sql server for link server. i can get data in csv file
    which will be the best possible way
    1) using Db link on oracle server
    2) get data into csv file and load using SQL loader
    3) get data into csv and load using external table
    4) using tool - sql developer
    Thanx,

    user10188639 wrote:
    Hi ,
    I have to transfer 2-3 tables (5 Lacs records each) from sql server 2008 to oracle Ent. 11g (platform Linux)
    i have to upload data with some conditions.
    not allowed to install oracle client on sql server for link server. i can get data in csv file
    which will be the best possible way
    1) using Db link on oracle server
    2) get data into csv file and load using SQL loader
    3) get data into csv and load using external table
    4) using tool - sql developer
    Thanx,
    >which will be the best possible way
    which metric measures best? is higher or lower value better?
    How will you, I or anyone recognize which option is best solution?

  • Convert Sql server Storeprocedure to Oracle Storeprocedure

    Hi I vant to convert a sql server storeprocedures to oracle storeprocedure .
    I need a convertor if anybody know a aplication that performed it please tell me.

    Hi Hoek,
    I have tried this:
    1. Get the DATETIME into a VARCHAR2 variable.
    2a. Then, I use a TIMESTAMP variable and TO_TIMESTAMP like this:
    v_tmst := TO_TIMESTAMP (r_typ.date1, 'DD.MM.YYYY HH24');2b. Or the function CAST:
    v_tmst := CAST (r_typ.date1 AS TIMESTAMP);Same result, I lose the HH:MI:SS.FFF just in the moment the DATETIME from SQL Server is copied into an Oracle VARCHAR2 variable.
    I also read the article you linked (I also read it before I wrote the 1st posting, but not with deep detail).
    I'm afraid this cannot help me, or at least I'm not able to find out how.
    They talk about ODI, but I'm not using that tool.
    Moreover, they talk about creating a table, but they don't say anything regarding the conversion itself and how to get the miliseconds.
    Don't know whether there is something I can take from here or not.
    Anyway, thank you for the repply.
    Francisco.
    Edited by: FranBlanes on 30.08.2012 04:27

Maybe you are looking for

  • New iPad 3 stuck after iOS 6.0.1 download

    I have a new iPad 3 right out of the box.  Being aware of the software update needed to 6.0.1, I did that immediately.  I initially tried to sync via iTunes (I have an iMac) and when update was completed and iTunes synched, the ipad freezes on the gr

  • How to make inactive ABAP Program in production system

    Dear Expert, I have a lot abap program in production system which are not used anymore and my company plan to upgarde our SAP system, therefore to reduce the effort for the SAP upgarde I will  deactivate the unused ABAP program. My question how to ch

  • Lightroom open in elements editor raw question.

    I have just got lightroom 3.3 and it imports my .dng raw files no problem. if I use the save metadata  to file  and try to open in elements editor it open the file as a .tiff. instead of opening it as a raw file with ACR. I think the roblem is the me

  • GTK L&F Font size

    Using j2sdk 1.4.2_03 on Mandrake Linux and KDE. When I enable the GTK L&F just about every text using the default font is about twice as big as it should be. This version of the SDK should have this bug fixed according to release docs. My xserver DPI

  • Can Credit Memo be booked against an Invoice?

    While raising a Credit Memo is it possible to refer or link the Credit memo being raised to the Invoice?