Database creation using backups files

Hi,
I would like to create a test database from backup of my production database.
I am new to this task.
Please correct me if I am wrong.
in production server
1.Login as sysdba in the and issue
"alter database backup controlfile to trace" command
in test server
2.Create a user oratest
2.Copy all the data files from production server
3.Copy the Oracle home
4.Edit the trace file
i.CREATE CONTROLFILE SET DATABASE "prod" RESETLOGS
in place of
CREATE CONTROLFILE REUSE DATABASE "test" NORESETLOGS
ii.Remove the recover database and alter database open lines.
iii.Edit the data files with new path in test server.
iv.save as db_create.sql
5.create the new database by executing
i.sqlplus '/as sysdba'
ii.startup nomount
iii.@db_create.sql
iv.alter database open.
What changes I have to do after copying initprod.ora to inittest.ora?
Thanks,

Your question is lacking the 4-digit version of the database, and the O/S.
For Oracle 10g and higher, using database control, it would be much more easy to duplicate the database to another server, using rman.
The procedure you describe is incomplete and incorrect and will fail for several reasons.
2.Create a user oratest -- why?
2.Copy all the data files from production server -- obviously the production database needs to be shutdown for this, or all files will be inconsistent
3.Copy the Oracle home -- if you created a new user oratest, and the user on the production server is oracle, this is not going to work, as the user and group info is linked into the Oracle executable. Also the O/S and version must be identical.
If you created a new user, you need to reinstall Oracle, if your O/S version is not identical you need to relink Oracle.
4 i is incorrect
Obviously, in inittest.ora all occurrences of prod need to replaced by test.
But then again: use RMAN and the only command you need is duplicate database, and the production database can stay online.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Is it possible to use backup files previously copied to an external hard drive to backup an iPhone?

    My sister froze her iPhone by trying to turn it off during a software update (not sure why) and restored it because she thought it would fix it. Unfortunately she unintentionally deleted all of her data and settings. She doesn't use iCloud, so I'm assuming all her files are backed up to her computer when she syncs her iPhone, but using iTunes I can only find two backup points using Edit>Preferences>Devices, both in the past few minutes. I know that each sync overrides the last backup files instead of creating newer ones, so apparently older backup files from her computer can't be used to recover her data. However, we both periodically use an external hard drive to back up our computers by basically dragging and dropping our files onto it, so there is an earlier version of her User folder on the external hard drive. It would definitely be preferable to use the backup files from a few months ago that are on the external hard drive and lose a few photos than to lose years of data, so would it be possible to direct iTunes to those backup files (AppData etc) instead of the ones saved on her computer hard drive? There's not any kind of browse option I can see that could allow me to get iTunes to search for backup files on the external hard drive and I'm not computer savvy enough to manually find the files and connect them to iTunes. Is it even possible to use backup files from an external hard drive? Do I have to replace the ones that exist on her computer now?

    Garageband can't use VST plugins.
    If you're talking about AUs: you could try to put an alias into the HD/Library/Audio/Plug-Ins/Components folder instead of the actual files, and see if GB loads them.

  • How to Create new database from cold backup files.

    Dear Experts,
    I have an oracle 10g databae on windows 2003 server.
    The database is in Archive log mode and backup strategy is Taking cold backup ever night.
    Backup steps:
    shut down database.
    copy data files, control files, redo logs, archive logs and parameter files to safe location.
    Startup.
    I have taken a backup at Tuesdaay 1AM and I have archive logs also.
    On Wednesday, I want to Create a new database on another server with the available cold backup files and archive logs. I want to recover the database upto 4PM Wednesday. How can I do this.
    I am not using control file auto backup or control file backup to trace.
    Please help me how can I do this. I am new to oracle database Administration.
    --Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    The steps :
    shut down database.
    copy data files, control files, redo logs, archive logs and parameter files to safe location -- you mean the alternate location for the new databaseare correct (except that I would say "alternate location for the new database").
    If you do not have controlfile backups, you cannot either OPEN the database or RECOVER the database until and unless you CREATE the Controlfiles. You have to generate a CREATE CONTROLFILE script using a BACKUP CONTROLFILE TO TRACE from the Production serer and create the controlfile on the new server.
    BEFORE the Startup, I would use
    RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;The "using backup controlfile" tells Oracle to continue attempting Recovery -- ie doing a RollForward -- till the last archivelog made available to it.
    For the Recover command, you then keep applying the ArchiveLogs from the Tuesday 1am ColdBackup upto Wednesday 4pm.
    Once you have applied the last ArchiveLog, you do an
    ALTER DATABASE OPEN RESETLOGS;Here are my notes of doing a RollForward "Recovery" from a Cold Backup :
    http://hemantoracledba.blogspot.com/2007/05/rollforward-from-cold-backup.html
    If you are attempting all these steps on a different server from your current Production database, you should be safe.
    Once you OPEN the database, you can use CREATE CONTROLFILE or the NID utility to rename the database.
    If you are attempting to create the new database on the same server there are many other precautions you have to take and unless you have experience with cloning databases, I would advice you against doing so (only the RMAN DUPLICATE DATABASE command has a safer method of cloning a database).
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Database Recovery using Archive files

    Dears,
    Due to some issue our database get crashed.
    We have saturday night offline backup and archive backup till yesterday night.
    We have restored offline backup and system is Up but it is on saturday night state.
    We want to apply these archive files to make the system state to current.
    In restore our control file also get replace with our saturday night control file status.
    We have copied our archive files in oraarch directory.
    Now when using brtools I am applying archive files:
    Command executing in brtools:
    recover from '/oracle/<SID>/oraarch' database
    it shows
    unknow command beginning
    No recovery required
    On sqlplus also when I execute
    sql>recover database;
    It shows no recovery required.
    When I give command:
    sql>recover database using backup control file;
    it ask for some {file name| AUTO | CANCEL}
    I give first file name of oraarch it shows "Can not access the file".
    File permissions are ok.
    I give AUTO, It also then do not do anything.
    Please suggest the correct method to make my system in latest current date.
    Shivam

    Hi Shivam,
    This is absolutely normal that during the restore your control files will be replaced by the old one which were backed up during database backup.
    Logic is that you can not apply the redolgs which are having the timestamps older than your  restored datafile's / controlfile's timestamp.
    If your DB is not yet opened, you can check the status of your database using below command which will tell you, till what timestamp your data is restored or currently available.
    select to_char(CHECKPOINT_TIME,'yyyy-mm-dd:hh24:mi:ss') from v$datafile where file#=1;
    >
    > From command I want to know "from backup control file"....Do SAP take backup of control file as in system only old is
    >
    > available.
    > Shivam
    >
    recover database using backup controlfile.....  this command does not backup the controlfile . this will make use of old controlfile only which came along with the restore  and start the recovery using this controlfile only.
    Its just make use of available controlfile ..No backup will be triggered.
    Please make a note that after DB restore; ..recovery is possible only in case database is not yet opened in OPEN state.
    Cheers !!!
    Ashish

  • Scheduling SQL AGENT JOB for SSAS DataBase to take backup files Daily with Different Names

    Hi All,
    I am working with SSMS. I have Analysis Services DataBase.
    i want to Schedule a SQL SERVER AGENT JOB.
    I want to take that AS DB BackUp Daily and has to be stored in Same
    Folder/same path in my local
    machiene with Different Names.
    Means, There should be Daily BackUps Files in that Path.  According to that we have to Schedule the JOB.
    Can anyone help me for this..
    Thanks,
    Supraja.

     Hi Katherine,
    Thanks a lot for your Response. what
    you have posted is very useful for me.
    But i am searching the result using AS
    DataBase BackUp Script. 
    i found one of the easy way. its working for me.
    Please check the below link for your reference..
    http://dbatasks.blogspot.in/2012/08/taking-backup-of-ssas-database.html
    Thanks,
    Supraja.

  • Database creation using ant/maven/liqubase

    Dear ALL:
    I am creating the database instance using the ant/maven scripts and following are the things I tried but some how it is not creating the database.
    I have installed the 64bit oracle 11gR2 on windows 7 and configured the default database (ORCL). after installation I opened up the command prompt and tried sqlplus and it get connected and I can see the tables. However when I tries to do it using the build script it fails. Following are few things I tried out.
    I plan to created 'orcl as the database with sid=orclusing the ant command 'ant -Denv=dev clean create-db -d' but it failed saying orcl is already running and you need to shut down it and I think it is expected because I am creating the database named orcl which is already created. Then I changed database name to dms and sid=dms then it throws error that you cant connect to the server with following error.
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 12 16:17:11 2011
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    ERROR:
    ORA-12560: TNS:protocol adapter error
    SP2-0640: Not connected
    ORA-12560: TNS:protocol adapter error
    more information about listener: the output of - lsnrctl stat
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 12-JAN-2011 16:18:04
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
    Start Date 12-JAN-2011 16:16:51
    Uptime 0 days 0 hr. 1 min. 13 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle\santosh\product\11.2.0\dbhome_1\network\admin\listener.ora
    Listener Log File c:\oracle\santosh\diag\tnslsnr\unknown\listener\alert\log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
    Instance "orcl", status READY, has 2 handler(s) for this service...
    Service "qc_dms" has 1 instance(s).
    Instance "qcdms", status READY, has 1 handler(s) for this service...
    Service "qcdmsXDB" has 1 instance(s).
    Instance "qcdms", status READY, has 1 handler(s) for this service...
    The command completed successfully
    Can someone help me out ? how ever the same thing is working fine on the oracle virtual box running on ubuntu 10.04.
    thank,
    Santosh

    I didnt used ORADIM in the script. here is the script that I am using .
    <target name="create-db-oracle"     >
              <echo>creating database ([${database.name}])</echo>
              <exec dir="${target.script.dir}" executable="sqlplus" output="${target.log.dir}/create-db.log" failonerror="true">
                   <arg line="/nolog @create-db_${database.flavor}.sql" />
              </exec>
    </target>
    with following connection properties
    <properties>
              <db.version>1.0</db.version>
              <liquibase.remote.db.prompt>true</liquibase.remote.db.prompt>
              <db.migrate>all</db.migrate>
              <database.driver>oracle.jdbc.driver.OracleDriver</database.driver>
              <database.url>jdbc:oracle:thin:@${database.host}:${database.port}/${database.name}</database.url>
              <database.user>santosh</database.user>
              <database.schema.user>project</database.schema.user>
              <database.admin.user>system</database.admin.user>
              <database.flavor>oracle-11g</database.flavor>
              <database.name>dcm</database.name>
         </properties>
    <properties>
         <database.host>localhost</database.host>
    <database.port>1521</database.port>
         <database.password>A_Pass123</database.password>
         <database.schema.password>projectpassword</database.schema.password>
         <database.admin.password>oracle#</database.admin.password>
    </properties>
    Edited by: user548284 on Jan 12, 2011 5:56 PM

  • How to use backup files after I reset my ipod?

    I reset my ipod touch and it asks me for my boyfriend's itunes password or when I want to use my old backup files it says that my itunes password is wrong. Just was wondering if there was anything I could do to fix it? It also said when I was trying to make an account on here as well that my password is wrong, so if someone could help that would be great. Thanks Mak1121

    Have you tried signing out of the existing iTunes account on the iPod and signing into yours? Also the same for the computer's account.

  • Shopping Cart creation using Upload File

    Hi
    We want to create Shopping cart using the Upload Program in SRM 7.01. We can use the FM BBP_PD_SC_CREATE and BBP_PD_SC_SAVE for this.
    However wanted to understand the check points that we need to keep in mind while creating the SC from any legacy system using Flat File. Are there any constraints, precautions that we should take or some prechecks/prerequisites that need to be fulfilled.
    Any input in this regard would be welcome.
    Regards
    Raj

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • PO creation using text file

    Hi All,
    I have program which takes input text file and create PO in SAP. Program is using standard SAP BAPI to create PO.
    This is working fine. But i have one program during errors.
    If text file contains 50 line items and suppose line 12 is incorrect. Incorrect means PIR,source list etc not correct or material is invalid etc etc. Then program(bapi) throw error and PO creation stops and not continue with remaining lines. That is also normal process when create PO via ME21N.
    User want to show errors for all invalid rows at the same. Basically they want PO VALIDATION step where they want to see errors of all line items. So that they can remove from text file. ANy idea how to do this?
    Thanks,
    Yogesh

    Yogesh,
    I don't understand your problem because I believe that BAPI (even ME21n) always throws all the errors for the input data in return table. So, if you have 2 problematic items in one purchase order, suppose 12 and 42, both containing invalid materials, BAPI will contain error message for both the records and not only 1 material as error.
    Similarly, if you click MESSAGES button in ME21n, you will get all the errors for all the items in the list and not 1 only, do check.
    I suppose the issue with your program must be the error handling of BAPI is not done well, and you are exiting the program showing only First return message or something like that. Do output all the error messages of the Return table and you should be able to see all the errors.
    Even if your File contains data of multiple POs, you should be able to check all the POs with all the items in a single program run.
    Let me know if you have any concerns or you need any help.
    BR,
    Diwakar

  • Database creation using DBCA silent installation

    Hi,
    I have installed oracel 11g release 2.
    but when i create database using dbca slient installation . I am getting below error.
    Copying database files
    DBCA_PROGRESS : 1%
    DBCA_PROGRESS : 2%
    ORA-12547: TNS:lost contact
    ORA-12547: TNS:lost contact
    DBCA_PROGRESS : 4%
    DBCA_PROGRESS : 37%
    Creating and starting Oracle instance
    ORA-12547: TNS:lost contact
    DBCA_PROGRESS : 38%
    ORA-12547: TNS:lost contact
    DBCA_PROGRESS : 40%
    ORA-12547: TNS:lost contact
    DBCA_PROGRESS : 45%
    DBCA_PROGRESS : 50%
    DBCA_PROGRESS : 51%
    ORA-12547: TNS:lost contact
    DBCA_PROGRESS : 56%
    ORA-12547: TNS:lost contact
    ORA-12547: TNS:lost contact
    ORA-12547: TNS:lost contact
    DBCA_PROGRESS : 57%
    ORA-12547: TNS:lost contact
    Please suggest reason of it.
    Thanks in advance

    cpp = 4.1.2-51.el5 is needed by gcc-4.1.2-51.el5.i386
    glibc-devel >= 2.2.90-12 is needed by gcc-4.1.2-51.el5.i386
    libgcc >= 4.1.2-51.el5 is needed by gcc-4.1.2-51.el5.i386
    libgomp >= 4.1.2-51.el5 is needed by gcc-4.1.2-51.el5.i3
    I am getting above error ... how to find dependent rpm file..As it is already mention in error . So first install cpp rpm then glibc-dlevel rpm and so on as mention above in your message.
    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Get datafile name in database column using ctl file - SQLLDR

    I have a shell script(ksh) and calling control file using SQLLDR. I want to pass the datafile name in database table column. Can anyone give an example of this. Appreciate your response.
    --TV2703                                                                                                                                                                                                                                                                                                                                                                                                           

    Create the control file dynamically before you start SQL*Loader
    Something like
    echo LOAD DATA > load.ctl
    echo INTO TABLE dept >> load.ctl...
    Another option is to use external tables

  • Oracle standby database creation different backup location

    Hi,
    I am using Oracle EE 11gR2 on aix 6.2.I am tring to create a standby database.The directory structure od primary and standby database server are different.
    I am taking backup (RMAN) at  /u01/backup directory on primary server and shipping those backup to standby server at /u05/backup.While duplication the rman unable to locate backup pieces at Dr server as those backups are located on different location from Dc.How to over come this situation.catalog start with is not working.
    Regards
    DBAFORU

    Hello;
    Since you are on Oracle 11 one option would be duplicate from active primary. You can use the Standby parameters of DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT for the directory structure.
    duplicate target database for standby from active database NOFILENAMECHECK;
    How To Restore From An Old Backupset Using RMAN? (Doc ID 209214.1)
    Step by Step Guide on Creating Physical Standby Using RMAN DUPLICATE...FROM ACTIVE DATABASE (Doc ID 1075908.1)
    RMAN ACTIVE DUPLICATE WHEN CONNECTED TO STANDBY AS TARGET (Doc ID 1343515.1)
    Creating a Physical Standby Database (Doc ID 1475344.1)
    Best Regards
    mseberg

  • How to map single input value to Two columns of Database table using format file of Bulk Copy Process

    Hi All,
    Am using OPENROWSET to load the file data into table, here the problem is i need to map same input value to two different columns of table, As format file doesn't allow the duplicate numbers am unable to insert same value to two columns, please help me to
    find a solution for this. 
    i can use only OPENROWSET because i need to insert some default values also which come based on file. only the problem is how to map same input value to two different columns of table. please give me the suggestions.
    Thanks,
    Sudhakar

    From what you say:
       INSERT tbl(col1, col2)
          SELECT col1, col1
          FROM   OPENROWSET(....)
    But I guess it is more difficult. You need to give more details. What sort of data source do you have? What does your query look like? The target table?
    Erland Sommarskog, SQL Server MVP, [email protected]
    Hi Erland,
    Thanks for your response
    my source file is text file with | symbol separate for ex:
    1002|eTab |V101|eTablet|V100|Logic|LT-7|Laptops|SCM
    Database table have columns like
    column1,column2,column3...etc, now i need to insert same value from input file into two columns for ex:
    the eTab value from text file has to be insert into column2 and column3 of
    table
    we cannot change format file like below one
    for the above situation how can we insert eTab into column2 and column3
    Thanks,
    Sudhakar.

  • How to store the data instead of memoryengine to database when use XML file

    Hi Experts,
    I have doubt which is into XML to database data transfer.
    While transferring the data from XML to database the tables will be store in memory for the xml files, my aim is instead of storing this in memory engine
    is there any way to store the data in to the data base itself..
    I am assuming when the data size increases say for example huge amount data, storing this much of data is big issue here right, so to avoid this is there any way to store
    this data directly in the database level.
    Please understand my requirement or else I have the good explanation about my requirement and please assist me how do this job....
    Thx,
    Sahadeva.

    Hi Experts,
    For this job I have applied the
    jdbc:snps:xmll?f=/mydata/xml/file.xml&s=wrk_admin&dp_driver=oracle.jdbc.driver.OracleDriver&dp_url=jdbc:oracle:thin:@localhost:1521:xel&dp_user=wrk_admin&dp_password=bPyXS2eRXw8fWnKEmTYSEf&dp_schema=wrk_admin&dp_doc=Y
    my schema name is wrk_admin
    xml file name is mydata
    jdbc driver: localhost:1521:xe
    Encoded password: I have encoded the pwd from cmd:c:oracle\oracle_odi1\oracledi\agent\bin\encode wrk_admin
    The above are the details I have applied to my ODI studio for creating the dataserver.
    After applying this I got the following error.
    Could you please correct me here if I am wrong...
    jdbc:snps:xml?param1=value1&param2=value2&...
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1118)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:420)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.localConnect(SnpsDialogTestConnet.java:860)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.jButtonTest_ActionPerformed(SnpsDialogTestConnet.java:806)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.connEtoC1(SnpsDialogTestConnet.java:165)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$1(SnpsDialogTestConnet.java:161)
    Thx,
    Sahadeva.

  • Database creation using DBCA

    Hi,
    when i am creating database using DBCA then i get error
    I am using Linux NL2 2.6.18-84.el5xen #1 SMP Fri Feb 29 16:42:34 EST 2008 x86_64 x86_64 x86_64 GNU/Linux.
    [oracle@NL2 ~]$ dbca
    DISPLAY not set.
    Set DISPLAY environment variable, then re-run.
    when
    [oracle@NL2 ~]$ echo $DISPLAY then it has given blank ..
    i do not know how to set DISPLAY variable?
    your early response is appericiated.
    thanks in advance
    Edited by: user647572 on Sep 9, 2010 5:58 AM
    Edited by: user647572 on Sep 9, 2010 6:02 AM

    Hi -
    I cannot get dbca to display on my xp machine.
    I installed xming and have xclock running.
    Started putty and enabled X11, and this is the result:
    echo $DISPLAY
    localhost:11.0
    When I start running dbca, I basically get no response.
    It is running on the linux server, but I get no display (X window)
    to work from. My colleague has experienced the exact same
    issue.
    Thanks for your attention,
    Mark

Maybe you are looking for

  • Payext Idocs Issue

    Hi, I am generating payext idocs off the back of a payment run (F110). The issue that I have is where I am paying a supplier with multiple invoices, that the individual invoices are all included in the IDOC. When the bank statement is returned to us,

  • Sapscripts

    Hello, Iam working with scripts, I have to give totals for my line items.i have to write a code in my form painter. See if there is one item then one total price value is displaying,if there is 2 or 3 means then also the total price values are coming

  • Workflow Failures ---- Localizations --- On Numbers and Dates

    We are finding that workflows that either do math or set dates are failing based on what a users locale setting is. The issue is for locales where they replace the decimal point with a comma and where date fields are displayed in dd/mm/yyyy format. A

  • Monitoring services without description?

    Hi all I've made a setup similar to the one described in the below article: http://blogs.technet.com/b/brianwren/archive/2008/03/07/using-wildcards-with-the-windows-service-template.aspx Basically I'm monitoring a lot of services and some of these se

  • Major Problems, Looking for Solutions

    Let me start at the beginning, which would be this past Monday (I think that's when it started). Went to bed the night before, computer was working fine, left it on (It's a Mac Mini G4 btw). Woke up, and the screen was white. Thought that something m