Connection setup from MSSQL through Oracle 11.2g

Hi folks,
I would like to query some data from MS SQL database through Oracle. In other forum I was pointed to Heterogenous Services, but unfortunatelly I'm having a problem with an initial set up.
Documentation I check:
http://docs.oracle.com/cd/E11882_01/server.112/e11050/admin.htm
http://docs.oracle.com/cd/B19306_01/server.102/b14232/admin.htm
Here is my scenario:
On the same server we are running Oracle database (11g release 11.2) and MS SQL (Microsoft SQL Server Express Edition (64-bit)).
Oracle database:
tnsnames.ora
# tnsnames.ora Network Configuration File: C:\Oracle\product\11.2.0\dbhome_dev\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
DEV =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER.AGT.local)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DEV)
HELIOS =
   (DESCRIPTION=
       (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER.AGT.local)(PORT = 1521))
       (CONNECT_DATA =
           (SERVICE_NAME = HELIOSDB)
       (HS = OK)
listener.ora
# listener.ora Network Configuration File: C:\Oracle\product\11.2.0\dbhome_dev\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER.AGT.local)(PORT = 1521))
ADR_BASE_LISTENER = C:\Oracle
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=HELIOSDB)
         (ORACLE_HOME=C:\Oracle\product\11.2.0\dbhome_dev)
         (PROGRAM=dg4odbc)
  )I'm not sure whether a listener part is configured correctly.
Also, what next should be done?
Where is defined a connection to MS SQL database?
Please guide me with this initial configuration if possible.
Kind regards,
Tomas

One more thing, as I made some modifications and maybe I skrewed it up :(
I've added 2 more SQL databases, so I modified my files as follows:
# tnsnames.ora Network Configuration File: C:\Oracle\product\11.2.0\dbhome_dev\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
DEV =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER.AGT.local)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DEV)
HELIOS =
   (DESCRIPTION=
       (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER.AGT.local)(PORT = 1521))
       (CONNECT_DATA =
           (SERVICE_NAME = HELIOSDB)
       (HS = OK)
HELIOSSRO =
   (DESCRIPTION=
       (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER.AGT.local)(PORT = 1521))
       (CONNECT_DATA =
           (SERVICE_NAME = HELIOSSRO)
       (HS = OK)
HELIOSFO =
   (DESCRIPTION=
       (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER.AGT.local)(PORT = 1521))
       (CONNECT_DATA =
           (SERVICE_NAME = HELIOSFO)
       (HS = OK)
    )            listener
# listener.ora Network Configuration File: C:\Oracle\product\11.2.0\dbhome_dev\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER.AGT.local)(PORT = 1521))
ADR_BASE_LISTENER = C:\Oracle
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=HELIOSDB)
         (ORACLE_HOME=C:\Oracle\product\11.2.0\dbhome_dev)
         (PROGRAM=dg4odbc)
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=HELIOSSRO)
         (ORACLE_HOME=C:\Oracle\product\11.2.0\dbhome_dev)
         (PROGRAM=dg4odbc)
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=HELIOSFO)
         (ORACLE_HOME=C:\Oracle\product\11.2.0\dbhome_dev)
         (PROGRAM=dg4odbc)
  )  created 2 init files initHELIOSSRO.ora and initHELIOSFO.ora
Configured ODBC for each database, like in previous example
Created 2 db links:
CREATE PUBLIC DATABASE LINK heliossro CONNECT TO "usersro" IDENTIFIED BY "sropwd" USING 'HELIOSSRO';
CREATE PUBLIC DATABASE LINK heliosfo CONNECT TO "userfo" IDENTIFIED BY "fopwd" USING 'HELIOSFO';but when I run query ORA-28545 occures
SQL> select * from dual@HELIOSDB;
select * from dual@HELIOSDB
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from HELIOSDB
SQL> select * from dual@HELIOSSRO;
select * from dual@HELIOSSRO
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from HELIOSSRO

Similar Messages

  • Heterogeneous system copy from MSSQL to Oracle

    Dear Experts,
    I have performed ABAP+JAVA system copy R3load based from Oracle to Oracle and MSSQL to MSSQL platform.
    Homogeneous system copy many times.
    But this is first time i am perfoming an Export from MSSQL source system with r3load Export method .....My Target system is havign Oracle 10.2.0.2 software installed along with installation prerequisites.
    But while Importing the same MSSQL Export ...I am not getting any option for heterogeneous system copy.
    I am running on ECC6.0 windows platform and i also have generated Migartion KEY.
    But where should i put this key.
    I have gone through system copy guide many times but unable to understand Exact options to follow to Migrate to Oracle target system. Appreciate if anyone can give me detail steps i need to carry on Target system
    Best Regards,
    AjitR

    Markus,
    Thanks for the help, i have done Export with mentioned way and this time DBSIZE.xml file got created under ORA directory ....i started installation at target system....It went smooth until phase Import java Dump Done. .....But during Post load activities It gave error...
    When i tried connectivity to Oracle database it works fine and
    R3trans -d gives below mentioned error....Looks like table does not exist....all ENV variables are also got set at target machine.....
    Error as below
    Now 'SAPSR3/<pwd>@TST' is connected (con_hdl 0, nls_hdl 0).
    4 ETW000                                                                             389  0.171885
    4 ETW000  [dev trc     ,00000]  Database NLS settings: AMERICAN_AMERICA.UTF8       23682  0.195567
    4 ETW000  [dev trc     ,00000]  Database instance TST is running on CSSLDELL-3 with ORACLE version 10.2.0.2.0 since 20080522
    4 ETW000                                                                            4056  0.199623
    4 ETW000  [dev trc     ,00000]  Connection 0 opened (DBSL handle 0)                14523  0.214146
    4 ETW000  [dblink      ,01299]  ***LOG BZA=>table SVERS      does not exist on database            [dblink#3 @ 1299]
    4 ETW000                                                                            8145  0.222291
    4 ETW000  [dev trc     ,00000]  NTAB: SELECT COMPCNT FROM DDNTT FAILED              1021  0.223312
    4 ETW000  [dev trc     ,00000]  NTAB: SELECT VERSION FROM DDNTT FAILED               520  0.223832
    4 ETW000  [dbntab.c    ,00000]  *** ERROR => NTAB: SELECT VERSION/DBASE FROM DDNTT FAILED
    4 ETW000                                                                             505  0.224337
    4 ETW000  [dbntab      ,01273]  ***LOG BZY=>unexpected return code 103        calling NTAB       [dbntab#3 @ 12737]
    Please help...Points rewarded anyways.....

  • Connection issue from sqldeveloper to Oracle Database 10g

    I have installed Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 on my machine having platform Windows vista
    Now i have install sqldeveloper but i am not able to connect to oracle databse.
    GETTING AN ERROR Network adapter could not make it connection
    after that i have tried to check listners.ora through tnsping orcl getting following result
    C:\Users\Kailas>tnsping orcl
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.3.0 - Production on 08-APR-2
    011 00:20:05
    Copyright (c) 1997, 2006, Oracle. All rights reserved.
    Used parameter files:
    E:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = kailasLa
    pi)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
    TNS-12541: TNS:no listener
    Please let me know What should i do i want to start my practice sessions on sqldeveloper
    I am new in Oracle pl/sql development
    Please guide me on this.........................

    SQLDeveloper 3.0 production is supplied with the thin driver 11.2.0.2
    it needs 11.2.0.2 version to use thick which has a few additional features over thin.
    To avoid confusion with other Oracle software you can set the ORACLE_HOME in the session you start sqldeveloper in as described below:
    The version mismatch is often because SQLDeveloper is trying to use the 'thick' driver and 11.2.0.2 thick is not available,
    try
    thin by:
    1/(uncheck Tools->preferences->Datababae->advanced->use OCI/thick driver, and
    2/If necessary, set ORACLE_HOME for your cmd.exe session where sqldev is started from to where sqldeveloper is where %ORACLE_HOME%\jdbc\lib exists, (so SQLDeveloper does not try your existing ORACLE_HOME) and
    3/If using connection type TNS, use Connection Type TNS -> Network Alias.
    4/You may need to set Tools->preferences->Datababase->advanced->Tnsname directory to the directory containing tnsnames.ora
    -Turloch
    SQLDeveloper Team

  • ORA-12154 Connection error from HFM to Oracle Database

    Hi,
    I am trying to configure Hyperion HFM but can write to HFM database.
    The implementation architecture:
    Hyperion 11.1.2.2 (with all the requiered patches for HFM, FDM, Shared Services, Workspace and Oracle Application Development)
    Server 1:
    Windows Server 2008 x64
    Installed products: Foundation (EPMA, CalcManager), BI, HFM web components and ADM driver
    Configured products: Foundation(EPMA, CalcManager), BI.
    Database Client: 11gR2 x64
    Server 2:
    Windows Server 2008 x64
    Installed products: HFM, FDQM
    Configured Products: FDQM, HFM
    Database Client: 11gR2 x32, 11gR2 x64 (x32 version installed first)
    Server 3:
    Database: Oracle 11.2.0.2
    All the products from server 1 are working fine, FDQM (server 2) is also working fine, but, when I try to do any action related with HFM database the system fails.
    I have tested the connection is these scenarios:
    1. SQLdeveloper: successfull!, I can create tables, views, etc. Double checking the user privileges it has all the required.
    2. tnsping: successfull!
    3. HFMApplicationCopy utility: Successfull using UDL file and writing the connection parameters.
    4. EPM System Configurator: the configurator successfully validates the database connection information, but does not create the tables on the database. No errors in the configtool log.
    5. EPM Diagnostic Tool: fails with this error message:
    ------------STARTING VALIDATION SCRIPTS----------
    LOGGING IN HFM....
    CREATING APPLICATION....
    ERROR: Unable to CreateApplicationCAS
    Number (dec) : -2147215936
    Number (hex) : &H800415C0
    Description  : <?xml version="1.0"?>
    +<EStr><Ref>{DC34A1FD-EE02-4BA6-86C6-6AEB8EF5E5A3}</Ref><AppName/><User/><DBUpdate>1</DBUpdate><ESec><Num>-2147467259</Num><Type>1</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>HfmADOConnection.cpp</File><Line>511</Line><Ver>11.1.2.2.300.3774</Ver><DStr>ORA-12154: TNS:could not resolve the connect identifier specified</DStr></ESec><ESec><Num>-2147215616</Num><Type>1</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxSQLConnectionPool.cpp</File><Line>585</Line><Ver>11.1.2.2.300.3774</Ver></ESec><ESec><Num>-2147215936</Num><Type>0</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxServerImpl.cpp</File><Line>8792</Line><Ver>11.1.2.2.300.3774</Ver></ESec><ESec><Num>-2147215936</Num><Type>0</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxServer.cpp</File><Line>90</Line><Ver>11.1.2.2.300.3774</Ver></ESec><ESec><Num>-2147215936</Num><Type>1</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxClient.cpp</File><Line>1356</Line><Ver>11.1.2.2.300.3774</Ver><PSec><Param><server_name></Param></PSec></ESec><ESec><Num>-2147215936</Num><Type>1</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxClient.cpp</File><Line>936</Line><Ver>11.1.2.2.300.3774</Ver></ESec><ESec><Num>-2147215936</Num><Type>0</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxClient.cpp</File><Line>4096</Line><Ver>11.1.2.2.300.3774</Ver></ESec></EStr>+
    Source       : Hyperion.HFMErrorHandler.1
    ERROR: while Application created
    7. HFM Classic application creation: fails with the following error:
    Error*11*<user_name+>*10/19/2012 08:30:52*CHsxServer.cpp*Line 90*<?xml version="1.0"?>+
    +<EStr><Ref>{DC34A1FD-EE02-4BA6-86C6-6AEB8EF5E5A3}</Ref><AppName/><User/><DBUpdate>1</DBUpdate><ESec><Num>-2147467259</Num><Type>1</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>HfmADOConnection.cpp</File><Line>511</Line><Ver>11.1.2.2.300.3774</Ver><DStr>ORA-12154: TNS:could not resolve the connect identifier specified</DStr></ESec><ESec><Num>-2147215616</Num><Type>1</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxSQLConnectionPool.cpp</File><Line>585</Line><Ver>11.1.2.2.300.3774</Ver></ESec><ESec><Num>-2147215936</Num><Type>0</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxServerImpl.cpp</File><Line>8792</Line><Ver>11.1.2.2.300.3774</Ver></ESec><ESec><Num>-2147215936</Num><Type>0</Type><DTime>10/19/2012 8:30:52 AM</DTime><Svr><server_name></Svr><File>CHsxServer.cpp</File><Line>90</Line><Ver>11.1.2.2.300.3774</Ver></ESec></EStr>+
    8. EPMA Application deployment: fails with same message.
    Please help me with some insights on this problem, I have tried everything but nothing works.
    Regards
    Edited by: Otein on 19-oct-2012 14:04

    Hi,
    I Have solved one of my problems, the one that keep HFM from connecting to the Oracle database.
    I just change the TNSNAMES.ORA, like this:
    Initial tnsnames.ora
    PRUEBA.WORLD=
    +(DESCRIPTION_LIST =+
    +(DESCRIPTION =+
    +(LOAD_BALANACE = ON)+
    +(FAILOVER = ON)+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = <server_name>)(PORT = <port>))+
    +)+
    +(CONNECT_DATA =+
    +(SERVICE_NAME = <service_name>)+
    +)+
    +)+
    +)+
    Modified tnsnames.ora
    PRUEBA.WORLD=
    +(DESCRIPTION =+
    +(LOAD_BALANACE = ON)+
    +(FAILOVER = ON)+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = <server_name>)(PORT = <port>))+
    +)+
    +(CONNECT_DATA =+
    +(SERVICE_NAME = <service_name>)+
    +)+
    +)+
    I Just delete the line "+(DESCRIPTION_LIST =+" and its corresponding closing parenthesis, I did this cause in the configuration utility log I saw this line:
    +TNS parsing: Entry: DESCRIPTION_LIST [[Address: Protocol:(TCP) Host:(<server_name>) Port:(1521) SID:(<service_name>)]]+
    So, if the applications were trying to connect to connection descriptor DESCRIPTION_LIST, the driver could not recognize DESCRIPTION_LIST as a valid one.
    There is a lot going on behind the scenes when you work with Oracle Database as the repository, maybe there is some other way to address this issue, but it worked for me, hope it can help you too.

  • Loading ntext data from MSSQL into Oracle - field locations vary

    Good afternoon/evening everyone
    I'm looking for a practical solution to a data migration issue I am running into. Here's the detail.
    1. Source database is Microsoft SQL Server 2008 R2
    2. Destination database is Oracle 11g R2.
    3. Migration strategy: Use MSSQL Management Studio Export Wizard to export all tables into flat files and then use SQL*Loader to load into Oracle.
    Sounds easy...Here's the problem I'm running into:
    1. Several tables have ntext data.
    2. The location of ntext attribute within the table varies by table.
    3. The number of ntext attributes in the source table varies by table.
    4. I'm using a field delimiter to split the data.
    What I am running into:
    1. There is nothing within the data for the ntext field that is common that would allow me to use a CONTINUEIF to cause the multiple physical records to be concatenated into a logical record.
    2. The number of physical records very for creating the logical record.
    3. Other data exists after each ntext attribute that is either ntext or non-ntext data.
    What I'm looking for:
    1. Would like to use SQL*Loader, if possible; otherwise I'll write a PL/SQL procedure to read the data, row for row, and load it into the appropriate fields.
    2. Looking for ideas from the Forum experts to provide some Control File syntax that would accomplish what I'm trying to do. I'm out of ideas.
    I would appreciate some assistance and some ideas if you have any.
    Thanks in advance
    Stephen Karniotis
    [email protected]

    is this what you are looking for?
        select replace('this a text with\X0D\X0Ain it', '\X0D\X0A', chr(13) || chr(10)) from dualyou can do the replace directly when loading by putting "replace(:fieldname, '\X0D\X0A', chr(13) || chr(10))"
    next to the field in the controll file you use with sql*loader (including the " signs). Or you can use it in an update statement.
    greetings
    Freek D

  • Getting Exception in jdbc connection got from DataSource in Oracle AS

    Hi
    i am using data source in my application.
    When my application is invoked it gets the jdbc connection from the data source, performs set of operations and then releases the connection.
    But if the application is invoked after a long time e.g. 10 hours then i get the following exceptions which i have logged:
    Io exception: Connection reset
    and the other exception is given below:
    Closed Connection
    The data-sources.xml is as follows:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
    <data-source
    name="MYDS"
    class="oracle.jdbc.pool.OracleConnectionCacheImpl"
    location="jdbc/myDSCON"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="xxxxxxxx"
    password="xxxxxxxx"
    url="jdbc:oracle:thin:@localhost:1521:orcl"
    inactivity-timeout="30"
    max-connections="100" >
    <property name="cacheScheme" value="1" />
    </data-source>
    </data-sources>
    Please let me know what is wrong with my application or configuration setting or something is wrong with oracle application server.

    Hi,
    I found one solution which is for 10.1.2.x and i am using Oc4j 10.1.3.1 but solution is below
    Solution
    There is a new setting called "ValidateConnections" from 10.1.2.x. This setting will make sure to check the validity of the connections before it is assigned to the application.
    1. Download and apply the patch for unpublished bug 4305639 for your current 10.1.2.x version. If a patch is not already available then please submit a backport request to get the patch to your version.
    2. Set the command line option "-DValidateConnections=true" and restart the container. This can be set via EM AS control or by manually updating opmn.xml file. After the changes the options should look like
    <process-type id="oc4j_test1" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="java-options" value="-server -Djava.security.policy=/opt/oracle/jw101202/j2ee/oc4j_test1/config/java2.policy -Djava.awt.headless=true -DValidateConnections=true" />
    <data id="oc4j-options" value="-properties"/>
    Regards,

  • JDeveloper 10.1.3.*-Not fetching tables to Connection Navigator from MSSQL

    I am not able to see the tables from JDeveloper 10.1.3.3 under Connection Navigator. Where as using SQL worksheet I could query them.
    Same can be seen from JDeveloper 10.1.2 from under Connection Navigator.
    Appreciate your help

    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.bc4j%7Cforeign_db%7Cbc_psqlserver~html/
    ADF BC4J with SQL Server has some limitations.
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtAnchor.ms/vtTopicFile.bc4j%7Cforeign_db%7Cbc_aforeigndblimitations%7Ehtml/

  • EWA RFC connection SETUP - From Customer system to VAR solution Manager

    Hi,
    we are going to setup the EWA for our customers. So how I have to create the RFC from the customer system to our Solution Manager?
    Thanks
    Andrea

    >
    Andrea Taccolini wrote:
    > we are going to setup the EWA for our customers. So how I have to create the RFC from the customer system to our Solution Manager?
    Hi Andrea,
    Have you already tried to use SMSY to generate the "Back" Destination from customer system to your SolMan?
    Once you have selected the customer system in SMSY, you are able to use the RFC connection wizard.
    Alternatively, you can define the RFC destination manually.
    For easier tracking and trouble shooting, I would recommend to setup a communication user in your SolMan for each individual connected managed customer system.
    Assign the appropiate profiles to the user in your SolMan system and create the RFC destination in the managed customer system.
    Best regards,
    Ruediger

  • Data from mssql to oracle

    Hi
    need to configure Tg4msql , databaseis 11G 11.2.0.1.0 on windows
    How do i configure TG4msql on 11G
    Thanks

    This is the forum for Oracle' SQL Developer tool. You would do better asking your question in the Heterogeneous Connectivity Forum. Heterogeneous Connectivity
    You should also try reading the manual http://tahiti.oracle.com

  • Converting SQL from MSSQL to Oracle

    Hi,
    I have the following sql written in TSQL. I wanted to convert it into SQL so that i can use it in oracle.
    select distinct DT_APPROVAL_GRP,dbo.MagicToDbBoolean(DT_MUST_BE_APPVD) as DT_MUST_BE_APPVD,DT_REVIEW_INTERVAL,DT_REVIEW_UNIT,
    case DT_APPROVAL_GRP
    when ' ' then '[NoGroup]'
    else DT_APPROVAL_GRP
    END + '['+cast(dbo.MagicToDbBoolean(DT_MUST_BE_APPVD) as varchar) + ']' +'[' cast( DT_REVIEW_INTERVAL  as varchar) ']' +'[' + cast(DT_REVIEW_UNIT as varchar)+']' as ReviewModelCode from dt_document_Type, ag_approval_group WHERE (AG_NAME = DT_APPROVAL_GRP or DT_APPROVAL_GRP=' ' );
    Thanks in advance.
    Muneer

    Hello
    Case is more flexible than decode as you have more comparison operators at your disposal and you can combine multiple conditions in a single test, although for numbers and dates you can use decode with SIGN(arithmetic expression). You can nest decodes(as with case), but they can sometimes be difficult to understand if they're not formatted properly.
    I have been told that decode is faster than case, but I haven't personally benchmarked it, so it could well be one of the many myths.
    HTH

  • Migrating from mssql to oracle or postgres to oracle

    I have a database driven web application written in J2EE. Currently this application works with Microsoft SQL 7.0 and Postgres 7.3. It uses various datatypes and also has many stored procedures. I will be migrating actual data, table definations and stored procedures.
    Can you please tell me whether to go for MS SQL to oracle migration or postgresql to oracle?

    Hi Margaret,
    The Oracle Migration Workbench MS SQL Server 7 plugin will migrate your MS SQL Server 7 schema, stored programs and data to Oracle. You can freely download the Migration Workbench from the Migration Technology Center on OTN at http://otn.oracle.com/tech/migration/content.html.
    Currently the Migration Workbench does not support migrations to postgres.
    I hope this helps,
    Tom.

  • Dataporting from SQL to Oracle

    I m facing problem to port data from MSSQL to Oracle through Export wizard of MSSQL. The wizard is doin porting in Oracle, but when I am selectin any ported object in Oracle, its givin error:'object or view doesn t exist'.
    Any one have solution?

    You could always check ifthe tables do exist & who are their owners by
    select * from user_tables
    and then enclosing the table name in quotes like "table_name" should work.
    The other round about way could be copy these created objects to another tables and then use the copied tables.
    Thanks
    Amit

  • Connectivity issues from Oracle to Sybase

    Friends.
    I have connectivity issue from Oracle 9.2.0.1 to Sybase 12.5 ASE .I am connecting through the database link in oracle to access the tables.
    The error message i am getting :
    select count(*) from TEST_TABLE@IND_TEST;
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    523 80
    ORA-02063: preceding 2 lines from IND_TEST
    Please guide me how to solve this error message. is it version incompatible now?
    Thanks
    Rocky

    Hi,
    You are now making the connection to the Sybase database but there is a problem with the user and password used in the database link.
    Sybase is case sensitive for names so you need to surround the user/password in double quotes to make sure they are passed to Sybase in the correct case -
    create database link ind_test connect to "sybuser" identified by "sybpass" using 'tnsnames_ora_entry' ;
    where sybuser is the userid as created in Sybase with the password sybpass.
    If they were setup in Sybase in mixed case then it would be -
    create database link ind_test connect to "Sybuser" identified by "Sybpass" using 'tnsnames_ora_entry' ;
    Regards,
    Mike
    Edited by: mkirtley on Sep 27, 2011 12:55 PM

  • Sending message from oracle to middleware through oracle messaging gateway

    Hi,
    I am very new to oracle AQ and oracle messaging gateway. I am actually trying to propagate a message from oracle to middleware through oracle messaging gateway.
    I have created the link between oracle messaging gateway and middleware(IBM Websphere).
    1.*Created an object type with a single attribute of type sys.xmltype*.
    create or replace type xpctas_type as object(payload sys.xmltype);
    2.*Created a qtable with payload type as xpctas_type, a queue and started the queue.*begin
    dbms_aqadm.create_queue_table(
    queue_table => 'xpctas_qtab',
    queue_payload_type => 'xpctas_type',
    multiple_consumers => TRUE
    dbms_aqadm.create_queue(queue_name =>'xpctas_q',
    queue_table => 'xpctas_qtab',
    max_retries => 16);
    dbms_aqadm.start_queue('xpctas_q');
    end;
    3.*Created a transformation that converts user defined type xpctas_type to messaging gateway canonical type sys.MGW_BASIC_MSG_T.*
    For this I created a function that converts xpctas_type to messaging gateway canonical type sys.MGW_BASIC_MSG_T.
    CREATE OR REPLACE FUNCTION APPS.order_2_basic(my_order in xpctas_type)
    RETURN sys.mgw_basic_msg_t
    IS
    v_xml XMLTYPE;
    v_text varchar2(4000);
    v_clob CLOB;
    v_basic sys.mgw_basic_msg_t;
    text_body sys.mgw_text_value_t;
    header     sys.mgw_name_value_array_t;
    BEGIN
    v_xml := XMLTYPE.createXML(my_order,NULL,NULL);
    v_basic := sys.mgw_basic_msg_t.construct;
    header := sys.mgw_name_value_array_t(sys.mgw_name_value_t.construct_integer('MGW_MQ_characterSet','1208'),
    sys.mgw_name_value_t.construct_integer('MGW_MQ_priority', '7'));
    IF(LENGTH(v_xml.getstringval())>0 AND LENGTH(v_xml.getstringval())<=4000) THEN
    v_text := v_xml.getStringVal();
    text_body := sys.mgw_text_value_t(v_text,NULL);
    ELSE
    dbms_lob.createtemporary(v_clob,TRUE,dbms_lob.session);
    v_clob:=v_xml.getClobVal();
    text_body := sys.mgw_text_value_t(NULL,v_clob);
    dbms_lob.freetemporary(v_clob);
    END IF;
    v_basic:=sys.mgw_basic_msg_t(header,text_body,NULL);
    RETURN v_basic;
    END order_2_basic;
    begin
    dbms_transform.create_transformation(
    schema => 'apps',
    name => 'order_to_basic',
    from_schema => 'apps',
    from_type => 'xpctas_type',
    to_schema => 'sys',
    to_type => 'mgw_basic_msg_t',
    transformation => 'Apps.order_2_basic(source.user_data)');
    end;
    4.     Registered a foreign queue.
    declare
    v_options sys.mgw_properties;
    gv_mq_queue_name VARCHAR2(32);
    begin
    gv_mq_queue_name := 'MB.O2C.SOFTWARESOLUTION';
    v_options := sys.mgw_properties(
    sys.mgw_property('MQ_openOptions', '2066') );
    dbms_mgwadm.register_foreign_queue(
    name => 'destq', -- MGW foreign queue name
    linkname => 'mqlink', -- name of link to use
    provider_queue => RTRIM(gv_mq_queue_name), -- name of MQSeries queue
    domain => dbms_mgwadm.DOMAIN_QUEUE, -- single consumer queue
    options => v_options );
    end;
    5.     Added a subscriber with transformation.
    begin
    dbms_mgwadm.add_subscriber(
    subscriber_id => 'sub_aq2mq', -- MGW subscriber name
    propagation_type => dbms_mgwadm.outbound_propagation,
    queue_name => 'apps.xpctas_q',
    destination => 'destq@mqlink',
    transformation => 'apps.order_to_basic');
    end;
    6.     Added a scheduler
    begin
    dbms_mgwadm.schedule_propagation(
    -- schedule name
    schedule_id => 'sch_aq2mq',
    -- outbound propagation
    propagation_type => dbms_mgwadm.outbound_propagation,
    -- AQ queue name
    source =>'apps.xpctas_q',
    -- MGW foreign queue with link
    destination =>'destq@mqlink');
    -- The remaining fields currently not used by MGW
    end;
    7.     Enqueued a user defined data type into the qtable.
    declare
    l_xmlstring varchar2(2000);
    l_payload sys.xmltype;
    my_order xpctas_type;
    enqueue_options DBMS_AQ.enqueue_options_t;
    message_properties DBMS_AQ.message_properties_t;
    msgid RAW( 16 );
    v_num Number;
    begin
    SELECT '<?xml version="1.0" encoding="UTF-8" ?>
    <Q1:XXRFG_PRCS_CNCT_TO_ASSETS_STG xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/XXRFG_PRCS_CNCT_TO_ASSETS_STG" version="3.0.0" verb="Create" locale="en_US.UTF-8" delta="false">
    <Q1:STAGING_ID>221</Q1:STAGING_ID>
    <Q1:SW_INSTANCE_ID>18595755</Q1:SW_INSTANCE_ID>
    <Q1:MC_INSTANCE_ID>194734</Q1:MC_INSTANCE_ID>
    <Q1:OPCO>NUK</Q1:OPCO>
    <Q1:RELATIONSHIP_FLAG>N</Q1:RELATIONSHIP_FLAG>
    <Q1:RELATIONSHIP_TYPE>Connected To</Q1:RELATIONSHIP_TYPE>
    <Q1:ObjectEventId />
    </Q1:XXRFG_PRCS_CNCT_TO_ASSETS_STG>'
    INTO l_xmlstring
    FROM dual;
    SELECT XMLTYPE(l_xmlstring)
    INTO l_payload
    FROM dual;
    my_order:=xpctas_type(l_payload);
    dbms_output.put_line(my_order.payload.getstringval());
    DBMS_AQ.enqueue( queue_name => 'APPS.xpctas_q',
    enqueue_options => enqueue_options,
    message_properties => message_properties,
    payload => my_order,
    msgid => msgid
    COMMIT;
    END;
    As soon as I enqueued the message the subscriber picked the message and sent it to middleware. I found the below message in the middleware
    MD            ÿÿÿÿ      ¸  MQSTR         AMQ HBU473QC61  PTÀ+H^                                                                            HBU473QC61                                      mqm                                                                                                        2012112109335869                                       ÿÿÿÿ
    *<XPCTAS_TYPE><PAYLOAD><Q1:XXRFG_PRCS_CNCT_TO_ASSETS_STG xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/XXRFG_PRCS_CNCT_TO_ASSETS_STG" version="3.0.0" verb="Create" locale="en_US.UTF-8" delta="false">*
    *<Q1:STAGING_ID>221</Q1:STAGING_ID>*
    *<Q1:SW_INSTANCE_ID>18595755</Q1:SW_INSTANCE_ID>*
    *<Q1:MC_INSTANCE_ID>194734</Q1:MC_INSTANCE_ID>*
    *<Q1:OPCO>NUK</Q1:OPCO>*
    *<Q1:RELATIONSHIP_FLAG>N</Q1:RELATIONSHIP_FLAG>*
    *<Q1:RELATIONSHIP_TYPE>Connected To</Q1:RELATIONSHIP_TYPE>*
    *<Q1:ObjectEventId/>*
    *</Q1:XXRFG_PRCS_CNCT_TO_ASSETS_STG>*
    *</PAYLOAD></XPCTAS_TYPE>*
    It has some junk data in the begining. How can I remove this junk data?? Any help provided on this would be of great help.
    Experts on oracle mesaging gateway and AQ, Please help.
    Thanks & Regards,
    Sachin

    Hello,
    your setup of the message gateway seems to be ok.
    Did you check the corresponding versions of the client libraries (*.jar) ? These are the libraries on
    db server side (e.g. aqapi.jar, based on your CLASSPATH entries in file "mgw.ora") and for the IBM MQ jars.
    Kind regards,
    WoG

  • How to connect to excel document at network machine through oracle ?

    Hello !
    I am able to read excel doc at my local drive through sqlplus(oracle).
    Please help me to modify steps to access excel docs at network machine.
    steps:->
    1) start\settings\control\panel\administartive tolls\data source odbc\system dns\driver for microsoft excel (*.xls)\dns source at my local drive.
    2)C:\oracle10g\product\10.2.0\db_1\hs\admin\initNITIN.ora
    # This is a sample agent init file that contains the HS parameters that are
    # needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO = TESTDS
    HS_FDS_TRACE_LEVEL = 0
    #HS_FDS_TRACE_FILE_NAME = aetna_xls.trc
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    3) adding one more listener in listner.ora
    SID_LIST_HSODBC_LISTENER =
         (SID_LIST=
              (SID_DESC=
              (SID_NAME=NITIN)
              (ORACLE_HOME=C:\oracle10g\product\10.2.0\db_1)
              (PROGRAM=hsodbc)
    HSODBC_LISTENER =
         (DESCRIPTION_LIST =
         (DESCRIPTION =
         (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1555))
    4) entry in tnsnames.ora
    ABC.SCF.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1555))
    (CONNECT_DATA =
    (SID=NITIN)
    (HS=OK)
    5)lsnrctl stop listner
    6) listner start HSODBC_LISTENER
    Starting tnslsnr: please wait...
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
    System parameter file is C:\oracle10g\product\10.2.0\db_1\network\admin\listener
    .ora
    Log messages written to C:\oracle10g\product\10.2.0\db_1\network\log\hsodbc_list
    ener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1555)))
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1555)))
    STATUS of the LISTENER
    Alias HSODBC_LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 30-JUN-2007 12:30:25
    Uptime 0 days 0 hr. 0 min. 3 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle10g\product\10.2.0\db_1\network\admin\listene
    r.ora
    Listener Log File C:\oracle10g\product\10.2.0\db_1\network\log\hsodbc_li
    stener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1555)))
    Services Summary...
    Service "NITIN" has 1 instance(s).
    Instance "NITIN", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    7)create database link test
    connect to "ben"
    identified by joe
    using 'ABC.SCF.COM';
    8)SQL> select * from all_objects@testin;
    OWNER OBJECT_NAME S OBJECT_ID
    DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_ T S T G S
    Sheet1$ 0
    0 TABLE 30-JUN-07 30-JUN-07
    Sheet2$ 0
    0 TABLE 30-JUN-07 30-JUN-07
    Sheet3$ 0
    0 TABLE 30-JUN-07 30-JUN-07
    My queries are :
    1)Is it possible to connect to a document at network
    if yes then for , do i need to map a drive.
    please explaqin how what changes required to make it possible to read a network excel documnet through oracle.
    Thanks in Advance
    --Ajay                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Justin ,
    Thanks for your prompt reply ...
    I have mapped network machine folder to X:\
    now I can access this on my local machine by x:\
    And dsn it pointing to document on x:\
    then i tried to connect , but got an error.
    SQL> select * from all_objects@testin;
    select * from all_objects@testin
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC Excel Driver] '(unknown)' is
    not a valid path. Make sure that the path name is spelled correctly and that
    you are connected to the server on which the file resides. (SQL State: S1009;
    SQL Code: -1023)
    ORA-02063: preceding 2 lines from TESTIN
    Do I need need any other changes in above confiiguration..
    or create link statement need to be modified...
    SQL> create database link testin
    2 connect to "SCF\ben"
    3 identified by "joe"
    4 using 'ABC.SCF.COM';
    please suggest

Maybe you are looking for

  • IF Condition in Calculated Key Figure .

    Hi,    can anyone can tell the syntax for using "If Statement in Calculated key figure ".

  • A question about waits

    Hi, We are on Oracle 10.2.0.4 on Solaris 10. In my awr report I have the following among top five top wait event: Wait event SQL*Net more data to client 14,022,144 3,758 0 17.7 Network Edited by: orausern on Apr 15, 2010 5:07 AM

  • What is the name space in SAP.

    Hi sapers, What is name space in sap, What is does.

  • Function Outputs showing as Text in PowerPivot Tables

    Hello, I am working with some survey data that has some hierarchical aspects to it, so I have been plugging the results into Power Pivot tables so that I can do my reporting through Power View. Since the data comes back as a count for the number of t

  • How to maintain a history for Name of the Company

    Hi folks! A cliente have need to maintain a history of the Name of the Company (field T001-BUTXT) because they are intending to change the name of their company. It is needed to show the old name in reports until certain date. E.g.: 08/30/08: until t