Decimal equivalent of db2 in oracle

Hi
I have query in db2 which has decimal in bother operands
select decimal(fuelused)/decimal(fuelconsumed) from fuel.
can anyone please help me what would be the sql (oracle) equivalent for that.
Thanks
Smitha.

3. Week_ISO which gives week of the year.to_char(date_column, 'YYYYWW') is what I think is the equivalent. Check
SQL> ed
écrit fichier afiedt.buf
  1  select to_char(to_date('01012005','DDMMYYYY'),'YYYYWW'),
  2         to_char(to_date('01012005','DDMMYYYY'),'YYYYIW')
  3* from dual
SQL> /
TO_CHA TO_CHA
200501 200553
SQL> WW is week number from 1 (first january) to 53.
IW is ISO week number : in this case, there is an error, the 1st january 2005 is the 52d week of year 2004. Check the doc :
http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/sql_elements4a.htm#36369
Nicolas.

Similar Messages

  • Equivalent of DB2  functions in ORACLE 11g

    Hi,
    I am trying to convert the SQL queries written in DB2 to ORACLE. There are some db2 specific functions are used in the queries.I am not able to find the equivalent function in ORACLE. The function names are written below:
    1) DateDD()
    2) SELECT @@IDENTITY
    3) SELECT *
    FROM (
    SELECT ROWNUMBER() OVER() AS rowId_1, INNER_TABLE.*
    FROM (----)as innertable
    ) AS Outertable
    Error is: ROWNUMBER is INVALID identifier.
    4) DAYOFWEEK()
    5) DAYS()
    6) dayofyear()
    Please help me in finding the equivalent function in ORACLE.
    Thanks in advance!!

    You probably don't need a DateAdd function in Oracle. You can add a number to a date in Oracle-- that adds the number of days to the date.
    SELECT sysdate today, sysdate+1 tomorrow
      FROM dualWhy are you using DAYS()? If, as in the example, you're just trying to determine the number of days between two dates, you can subtract dates in Oracle and the difference will be a number of days (including a fractional component if applicable)
    SELECT date '2011-09-27' - date '2011-09-25' difference_in_days
      FROM dualIf you really need the number of days since January 1, 0001, you could subtract the date from Jan 1, 0001, i.e.
    SELECT date '2011-09-27' - date '0001-01-01'
      FROM dualI would assume that Oracle and DB2 would return the same number but there could well be some differences since the current calendar didn't exist in the year 1 and I know there were issues in the transition from the Gregorian to the Julian calendar where some days were decreed not to exist. It wouldn't shock me if Oracle and DB2 counted some of the days in the 1500's differently.
    Justin

  • DB2 to Oracle 11g migration

    Hi,
    We are migrating the siebel database from DB2 to Oracle 11g.
    While doing the migration, the following values are found for the siebel related tables on DB2.
    for example:
    CREATE TABLE S_SERVICE_SCRPT (
    ROW_ID NVARCHAR2(15) NOT NULL,
    CREATED TIMESTAMP(9) DEFAULT CURRENT TIMESTAMP NOT NULL,
    CREATED_BY NVARCHAR2(15) NOT NULL,
    LAST_UPD TIMESTAMP(9) DEFAULT CURRENT TIMESTAMP NOT NULL,
    LAST_UPD_BY NVARCHAR2(15) NOT NULL,
    MODIFICATION_NUM DECIMAL DEFAULT 0 NOT NULL,
    CONFLICT_ID NVARCHAR2(15) DEFAULT gx'00030' NOT NULL,
    NAME NVARCHAR2(75) NOT NULL,
    PROG_LANG NVARCHAR2(30) NOT NULL,
    REPOSITORY_ID NVARCHAR2(15) NOT NULL,
    Please can anybody provide inputs how to get the equivalent for these gx___ values on Oracle 11g.
    Many thanks in advance

    Found a suitable link at IBM:
    http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.sqlref/db2z_sql_declareglobaltemptable.htm
    gx is the hexadecimal graphic string constant - which is similar to our unistr function.
    Not sure which character is representated by 00030, but here's a method you can use to simply figure out the Oracle equivalent code point.
    First you need to figure out the DB2 character represented by the default value - let's assume it is '@'
    Assuming the NCHAR character set is UTF8 and the NLS character set is WE8MSWIN1252, then you can execute:
    select ascii('@') from dual;
    ASCII('@')
    64
    in SQL*Plus and you'll get the code point 64.
    Convert the 8bit code point to unicode using:
    SQL> select dump(convert(chr(64),'UTF8','WE8MSWIN1252'),16) from dual;
    DUMP(CONVERT(CH
    Typ=1 Len=1: 40
    and you can create the table with the default value represented by the hex value 0040:
    SQL> create table abc (col1 varchar2(20) default '@',
    2 col2 nvarchar2(20) default unistr('\0040'));
    Table created.
    SQL> insert into abc values (default,default);
    1 row created.
    SQL> select * from abc;
    COL1 COL2
    @ @

  • Migration data from SAP DB2 to Oracle 10g

    Hi , I am assigned to migrate data from SAP system which is using DB2 to Oracle 10g.I not very familiar with SAP. I hope someone can help me., especially for those familiar in SAP.
    Please help me.
    thanks
    jebatco

    Hello,
    just migrating a DB2 database to Oracle 10g might be an easy task. The Oracle Migration Workbench is the tool for such a migration:
    http://www.oracle.com/technology/tech/migration/workbench/index.html
    I have no idea about SAP, and that might complicate the picture. But there exist specialists for this task:
    Oracle Expertise in the SAP environment
    The Solution Center SAP Support and Service – located in Walldorf – offers SAP
    customers the following services:
    • Advanced Customer Services (ACS)
    • Performance Analysis and Tuning
    • Development of concepts for Backup/Restore/Recovery, and High Availability,
    Administration
    • Security concepts
    • Optimizing of ABAP/4 programs (performance improvement)
    • Migration service for customers, who want to use Oracle as the database for SAP
    applications (from Informix, MaxDB, DB2, or SQL Server to Oracle).
    • Migration services from “Oracle to Oracle” (e.g. Tru64 to HP_UX)
    • Integration-Products and –Services
    • Oracle Database: The Database of Choice for Deploying SAP Solutions
    This is taken from http://www.oracle.com/newsletters/sap/docs/ora4sap-db-of-choice.090213.pdf
    Best regards
    Wolfgang

  • IBM DB2 to Oracle Database Migration Using SQL Developer

    Hi,
    We are doing migration of the whole database from IBM DB2 8.2 which is running in WINDOWS to Oracle 11g Database in LINUX.
    As part of pre-requisites we have installed the Oracle SQL Developer 4.0.1 (4.0.1.14.48) in Linux Server with JDK 1.7. Also Established a connection with Oracle Database.
    Questions:
    1) How can we enable the Third Party Database Connectivity in SQL Developer?
    I have copied the files db2jcc.jar and db2jcc_license_cu.jar from the IBM DB2 (Windows) to Oracle (Linux)
    2) Will these JAR files are universal drivers? will these jar files will support in Linux platform?
    3) I got a DB2 full privileged schema name "assistdba", Shall i create a new user with the same name "assistdba" in the Oracle Database & grant DBA Privillege? (This is for Repository Creation)
    4) We have around 35GB of data in DB2, shall i proceed with ONLINE CAPTURE during the migration?
    5) Do you have any approx. estimation of Time to migrate a 35 GB of data?
    6) In-case of any issue during the migration activity, shall i get an support from Oracle Team (We have a Valid Support ID)?
    7) What are all the necessary Test Cases to confirm the status of VALID Migration?
    Request you to share the relevant metalink documents!!!
    Kindly guide me in-order to go-ahead with the successful migration.
    Thanks in Advance!!!
    Nagu
    [email protected]

    Hi Klaus,
    Continued with the above posts - Now we are doing another database migration from IBM DB2 to Oracle, which is very less of data (Eg: 20 Tables & 22 Indexes).
    As like previous database migration, we have done the pre-requirement steps.
    DB Using SQL Developer
    Created Migration Repository
    Connected with the created User in SQL Developer
    Captured the Source Database
    Converted Captured Model to Oracle
    Before Translation Phase we have clicked on the "Proceed Summary"
    Captured Database Objects & Converted Database Objects has been created under PROJECT section.
    Here while checking the status of captured & converted database objects, It's showing the below chart as sample:
    OVERVIEW
    PHASE               TABLE DETAILS          TABLE PCT
    CAPTURE               20/20                              100%
    CONVERT               20/20                              100%
    COMPILE                 0/20                                   0%
    TARGET STATUS
    DESC_OBJECT_NAME
    SCHEMANAME
    OBJECTNAME
    STATUS
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:ARG_I1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H0INDEX01:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H1INDEX01:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H2INDEX01:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H3INDEX01:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H4INDEX01:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H4INDEX02:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H5INDEX01:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H7INDEX01:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:H7INDEX02:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:MAPIREP1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:MAPISWIFT1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:MAPITRAN1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:OBJ_I1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:OPR_I1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:PRD_I1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:S1TABLE01:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:STMT_I1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:STM_I1:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    INDEX
    TRADEIN1
    SQLDEV:LINK:&SQLDEVPREF_TARGETCONN:null:TRADEIN1:INDEX:X0IAS39:oracle.dbtools.migration.workbench.core.ConnectionAwareDrillLink
    Missing
    We have seen only "Missing" in the chart, also we couldn't have any option to trace it in Log file.
    Only after the status is VALID, we can proceed with the Translation & Migration PHASE.
    Kindly help us how to approach this issue now.
    Thanks
    Nagu

  • For DB2 to Oracle conversion best practices

    My company is enhancing existing application adding newly J2ee web interface and database as DB2.I am new to J2EE. In future if we want to migrate my database to Oracle,which are the best things to do it now.
    Which J2EE framework is good in respecte JDBC connectivity and future migration of DB2 to Oracle? (Minimal changes at Migration Time)
    It is medium size application with 5000 users.Which are other best practises to follow in development keeping the migration in Mind. Thanks..

    Yes, you should login as system, create a user, appowner, or what ever you call it, and assign that user a default tablespace of 'USERS' or whatever tablespace you decide. Then, grant that user all the privileges to create objects, i.e., create table, create procedure, create synonym, etc, etc.
    Then, logout as system, login as appowner, and do all your object creation from there.
    A user is a set of credentials that allow you access to the system. It defines your identity and your privileges and authority to do various things. A schema is the set of objects owned by a particular user. As soon as a user owns at least one object, that implicitly defines his schema. It's not possible for a user to own or control multiple schemas. If you want multiple schemas, that's fine, but you'll need multiple users, and each user will manage his own schema.
    Hope that's clear,
    -Mark
    PS I strongly suggest you review the Concepts Guide, it really is quite good. It can be found here: http://download.oracle.com/docs/cd/E11882_01/server.112/e10713/toc.htm

  • Connect to DB2 from oracle 11g on windows 2008 server

    Hi Folks,
    I want to conenct to DB2 from oracle 11g using DB link.
    DB2 :
    user : db2user
    pwd : db2pwd
    database : db2database (OSBLDEV)
    able to connect to db2 server (installed on machine M1) using db2 client with above details from machine M2 (where oracle is installed).
    Oracle :
    user : orauser
    pwd : orapwd
    host : orahost
    port : 1521
    service : oraservice
    able to connect to oracle server using oracle sql developer with above details on Machine M2 (windows 2008 server)
    when i execute the query with database link
    select row_id from siebel.s_org_ext@OSBLDEV;
    I get the message : ORA-12154: TNS:could not resolve the connect identifier specified.
    could you pls check and let me know whether the below enteries are correct or not.
    Pls share if you have step by step connectivity from DB2 to oracle using DB link.
    1. I have created the Data source for DB2 - test successful
    create database link OSBLDEV
    connect to "db2user"
    identified by "ldb2pwd"
    using 'OSBLDEV';
    1. I have made the following entry in E:\oracle\product\11.1.0\db_1\hs\admin\initosbldev.ora
    HS_FDS_CONNECT_INFO = OSBLDEV
    HS_FDS_TRACE_LEVEL = 0
    2. I have made the following entry in E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN\tnsnames.ora
    OSBLDEV =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=orahost)(PORT=1521))
    (CONNECT_DATA=(SID=OSBLDEV))
    (HS=OK)
    3. I have made the following entry in E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN\listener.ora and releoaded the listner (lsnrctl reload)
    LISTENER =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=orahost)(PORT=1521))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
    SID_LIST_LISTENER=
    (SID_LIST=
         (SID_DESC = # this is the entry for HSODBC
         (SID_NAME = OSBLDEV)
         (ORACLE_HOME = e:\oracle\product\11.1.0\db_1)
         (PROGRAM = hsodbc)
    Thanks in advance.

    1. My listener.ora is placed at the below location:
    E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN
    2. I have modifed the listener and removed the entry - hsodbc
    3. stop and start the listener.
    still can't see the service entry in listener status.
    C:\>lsnrctl status
    LSNRCTL for 64-bit Windows: Version 11.1.0.7.0 - Production on 19-JUL-2010 02:27
    :08
    Copyright (c) 1991, 2008, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 64-bit Windows: Version 11.1.0.7.0 - Produ
    ction
    Start Date 19-JUL-2010 02:21:17
    Uptime 0 days 0 hr. 5 min. 52 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Log File e:\oracle\diag\tnslsnr\DALDEVDBCRM1\listener\alert\log
    .xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=daldevdbcrm1.corp.nai.org)(PORT=1521
    Services Summary...
    Service "+ASM" has 1 instance(s).
    Instance "+asm1", status READY, has 1 handler(s) for this service...
    Service "+ASM_XPT" has 1 instance(s).
    Instance "+asm1", status READY, has 1 handler(s) for this service...
    Service "ARIBADEV" has 1 instance(s).
    Instance "ariba", status READY, has 1 handler(s) for this service...
    Service "ARIBADEV_XPT" has 1 instance(s).
    Instance "ariba", status READY, has 1 handler(s) for this service...
    Service "ARIBAXDB" has 1 instance(s).
    Instance "ariba", status READY, has 1 handler(s) for this service...
    Service "aiad.corp.nai.org" has 2 instance(s).
    Instance "aiad1", status READY, has 2 handler(s) for this service...
    Instance "aiad2", status READY, has 1 handler(s) for this service...
    Service "aiadXDB.corp.nai.org" has 2 instance(s).
    Instance "aiad1", status READY, has 1 handler(s) for this service...
    Instance "aiad2", status READY, has 1 handler(s) for this service...
    Service "aiad_XPT.corp.nai.org" has 2 instance(s).
    Instance "aiad1", status READY, has 2 handler(s) for this service...
    Instance "aiad2", status READY, has 1 handler(s) for this service...
    Service "aianew" has 1 instance(s).
    Instance "aianew", status READY, has 1 handler(s) for this service...
    Service "aianewXDB" has 1 instance(s).
    Instance "aianew", status READY, has 1 handler(s) for this service...
    Service "aianew_XPT" has 1 instance(s).
    Instance "aianew", status READY, has 1 handler(s) for this service...
    The command completed successfully
    C:\>

  • Siebel Database migration from IBM DB2 to Oracle

    Hi ,
    We are planning to migrate Siebel / OBIEE db form the existing DB2 to Oracle db. Can some please help us, what are the points we need to consider.
    Also please let us know if you find any hurdles during the same.
    Regards
    Muni

    Hello Kumar
    Typically for Packaged Apps you don't have to migrate database objects like stored procedures, triggers, views etc as the app will have its own database specific seed schema. What needs to be migrated/ported is the customizations done to the app in the source environment and the transaction data to the target and ofcourse a thorough testing is recommended.
    So the migration process typically is :
    1. Install Siebel for Oracle (schema and data access layer).
    2. Implement customizations in Oracle.
    3. Migrate transaction data from source DB to Oracle.
    4. Test.
    Oracle has a group that can help with this process. Let me know and I will put you in touch with them.
    Regards
    Prakash

  • Connecting db2 from oracle

    hi,
    i)what is the cwbcfg program to be executed you have mentioned.
    ii) I executed caths.sql
    iii) In tnsnames.ora how to specify the dsn that you create for db2 database.
    for example if I have created a dsn for db2 naming it kishore_dsn, how do i specify that in tnsnames.ora file.
    and by what sid is the iniths_sid.ora to be created. is it the dsn you create for db2 database. for ex. if dsn name is kishore_dsn, should the file be initkishore_dsn.ora, or it should be the name of local oracle database service.
    DESIGN.FORESEEINDIA.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = compaq6)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = design)
    KISHORE_DSN =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = compaq6)(PORT = 1521))
    (CONNECT_DATA = (SERVICE_NAME = KISHORE_DSN)
    (HS = OK)
    I am getting ora-12154 tns could not resolve service name, while tring to access db2 after creating public links.
    I would appreciate if you can send me step by step generic connectivity ,connecting db2 from oracle.
    Prabhath.

    Hi Tak,
    Thanks for your response.
    My odbc data source name is : kishore_dsn
    driver : ibm db2 odbc driver
    I am connecting db2 8 on windows from oracle 9i on windows.
    MY iniths_sid.ora file is initdesign.ora
    initdesign.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 = KISHORE_DSN
    HS_FDS_TRACE_LEVEL = 0
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    I created listener.ora in network/admin
    # LISTENER.ORA Network Configuration File: c:\disk1\software\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC5))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = compaq6)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = c:\disk1\software)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = design)
    (ORACLE_HOME = c:\disk1\software)
    (SID_NAME = design)
    (SID_DESC =
    (SID_NAME = design)
    (ORACLE_HOME = c:\disk1\software)
    (PROGRAM = hsodbc) )
    my tnsnames.ora is
    # TNSNAMES.ORA Network Configuration File: c:\disk1\software\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    INST1_HTTP.FORESEEINDIA.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = compaq6)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = MODOSE)
    (PRESENTATION = http://HRService)
    EXTPROC_CONNECTION_DATA.FORESEEINDIA.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC5))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    DESIGN1.FORESEEINDIA.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = compaq6)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = design)
    DESIGN.FORESEEINDIA.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = compaq6)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = design)
    KISHORE.FORESEEINDIA.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = compaq6)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = design)
    (HS = OK)
    My sqlnet.ora file
    # SQLNET.ORA Network Configuration File: c:\disk1\software\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    NAMES.DEFAULT_DOMAIN = foreseeindia.com
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
    Before creating these files I had run caths.sql from sys user.
    After all the configuration
    I logged into database with service name : kishore
    user : scott
    I created a db link
    create database link custard
    connect to scott identified by tiger
    using 'kishore';
    I issued a select * from addr@custard; where addr is in remote db2 database.
    I am getting the following error
    ERROR at line 1:
    ORA-28546: connection initialization failed, probable Net8 admin error
    ORA-28511: lost RPC connection to heterogeneous remote agent using
    SID=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=compaq6)(PORT=1521))
    )(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=design)))
    ORA-02063: preceding 2 lines from CUSTARD
    I am struck with this for the past 1 week, so kindly help.
    If someone can access a tar from metalink and post it also, as currently we donot have the support.
    Regards,
    PrabhathG

  • Tools for migrating data from SAP DB2 to Oracle

    HI, someone please help regarding the topic mentioned above. Is there any tools that I can use to migrate the DB2 to Oracle
    Please help me
    Thanks
    -jebatco

    This is a very specialized area you are looking at. My recommendation is that you look at SAP sites on Oracle.com for assistance. There is also a SAP Migration white paper you can read and the Oracle/SAP site.
    Regards
    Sue

  • Define BINARY DATA column (DB2 to Oracle migration)

    Have a table where a column is defined as 'FOR BIT DATA'. This specifies that the contents of the column are to be treated as bit (binary) data. During data exchange with other systems, code page conversions are not performed. Comparisons are done in binary, irrespective of the database collating sequence.
    During conversion to Oracle using Oracle Migration Workbench, this table is converted irrespective of this definition. Please see below for details:
    DB2 table definition:
    CREATE TABLE ADMIN.XENCY (
              ID INTEGER NOT NULL ,
              XENCYSYMBOL CHAR(2) FOR BIT DATA NOT NULL ,
              IN TS_XENCY ;
    Oracle table definition as generated by OMWB:
    CREATE TABLE ADMIN.XENCY
    ( ID NUMBER(10,0) NOT NULL ENABLE,
    XENCYSYMBOL CHAR(2) NOT NULL ENABLE,
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE TS_XENCY;
    During data loading from DB2 to Oracle it fails for this table with the following error:
    Type: Error
    Time: 14-08-2006 18:21:02
    Phase: Migrating
    Message: Unable to migrate data from source table ADMIN.XENCY to destination table ADMIN.XENCY : ADMIN.XENCY; ORA-12899: value too large for column "ADMIN"."XENCY"."XENCYSYMBOL" (actual: 4, maximum: 2)
    For Oracle the length of the data in this column is 4; however for DB2 it is 2 only as shown below:
    $ db2 "select max(length(Xencysymbol)) from admin.Xency with ur"
    1
    2
    1 record(s) selected.
    $     
    The distinct contents of this table is as follows:
    $ db2 "select distinct Xencysymbol from admin.Xency with ur"
    XENCYSYMBOL
    x'0024'
    x'2020'
    2 record(s) selected.
    $
    How do I define a column as containing binary data in Oracle?
    Thanks in advance.

    The MWB DB2 LUW plug-in incorrectly translates CHAR FOR BIT. Doesn't particularly pay attention to any of the CHAR modifiers. It will just see that column as a CHAR. Obviously, this is a defect.
    Binary data of limited length is stored in RAW type columns in Oracle DB.
    You have two problems (in addition to issuing an ALTER COLUMN to fix the type delcaration or dropping, tweaking the table creation script and reloading. )
    1. The data extraction scripts utilized for that table have not properly encoded the data for transport between DB systems. If there are endian differences between he source and target platform there may be additional problems. Nominally, you can export the binary data in hex format.
    2. The SQL*Loader file needs to be adjusted. (if you dump in hex format, so the data in the file is characters of a hex value )
    XENCYSYMBOL CHAR : hextoraw( : XENCYSYMBOL)
    Loader will convert those hex characters back into RAW as it loads.
    [ The  built in data pump will not work obviously because the system thinks it is a CHAR. So offline data transfer is your only option.  ]

  • How to move sql server DB to oracle and DB2 to oracle

    Hi ,
    I would like to like to know what is the work involved when
    i want to retire sql server database and move to oracle and db2 to oracle.
    Please let me know the tools used for this purpose or wha should be done actually.
    Thanks in advance

    For the SQL Server migration you could use the SQL Developer utility. More details can be found at:
    http://www.oracle.com/technetwork/database/migration/index-084442.html
    This SQL Developer based migration utility also supports DB2 migrations when the Db2 database is a UDB DB2 V7, V8 or V9 and if it is running on LUW. For ALL other DB2 databases no actual migration utility is available. Possible alternatives might be Golden Gate, Oracle Database Gateway or the SQL*Loader utility.

  • How Do I.... DB2 To Oracle Daily Loads

    I need to upload DB2/AS400 data daily. This would be a piece of cake in SQL Server using DTS. But I don't know where to start in the Oracle world.
    I DONT want to export files daily from DB2 side & then FTP them to the Oracle/Sun box; it's been tried & there are too many failure points. Also, that would require tracking dozens of files (one for each query).
    I see some threads about database links using ODBC, but I'm on a Sun box. Is it still possible? Are there other connectivity options?
    Thanks much in advance

    John,
    DB2 to Oracle on a daily basis has different options, each with their own advantages/disadvantages:
    - Use Oracle's transparent gateways, that make the DB2 database look like an Oracle database to your Oracle database. Biggest pro: good performance. Biggest con: transparent gateways are seperately priced options on the database.
    - Use ODBC to connect Oracle to DB2. Biggest pro: free at the Oracle side. Biggest 2 cons: relatively slow performances and manual effort to set it up.
    - Generate files from DB2 and load those into Oracle. Biggest pro: simple. Biggest 2 cons: requires at least one more staging step, causing slower performance and is more difficult to manage.
    Hope this helps,
    Mark.

  • Migration from DB2 to Oracle issue

    Hi
    I'm migrating an old legacy system from DB2 to Oracle but have the following trouble:
    The queries that the app executes have some DB2-specific syntax such as DATE function, example:
    select * from TABLE where date_col > DATE('2010/01/01');
    The above query works on DB2 but not in Oracle (should be changed to use TO_DATE function but this is not possible initially)
    I could create a function in the Oracle db called DATE, something like:
    create function date (p_date varchar2) return date is
    begin
    return to_date(p_date)
    end date;
    create public synonym date for sys.date;
    But DATE is a reserved word and I can't use it as function name
    Do you know any way of making the above query work against an Oracle db or transforming the query text before being parsed?
    Thanks a lot in advance
    --Guillermo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    As you stated and mentioned in the manual:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10830/appb.htm
    DATE is a reserved word and thus you need to recode the statement. For example the migration utility is commonly adding an underscore to the function - and this requires again a recoding of the source statements.

  • How to Create a DataSource to DB2 in Oracle App Server 10g

    Dear All
    I have to connect to DB2 from Oracle Application Server 10g.
    If anyone knows how to connect to DB2 from Oracle App Server 10g.
    Pls advice me..
    With Regards
    Suresh

    Hi,
       Once u created a data source. go to respective application component which u have assigned ducring creatinon of DS in RSO2 and right click on it and use replicate metadata.
    a popup with options 1. as data source
                                   2. as 3.x data source will come u select 2 one here and go on.

Maybe you are looking for

  • TS3694 New itunes updates installation error message 0x800736FD. Has anyone encounter such problem before? appreciate your advice

    Hi guys I have this error message when installing new Itunes updates: HResult: 0x800736FD. Can anyone help me? thanks

  • HP Laserjet w Envelope Feeder

    Hi there, I have a power user who needs to print 50-100 envelopes a day. The HP Laserjet P4015 has a dedicated envelope feeder in tray #1, but we cannot seem to get that to work for more than a single envelope. The App is MS Word 2011, but the 2008 v

  • Odd address window behavior

    Mail Version 2.0.5 (746/746.2) This is how I have my Mail.app window arranged: I have the main Mail window open on the left, the address window on the right and the Activity Viewer window below the address window. If I right click > Edit Card on a na

  • CS6 Image Processor won't run

    My company just updated our systems to CS6. I use the batch processing of the Image Processor a LOT, day to day. Everytime I try to run it now, I get "There were no source files that could be opened by Photoshop". The folder is full of jpgs....which

  • Low on Memory?  Only using two apps?

    Hi, I'm experiencing, increasingly, "Low on Memory" warnings from Fireworks (8.0.0.777). This seems to happen when I have more than 1 PNG file open at a time, but also happens when I have DW and Fireworks open at the same time. In Task Manager, Firew