Database migration to another server

I have one production oracle 10g database on RHEL4 and I want to migrate the data with another server RHEL4.
I have an RMAN backup.
Is it sufficient the 2 commands
rman> restore database;
rman> recover database;
to migrate the data in the second server?
Thanks

Why don't you duplicate the source database on the target.
Subject: Oracle10G RMAN Database Duplication
Doc ID: 259694.1
HTH
Anand

Similar Messages

  • Restore database noarchivelog to another server in ASM

    I have to migrate a database 10g with noarchivelog with filesystem to another server with ASM.
    Could you help me to do it?
    Thanks.

    ok, I put the database in archivelog but I don`t understando the link "http://www.oracleflash.com/10/How-to-migrate-Oracle-datafiles-to-ASM-storage-via-RMAN.html".
    First, I have moved the database to the new server, now I have the database with filesystem but in the final server with archivelog. OK.
    The steps are:
    first, I have to modify the parameters of db_create_file_dest, etc, to +ASM.
    I hve to shutdown the database, open nomount, restore controlfile and backup as copy.
    Is it correct?,
    one question, the restore controlfile, I suppose that I have to have a previous backup with filesystem of controlfile?
    Thanks.

  • MDM DB Migration to Another server (OS may change for DB)

    Hi MDM Expert
    We are currently using MDM 5.6 SP06 with HA (Microsoft Cluster) Active/Passive.
    DB and MDM both are running on same machine
    Now we want to move our Database to another server (OS May change on target DB).Please note we just want to move DB only not MDM Server component
    After DB move to another server we also wanted to have DB in HA, i mean Active/Passive and i know we need additonal to make it HA
    Can you please refer us any document which will help us for accomplish this requirement?
    Also let us know if there will be any negative implication on MDM Servers component after moving DB to another server
    We are also using Oracle failsafe for MDM HA configuration
    I really need expert help here
    Thanks in advance
    Thanks
    Deelip

    Hello Augusto,
    if i understood you correct only the host of the database is changed. The ABAP and JAVA instances are still running on the same host as before?
    If yes then this is pretty easy ... you can shutdown and copy the database with scp/rsync .. or if you have a shared storage you can just remap the disks to the new server.
    As you described, that the hostname of the DB host will change you have to do 2 things
    1) Change hostname of entries in tnsnames.ora (for more information about tnsnames check sapnote #562403)
    2) Change the host connection entry in the secure store of the Java instance (http://help.sap.com/saphelp_nwpi71/helpdata/de/ec/9432d189c445cdacdc7e520981b4b6/content.htm / Database Schema password should be change or not)
    Regards
    Stefan

  • EBS database migrate to exadata server.

    Hi Experts,
    My EBS database is 11.2.0.3. I'm going to migrate EBS database to exadata server. Please advise what patches need to be applied on exadata server for EBS database migration?
    Thanks & Regards,

    Hello Angela,
    I think what you're looking for is in My Oracle Support document ID 1392527.1 "Oracle E-Business Suite Release 11i & R12 Patches Required with Oracle Database 11g Release 2 (11.2.0) on Exadata".  It has a detailed list of patch requirements for different combinations of EBS and database versions.
    Cheers,
    Marc

  • How slow - if database is on another server?

    Hello,
    I want to create a French version of my website.
    The original - creme-de-languedoc .com is on a server in
    Texas. Which is great for a .com. The French one is on a server in
    France, which I'm told is better for .fr sites when Google.fr is
    concerned.
    Although the pages and images are all on the French server,
    the database behind the site is still in Texas.
    So far, the pages with dynamic data are loading very slowly.
    Is this because the data is on another server in another country?
    If so, what's the best way to speed things up? The DB is
    added to daily, so I don't want to really have to update a copy of
    it constantly on the French server.
    Any ideas?
    Thanks,
    - Greg

    Greg,
    I don't know if Replicate would work for your purposes or
    not.
    > Another option for keeping copies of your MySQL database
    files is
    > /replication/. Replication is having a complete
    duplicate of a
    > database server running in an alternative (usually
    remote) location.
    >
    > The alternative location runs another copy of the MySQL
    server and
    > uses a duplicate set of the database files. The primary
    MySQL server
    > is considered the /master/. All database activity
    transpires on the
    > master server (in other words, this is the server your
    Web application
    > should point to). The alternative MySQL server is the
    /subordinate/.
    >
    > A subordinate MySQL server connects to the master server
    and monitors
    > SQL statements placed in the log file. The subordinate
    server reads
    > the master server's log file and duplicates each
    statement to the
    > subordinate log file. You can have any number of
    subordinate MySQL
    > servers duplicating data from a single master server.
    >
    > Each subordinate server synchronizes the statements in
    its log file
    > with the master copy. If a subordinate server is offline
    for a period
    > of time, the next time it contacts the master it resyncs
    the log file,
    > adding all of the statements necessary to become
    up-to-date.
    >
    > This makes replication ideal for storing a remote copy
    of the MySQL
    > database. The subordinate copy is often very close to a
    real-time
    > backup of the master database.
    One obvious caveat is that your subordinate server must only
    allow
    SELECT access. Probably some DB guru's will rip-me-a-new-one
    for even
    suggesting such a thing. Oh well, food for thought. Check our
    MySQL.com and read up on Replicate, then ask someone there if
    this is
    pure folly.

  • Database Restore on another Server

    Could someone please explain to me (or point me in the right direction) the procedure (How-To) on how to restore a database to another server?
    please understand I'm just learning oracle and this is all new to me.
    e.g., I have good backups of a database. I restore those database files (control files, dbf, redo logs) to another server. What are the steps in bringing that database up online on a different server?
    ...thanks

    Read thread
    how to clone a database
    Always serach forum.oracle.com, beofre open new thread.
    Cheer,
    Virag Sharma

  • Database Migration MS Sql Server 2008 to Oracle

    I have downloaded the latest updates for SQL Developer and am attempting to migrate my SQL Server 2008 DB to Oracle 11g. I get the following error when attempting to test my Sql Server connection:
    Status : Failure - Test failed: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
    After attempting and following several posts, I have been unsuccessful in getting past this error - I have downloaded and placed in the specified directories the various .dll's suggested....
    Any help is of course appreciated.

    Boy do I look foolish. I told this guy that the owners of the application answer questions here... suerly he would get a reply.
    Such is the problem with "free" software. No one to blame when it doesn't work.

  • Database migrating to secondary server

    I have 3 servers in my Exchange 2013 deployment with 2 being the primary database holders for my 2 active databases and the 3rd server being a failover for either.  One of my databases is now activating itself on the failover even after I manually activate
    it back on its primary holding server.
    I am not seeing any events or warnings that would cause this so I am somewhat perplexed as to why the DAG is shifting it off to the failover.  I have verified that the activation preference numbers for the database on the 2 servers is set correctly
    and that there is not an issue with low hard drive space.

    Hi,
    First, please check if the affected database is in healthy state. You can use the Get-MailboxDatabaseCopyStatus | fl cmdlet to check status information about database. Here is an article which can help you, please refer to
    Monitoring Database Availability Groups.
    Please check the cluster and application log on the Mailbox server which the failover database locate in to see if there is any clues.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Siebel database migration from Sql Server 2005 to Oracle 11g RAC.

    Hi,
    We would like to migrate our Siebel database from Sql Server 2005 to Oracle 11g RAC. Can you suggest the best way to do that ?
    The current configurations are:
    Application : Siebel
    database : SQL Server 2005
    The hardware can be changed if needed. Can you please suggest the best approach ?
    Thanks,
    Naveen.
    Edited by: Naveen Kumar C on Mar 18, 2011 9:10 PM
    Edited by: Naveen Kumar C on Mar 18, 2011 11:44 PM

    Hi Naveen,
    We would like to migrate our Siebel database from Sql Server 2005 to Oracle 11g RAC. Can you suggest the best way to do that ?You will need much more which suggestions.
    You will need a Siebel professional which has done this type of migration. Migrating the Database is not a task so hard, after migrating your environment should be functional and healthy it is usually the task problematic.
    The hardware can be changed if needed. Can you please suggest the best approach ?We can recommend the minimum recommended, but this documentation already does, you need to do a analysis on your environment and ask a vendor Siebel tell the which is recommended for you and how to find the best "number" for you, in your case is very hard because everything changes.
    Check this Step-by-Step
    Migrating a Microsoft SQL Server Database to Oracle Database 11g
    http://st-curriculum.oracle.com/obe/db/hol08/sqldev_migration/mssqlserver/migrate_microsoft_sqlserver_otn.htm
    Regards,
    Levi Pereira

  • DataBase Migration from SQL server 2005 to SQL server 2012

    What are the challenges and steps to be taken care for proper migration of the Database.
    Applications are using the Visual Studio 2012.
    saikalyan

    Few things that I can think of -
    Verify all logins and users are migrated correctly.
    Some of the SQL Server 2005 features/code could be deprecated in SQL Server 2012. Changes could be required before or after migration.
    Some of the queries could have different performance (better or worse) on 2012 due to changes in query optimizer.
    The applications/SSIS/DTS config files are updated to use the new server/instance name.
    DNS alias names from the old servers (if used) are moved to the new server to have minimal impact on connection strings.
    Plan for downtime of applications and batch processes.
    Notify developers about the migration and the new server name(s)
    - Aalam | (Blog)

  • How to connect to a MySQL database in another server

    Dear friends,
    I am using Oracle SQL Developer 1.5.3 and I need to connect to a MySQL database located in another server.
    I am trying to create a new connection, informing connection name, username and password. Supposing that "Hostname" is the IP server address, I click on "Choose database", but I always receive the following error message: "Status : Failure - Cannot connect to MySQL server".
    Please tell me what I should do to solve this situation. Thanks in advance.
    Best regards,
    Franklin

    You need to configure your mysql database to accept connection from your PC for the user you used.
    For example,
    GRANT ALL ON *.* TO 'someuser'@'somehost';
    FLUSH PRIVILEGES;

  • Database Migration issue

    hi all
    i need your help
    i have completed my Database Migration from sql server 2008 to Oracle 11g
    i got a very diffrent kind of issue:
    Mgrated database
    SQL SERVER 2008 to ORACLE 11g
    using SQL DEVELOPER 3
    and when completed with all compilation and cross check
    i generated DATABASE Script
    by
    Database export Wizard
    Format: insert
    Line Terminator: enviroment default
    Save :as single file
    Encoding: Cp1252
    <<<<what is the meaning of these attributes like format,encoding.....etc....>>>>>>>
    and recreate in Oracle 11g,10g (on another machine)
    where i got so many errors
    most of time :
    Error(48,13): PLS-00905: object DBO_PMS_DB.SQLSERVER_UTILITIES is invalid
    SQLSERVER_UTILITIES is invalid
    how to resolve this issue?
    please help me out
    thanks
    Rajneesh

    h2. part 2
    temp_exp := REPLACE(temp_exp, '()', '(1)');
    IF TO_NUMBER(REGEXP_SUBSTR(temp_exp, '[[:digit:]]{2,4}$')) < 100 THEN
    IF TO_NUMBER(REGEXP_SUBSTR(temp_exp, '[[:digit:]]{2,4}$')) > 50 THEN
    temp_exp := REGEXP_REPLACE(temp_exp, '([[:digit:]]{2,4})$', '19' || '\1');
    ELSE
    temp_exp := REGEXP_REPLACE(temp_exp, '([[:digit:]]{2,4})$', '20' || '\1');
    END IF;
    END IF;
    format_str := '(DD) MON YYYY';
    ELSIF REGEXP_INSTR(temp_exp, '[-/\\.]') <> 0 THEN -- numeric date format
    -- require the setting for SET FORMAT to determine the interpretation of the numeric date format,
    -- default is mdy
    IF REGEXP_INSTR(temp_exp,
    -- e.g. 4/15/1996 or 15/4/1996 or 4/96/15
    '^([[:digit:]]{1,2})[-/\.]([[:digit:]]{1,2})[-/\.]([[:digit:]]{2,4})$') = 1 THEN
    temp_exp := REGEXP_REPLACE(temp_exp,
    '^([[:digit:]]{1,2})[-/\.]([[:digit:]]{1,2})[-/\.]([[:digit:]]{2,4})$',
    '\1/\2/\3');
    ELSIF REGEXP_INSTR(temp_exp,
    '^([[:digit:]]{1,2})[-/\.]([[:digit:]]{2,4})[-/\.]([[:digit:]]{1,2})$') = 1 THEN
    -- e.g. 15/96/4
    temp_exp := REGEXP_REPLACE(temp_exp,
    '^([[:digit:]]{1,2})[-/\.]([[:digit:]]{2,4})[-/\.]([[:digit:]]{1,2})$',
    '\1/\3/\2');
    ELSIF REGEXP_INSTR(temp_exp,
    '^([[:digit:]]{2,4})[-/\.]([[:digit:]]{1,2})[-/\.]([[:digit:]]{1,2})$') = 1 THEN
    -- e.g. 1996/4/15 or 1996/15/4
    temp_exp := REGEXP_REPLACE(temp_exp,
    '^([[:digit:]]{2,4})[-/\.]([[:digit:]]{1,2})[-/\.]([[:digit:]]{1,2})$',
    '\2/\3/\1');
    END IF;
    -- first component
    temp_val := TO_NUMBER(SUBSTR(temp_exp, 1, INSTR(temp_exp, '/') - 1));
    IF temp_val > 31 AND temp_val < 100 THEN
    format_str := 'YYYY/';
    IF temp_val > 50 THEN
    temp_exp := '19' || temp_exp;
    ELSE
    temp_exp := '20' || temp_exp;
    END IF;
    ELSIF temp_val > 12 THEN
    format_str := 'DD/';
    ELSE
    format_str := 'MM/';
    END IF;
    -- second component
    temp_val := TO_NUMBER(SUBSTR(temp_exp, INSTR(temp_exp, '/') + 1, INSTR(temp_exp, '/', 1, 2) - INSTR(temp_exp, '/') - 1));
    IF temp_val > 31 AND temp_val < 100 THEN
    format_str := format_str || 'YYYY/';
    IF temp_val > 50 THEN
    temp_exp := REGEXP_REPLACE(temp_exp, '/([[:digit:]]{2,4})/', '/19' || '\1/');
    ELSE
    temp_exp := REGEXP_REPLACE(temp_exp, '/([[:digit:]]{2,4})/', '/20' || '\1/');
    END IF;
    ELSIF temp_val > 12 THEN
    format_str := format_str || 'DD/';
    ELSE
    IF INSTR(format_str, 'MM') > 0 THEN
    format_str := format_str || 'DD';
    ELSE
    format_str := format_str || 'MM/';
    END IF;
    END IF;
    IF INSTR(format_str, 'MM') = 0 THEN
    format_str := format_str || 'MM';
    ELSIF INSTR(format_str, 'DD') = 0 THEN
    format_str := format_str || 'DD';
    ELSE
    IF TO_NUMBER(REGEXP_SUBSTR(temp_exp, '[[:digit:]]{2,4}$')) < 100 THEN
    IF TO_NUMBER(REGEXP_SUBSTR(temp_exp, '[[:digit:]]{2,4}$')) > 50 THEN
    temp_exp := REGEXP_REPLACE(temp_exp, '([[:digit:]]{2,4})$', '19' || '\1');
    ELSE
    temp_exp := REGEXP_REPLACE(temp_exp, '([[:digit:]]{2,4})$', '20' || '\1');
    END IF;
    END IF;
    format_str := format_str || '/YYYY';
    END IF;
    END IF;
    END IF;
    IF format_str IS NOT NULL THEN
    RETURN TO_DATE(temp_exp, format_str);
    ELSE
    RETURN TO_DATE(temp_exp, 'DD-MON-YYYY HH24:MI:SS');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN NULL;
    END str_to_date;
    FUNCTION convert_(p_dataType IN VARCHAR2, p_expr IN VARCHAR2, p_style IN VARCHAR2 DEFAULT NULL)
    RETURN VARCHAR2
    IS
    v_ret_value VARCHAR2(50);
    v_format VARCHAR2(30);
    v_year_format VARCHAR2(5) := 'YY';
    v_format_type NUMBER;
    v_numeric_dataType BOOLEAN := TRUE;
    v_is_valid_date BINARY_INTEGER := 0;
    BEGIN
    IF INSTR(UPPER(p_dataType), 'DATE') <> 0 OR INSTR(UPPER(p_dataType), 'CHAR') <> 0 OR
         INSTR(UPPER(p_dataType), 'CLOB') <> 0 THEN
         v_numeric_dataType := FALSE;
    END IF;
    IF NOT v_numeric_dataType THEN
         SELECT NVL2(TO_DATE(p_expr), 1, 0) INTO v_is_valid_date FROM DUAL;
         END IF;
         IF (str_to_date(p_expr) IS NOT NULL OR v_is_valid_date != 0 ) THEN
         IF p_style IS NULL THEN
    v_ret_value := TO_NCHAR(p_expr);
    ELSE -- convert date to character data
    v_format_type := TO_NUMBER(p_style);
    IF v_format_type > 100 THEN
    v_year_format := 'YYYY';     
    END IF;
    v_format := CASE
    WHEN v_format_type = 1 OR v_format_type = 101 THEN 'MM/DD/' || v_year_format
    WHEN v_format_type = 2 OR v_format_type = 102 THEN v_year_format || '.MM.DD'
    WHEN v_format_type = 3 OR v_format_type = 103 THEN 'DD/MM/' || v_year_format
    WHEN v_format_type = 4 OR v_format_type = 104 THEN 'DD.MM.' || v_year_format
    WHEN v_format_type = 5 OR v_format_type = 105 THEN 'DD-MM-' || v_year_format
    WHEN v_format_type = 6 OR v_format_type = 106 THEN 'DD MM ' || v_year_format
    WHEN v_format_type = 7 OR v_format_type = 107 THEN 'MON DD, ' || v_year_format
    WHEN v_format_type = 8 OR v_format_type = 108 THEN 'HH12:MI:SS'
    WHEN v_format_type = 9 OR v_format_type = 109 THEN 'MON DD YYYY HH12:MI:SS.FF3AM'
    WHEN v_format_type = 10 OR v_format_type = 110 THEN 'MM-DD-' || v_year_format
    WHEN v_format_type = 11 OR v_format_type = 111 THEN v_year_format || '/MM/DD'
    WHEN v_format_type = 12 OR v_format_type = 112 THEN v_year_format || 'MMDD'
    WHEN v_format_type = 13 OR v_format_type = 113 THEN 'DD MON YYYY HH12:MI:SS.FF3'
    WHEN v_format_type = 14 OR v_format_type = 114 THEN 'HH24:MI:SS.FF3'
    WHEN v_format_type = 20 OR v_format_type = 120 THEN 'YYYY-MM-DD HH24:MI:SS'
    WHEN v_format_type = 21 OR v_format_type = 121 THEN 'YYYY-MM-DD HH24:MI:SS.FF3'
    WHEN v_format_type = 126 THEN 'YYYY-MM-DD HH12:MI:SS.FF3'
              WHEN v_format_type = 127 THEN 'YYYY-MM-DD HH12:MI:SS.FF3'
    WHEN v_format_type = 130 THEN 'DD MON YYYY HH12:MI:SS:FF3AM'
    WHEN v_format_type = 131 THEN 'DD/MM/YY HH12:MI:SS:FF3AM'
    END;
              v_ret_value := CASE
                   WHEN v_format_type = 9 OR v_format_type = 109 OR
                        v_format_type = 13 OR v_format_type = 113 OR
                        v_format_type = 14 OR v_format_type = 114 OR
                        v_format_type = 20 OR v_format_type = 120 OR
                        v_format_type = 21 OR v_format_type = 121 OR
                        v_format_type = 126 OR v_format_type = 127 OR
                        v_format_type = 130 OR v_format_type = 131 THEN
                        CASE UPPER(p_dataType)
                             WHEN 'DATE' THEN TO_CHAR(TO_TIMESTAMP(p_expr, v_format))
         ELSE TO_CHAR(TO_TIMESTAMP(p_expr), v_format)
                        END
                   ELSE
                        CASE UPPER(p_dataType)
                             WHEN 'DATE' THEN TO_CHAR(TO_DATE(p_expr, v_format))
         ELSE TO_CHAR(TO_DATE(p_expr), v_format)
                        END
                   END;
    END IF;
    ELSE
    -- convert money or smallmoney to character data
    IF SUBSTR(p_expr, 1, 1) = '$' THEN
    v_ret_value := CASE TO_NUMBER(NVL(p_style, 1))
    WHEN 1 THEN TO_CHAR(SUBSTR(p_expr, 2), '999999999999999990.00')
    WHEN 2 THEN TO_CHAR(SUBSTR(p_expr, 2), '999,999,999,999,999,990.00')
    WHEN 3 THEN TO_CHAR(SUBSTR(p_expr, 2), '999999999999999990.0000')
    END;
    ELSE -- convert numeric data to character data
    v_ret_value := TO_CHAR(p_expr);
    END IF;
    END IF;
    RETURN v_ret_value;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END convert_;
    FUNCTION year_(p_date_str IN VARCHAR2)
    RETURN NUMBER
    IS
    v_date DATE;
    BEGIN
    v_date := str_to_date(p_date_str);
    IF v_date IS NULL THEN
    RETURN NULL;
    END IF;
    RETURN TO_NUMBER(TO_CHAR(v_date, 'YY'));
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END year_;
    FUNCTION stuff(p_expr VARCHAR2, p_startIdx NUMBER, p_len NUMBER, p_replace_expr VARCHAR2)
    RETURN VARCHAR2
    IS
    BEGIN
    RETURN REPLACE(p_expr, SUBSTR(p_expr, p_startIdx, p_len), p_replace_expr);
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END stuff;
    PROCEDURE incrementTrancount
    IS
    BEGIN     
    trancount := trancount + 1;
    END incrementTrancount;
    FUNCTION dateadd(p_interval IN VARCHAR2, p_interval_val IN NUMBER, p_date_str IN VARCHAR2)
    RETURN DATE
    IS
    v_ucase_interval VARCHAR2(10);
    v_date DATE;
    BEGIN
    v_date := str_to_date(p_date_str);
    v_ucase_interval := UPPER(p_interval);
    IF v_ucase_interval IN ('YEAR', 'YY', 'YYYY')
    THEN
    RETURN ADD_MONTHS(v_date, p_interval_val * 12);
    ELSIF v_ucase_interval IN ('QUARTER', 'QQ', 'Q')
    THEN
    RETURN ADD_MONTHS(v_date, p_interval_val * 3);
    ELSIF v_ucase_interval IN ('MONTH', 'MM', 'M')
    THEN
    RETURN ADD_MONTHS(v_date, p_interval_val);
    ElSIF v_ucase_interval IN ('DAYOFYEAR', 'DY', 'Y', 'DAY', 'DD', 'D', 'WEEKDAY', 'DW', 'W')
    THEN
    RETURN v_date + p_interval_val;
    ElSIF v_ucase_interval IN ('WEEK', 'WK', 'WW')
    THEN
    RETURN v_date + (p_interval_val * 7);
    ElSIF v_ucase_interval IN ('HOUR', 'HH')
    THEN
    RETURN v_date + (p_interval_val / 24);
    ElSIF v_ucase_interval IN ('MINUTE', 'MI', 'N')
    THEN
    RETURN v_date + (p_interval_val / 24 / 60);
    ElSIF v_ucase_interval IN ('SECOND', 'SS', 'S')
    THEN
    RETURN v_date + (p_interval_val / 24 / 60 / 60);
    ElSIF v_ucase_interval IN ('MILLISECOND', 'MS')
    THEN
    RETURN v_date + (p_interval_val / 24 / 60 / 60 / 1000);
    ELSE
    RETURN NULL;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END dateadd;
    FUNCTION isdate(p_expr IN VARCHAR2)
    RETURN NUMBER
    IS
    v_is_valid_date BINARY_INTEGER := 0;
    BEGIN
    IF str_to_date(p_expr) IS NOT NULL THEN
    RETURN 1;
    ELSE
    SELECT NVL2(TO_DATE(p_expr), 1, 0) INTO v_is_valid_date FROM DUAL;
    RETURN v_is_valid_date;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN 0;
    END isdate;
    FUNCTION stats_date(p_table IN VARCHAR2, p_index IN VARCHAR2)
    RETURN DATE
    IS
    v_last_analyzed DATE;
    BEGIN
    SELECT last_analyzed INTO v_last_analyzed
    FROM USER_IND_STATISTICS
    WHERE table_name LIKE UPPER(p_table)
    AND index_name LIKE UPPER(p_index);
    RETURN v_last_analyzed;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END stats_date;
    FUNCTION rand(p_seed NUMBER DEFAULT NULL)
    RETURN NUMBER
    IS
    v_rand_num NUMBER;
    BEGIN
    IF p_seed IS NOT NULL THEN
    DBMS_RANDOM.SEED(p_seed);
    END IF;
    v_rand_num := DBMS_RANDOM.VALUE();
    RETURN v_rand_num;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END rand;
    FUNCTION to_base(p_dec NUMBER, p_base NUMBER)
    RETURN VARCHAR2
    IS
    v_str VARCHAR2(255);
    v_num NUMBER;
    v_hex VARCHAR2(16) DEFAULT '0123456789ABCDEF';
    BEGIN
    v_num := p_dec;
    IF p_dec IS NULL OR p_base IS NULL THEN
    RETURN NULL;
    END IF;
    IF TRUNC(p_dec) <> p_dec OR p_dec < 0 THEN
    RAISE PROGRAM_ERROR;
    END IF;
    LOOP
    v_str := SUBSTR(v_hex, MOD(v_num, p_base) + 1, 1) || v_str;
    v_num := TRUNC(v_num / p_base);
    EXIT WHEN v_num = 0;
    END LOOP;
    RETURN v_str;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END to_base;
    FUNCTION patindex(p_pattern IN VARCHAR2, p_expr IN VARCHAR2)
    RETURN NUMBER
    IS
    v_search_pattern VARCHAR2(100);
    v_pos NUMBER := 0;
    BEGIN
    IF p_pattern IS NULL OR p_expr IS NULL THEN
    RETURN NULL;
    END IF;
    IF NOT DBMS_DB_VERSION.VER_LE_9_2 THEN
    v_search_pattern := p_pattern;
    v_search_pattern := REPLACE(v_search_pattern, '\', '\\');
    v_search_pattern := REPLACE(v_search_pattern, '*', '\*');
    v_search_pattern := REPLACE(v_search_pattern, '+', '\+');
    v_search_pattern := REPLACE(v_search_pattern, '?', '\?');
    v_search_pattern := REPLACE(v_search_pattern, '|', '\|');
    v_search_pattern := REPLACE(v_search_pattern, '^', '\^');
    v_search_pattern := REPLACE(v_search_pattern, '$', '\$');
    v_search_pattern := REPLACE(v_search_pattern, '.', '\.');
    v_search_pattern := REPLACE(v_search_pattern, '{', '\{');
    v_search_pattern := REPLACE(v_search_pattern, '_', '.');
    IF SUBSTR(v_search_pattern, 1, 1) != '%' AND
    SUBSTR(v_search_pattern, -1, 1) != '%' THEN
    v_search_pattern := '^' || v_search_pattern || '$';
    ELSIF SUBSTR(v_search_pattern, 1, 1) != '%' THEN
    v_search_pattern := '^' || SUBSTR(v_search_pattern, 1, LENGTH(v_search_pattern) - 1);
    ELSIF SUBSTR(v_search_pattern, -1, 1) != '%' THEN
    v_search_pattern := SUBSTR(v_search_pattern, 2) || '$';
    ELSE
    v_search_pattern := SUBSTR(v_search_pattern, 2, LENGTH(v_search_pattern) - 2);
    END IF;
    v_pos := REGEXP_INSTR(p_expr, v_search_pattern);
    ELSE
    v_pos := 0;
    END IF;
    RETURN v_pos;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END patindex;
    FUNCTION datediff(p_datepart VARCHAR2, p_start_date_str VARCHAR2, p_end_date_str VARCHAR2)
    RETURN NUMBER
    IS
    v_ret_value NUMBER := NULL;
    v_part VARCHAR2(15);
    v_start_date DATE;
    v_end_date DATE;
    BEGIN
    v_start_date := str_to_date(p_start_date_str);
    v_end_date := str_to_date(p_end_date_str);
    v_part := UPPER(p_datepart);
    IF v_part IN ('YEAR', 'YY', 'YYYY') THEN
    IF EXTRACT(YEAR FROM v_end_date) - EXTRACT(YEAR FROM v_start_date) = 1 AND
    EXTRACT(MONTH FROM v_start_date) = 12 AND EXTRACT(MONTH FROM v_end_date) = 1 AND
    EXTRACT(DAY FROM v_start_date) = 31 AND EXTRACT(DAY FROM v_end_date) = 1 THEN
    -- When comparing December 31 to January 1 of the immediately succeeding year,
    -- DateDiff for Year ("yyyy") returns 1, even though only a day has elapsed.
    v_ret_value := 1;
    ELSE
    v_ret_value := ROUND(MONTHS_BETWEEN(v_end_date, v_start_date) / 12);
    END IF;
    ELSIF v_part IN ('QUARTER', 'QQ', 'Q') THEN
    v_ret_value := ROUND(MONTHS_BETWEEN(v_end_date, v_start_date) / 3);
    ELSIF v_part IN ('MONTH', 'MM', 'M') THEN
    v_ret_value := ROUND(MONTHS_BETWEEN(v_end_date, v_start_date));
    ElSIF v_part IN ('DAYOFYEAR', 'DY', 'Y') THEN
    v_ret_value := ROUND(v_end_date - v_start_date);
    ElSIF v_part IN ('DAY', 'DD', 'D') THEN
    v_ret_value := ROUND(v_end_date - v_start_date);
    ElSIF v_part IN ('WEEK', 'WK', 'WW') THEN
    v_ret_value := ROUND((v_end_date - v_start_date) / 7);
    ELSIF v_part IN ('WEEKDAY', 'DW', 'W') THEN
    v_ret_value := TO_CHAR(v_end_date, 'D') - TO_CHAR(v_start_date, 'D');
    ElSIF v_part IN ('HOUR', 'HH') THEN
    v_ret_value := ROUND((v_end_date - v_start_date) * 24);
    ElSIF v_part IN ('MINUTE', 'MI', 'N') THEN
    v_ret_value := ROUND((v_end_date - v_start_date) * 24 * 60);
    ElSIF v_part IN ('SECOND', 'SS', 'S') THEN
    v_ret_value := ROUND((v_end_date - v_start_date) * 24 * 60 * 60);
    ElSIF v_part IN ('MILLISECOND', 'MS') THEN
    v_ret_value := ROUND((v_end_date - v_start_date) * 24 * 60 * 60 * 1000);
    END IF;
    RETURN v_ret_value;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END datediff;
    FUNCTION day_(p_date_str IN VARCHAR2)
    RETURN NUMBER
    IS
    v_date DATE;
    BEGIN
    v_date := str_to_date(p_date_str);
    IF v_date IS NULL THEN
    RETURN NULL;
    END IF;
    RETURN TO_NUMBER(TO_CHAR(v_date, 'DD'));
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END day_;
    FUNCTION ident_incr(p_sequence IN VARCHAR2)
    RETURN NUMBER
    IS
    v_incr_by NUMBER;
    BEGIN
    SELECT increment_by INTO v_incr_by
    FROM USER_SEQUENCES
    WHERE sequence_name LIKE UPPER(p_sequence);
    RETURN v_incr_by;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20000, DBMS_UTILITY.FORMAT_ERROR_STACK);
    END ident_incr;
    FUNCTION isnumeric(p_expr IN VARCHAR2)
    RETURN NUMBER
    IS
    numeric_val NUMBER;
    temp_str VARCHAR2(50);
    BEGIN
    temp_str := p_expr;
    IF SUBSTR(temp_str, 1, 1) = '$' THEN
    temp_str := SUBSTR(temp_str, 2);
    END IF;

  • Migration from SQL Server 7 to oracle 8.1.7 on windows 2000 professional

    Hello All,
    I am currently working on Database migration from sql server 7 to oracle 8.1.7.
    My setup is as follows:
    1. Both the databases (sql server and oracle are on the same machine )
    2. My sql server database contains 200 tables and 190 stored procedures, which need to be migrated to oracle.
    When i am trying to capture the Source database details, its capturing evry thing but when its mapping at the end ...it says "MAPPING ROLE PUBLIC" and its not proceeding furthur..What do u want me to do ? i waited for approx 1 hr , still its not proceeding....How to resolve this bug ?
    Also please suggest me the best methodology for Migrating the stored procedures. allmost all my stored procedures have TEMP Tables implemented in it. Please help me in this...
    Also please let me know the Timeframe estimate for this total thing to be done..
    Waiting for your reply,
    Thanks and Regards
    SAI SREENIVAS JEEDIGUNTA

    You can user Oracle Migration Workbench to migrate from SQL Server to Oracle.
    Here is the link which gives info on software usage and download :
    http://otn.oracle.com/tech/migration/workbench/content.html
    Chandar

  • Migrating master database to another server (DR testing).

    So I was tasked to do some DR testing, by moving one of our environments to another.  I was tasked with moving 1 user database called Vant, master, and msdb.  I managed to accomplish it, but it wasn't easy and a little messy.  I'm looking
    to see if you guys can help me clean my steps up a bit.
    Environment backgroud.
    Both environments are SQL Server 2012 Enterprise
    Build: 11.0.3368
    Instance Name: Default
    Process
    I took all 3 backups from my source server and placed it in a network location where my destination server can access.
    1) I began by trying to restore master database by placing my instance in single user mode, backup restored.
    2) when I removed the destination instance from single user mode, the service would not start, did this a couple of times, but no luck.
    3)I also made sure the startup parameters were pointing to the right folder location
    4)Then I thought, maybe it was the folder location where it restored to, that was causing the problem because they were different; so I went ahead moved master into a folder location that would match the source, i also changed the startup parameters, but
    the instance still wouldn't start
    5)So then I checked the event logs, and noticed that SQL Server was looking for databases that were on the Source Instance, as well as some of the system databases that I hadn't moved the files to the new folder location
    6)Restored the original master database from the destination server so that I could get the service going
    7) moved all the system databases from the old folder location on the destination server to where master now resided; created two empty databases with the names the event log was looking for.
    8)Restored master database from source server, and the service finally started up
    9)When I went into SSMS, I noticed that the two empty databases I created were in recovery pending
    10) dropped one of the databases I didn't need, and restored the Vant database, as well as msdb; everything looks good.
    So there it is, I totally don't feel good about this.  I don't like the fact that the databases came up in "recovery pending" and also that I had to create the databases it was looking for before I could restore and start up the service, but
    maybe that's just how it is.  Any advice you can give me on how to clean this up would be much appreciated.

    Hi,
    Did you reffered to Microsoft doumentation on how to move system databses.
    http://technet.microsoft.com/en-us/library/ms345408(v=sql.110).aspx
    For user databse backup when you restore on different server you use with move option to physically give location to mdf and ldf files.
    Moving system database is little tricky
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    My TechNet Wiki Articles

  • Migrate  oracle database to Microsoft sql server 2005

    Hi All,
    I have to migrate production oracle database to Microsoft sql server 2005. Below are the details:
    Oracle database version: 8.1.7.4
    Platform : Aix
    Kindly help me out

    Well, the traditional way would be to dump out all your data from Oracle tables as comma delimited flat files and import into SQL server. Plenty of examples online, like this is one by Mark Powell: http://www.jlcomp.demon.co.uk/faq/flatfile.html
    Or if you have the budget you could think about buying a data mapping tool like File-Aid
    As mentioned by another poster, you will still need to figure out how to replace all your triggers, stored procedures, etc on your new platform of course.

Maybe you are looking for

  • Service Desk: Message from Sat.- to SolMan with different users

    Hello, I have a problem creating tickets in my satellite systems. The user in the sat. system is not the same than the user in the solman. Our systems run for educational purposes and the users in the satellite systems can be created by the lectures.

  • Could not complete your request because the file is already in use or was left open by another application

    the message :could not complete your request because the file is already in use or was left open by another application, comes up when i try to open a specific file in PS cs5. nothing is open and i have restarted my imac already and still no solution

  • How to browse for a folder with ABAP WEB DYNPRO

    Hi, I want to browse for a folder in my local file system with ABAP WEB DYNPRO. I am looking for a functionality which the function module TMP_GUI_BROWSE_FOR_FOLDER gives. Regards, Vinay

  • IPod Touch and iTunes Download error

    I tried renting a movie and buying four TV episodes two days ago. The movie started to download when i purchased the other four items. The movie then stopped downloading, and one of the shows began to download. Then that stopped downloading. Now none

  • Moving binary file

    Hi, i have a scenario to implement by XI. ftp -> XI -> ftp (several binary files) i already looked at sending an image file through XI in a File-to-Mail Scenario.pdf, but i do not know what to do. i would highly appreciate if you give a light on it.