RESTORE DATABASE USING SCRIPT

Hi, I am using SQLEXPR 2008. I have take database Backup from 2008 SQL, Using Script and tried to restore the database on another machine having SQLEXPR 2012 Installed using SQL Script and getting Following  error 
SQL Script :
1.BACK UP :  BACKUP DATABASE
test TO
DISK='D:\SQLServerBackups\test.dat'
2.RESTORE: RESTORE DATABASE test FROM DISK = 'D:\SQLServerBackups\test.dat' WITH REPLACE
FOLLOWING ERROR
1------------------------ 1 --- > WHY THIS ERROR -- THIS PATH WILL NOT BE THERE ON NEW MACHINE
Directory lookup for the file "C:\Program Files (x86)\Microsoft SQL Server\MSSQL10.APAYROLL\MSSQL\DATA\test.mdf" failed with the operating system error 3(The system cannot find the path specified.).
2------------------------ 2
File 'test' cannot be restored to 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL10.APAYROLL\MSSQL\DATA\test.mdf'. Use WITH MOVE to identify a valid location for the file.
3------------------------ 3
Directory lookup for the file "C:\Program Files (x86)\Microsoft SQL Server\MSSQL10.APAYROLL\MSSQL\DATA\test_log.LDF" failed with the operating system error 3(The system cannot find the path specified.).
4------------------------ 4
File 'tran_BBLMS_Jan2015_Dec2015_log' cannot be restored to 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL10.APAYROLL\MSSQL\DATA\test_log.LDF'. Use WITH MOVE to identify a valid location for the file.
Sandeep J. Sharma (eZee Technosys)

SQL Server 2008 is product version 10.xxx and the default path used by a SQL Server 2008 has this as you can see in your example -
C:\Program Files (x86)\Microsoft SQL Server\MSSQL10
The backup includes this path for the files. This is where it will try to restore them unless you specify otherwise.
The SQL Server 2012 is product version 11.xxx and it has \MSSQL11 mentioned in its path. Your SQL Server 2012 server does not have the MSSQL10 directory. So the backup restore fails.
You need to use the MOVE keyword in the command.
The REPLACE keyword that you are using means to overwrite an existing database with the same name in the SQL Server.
Reference -
Restore a Database to a New Location (SQL Server)
https://msdn.microsoft.com/en-us/library/ms186390(v=sql.110).aspx
- Aalamjeet Rangi | (Blog)

Similar Messages

  • Restoring database using C sharp console application(SQl server 2008 R2)

    Hi All,
    I want to take backup and restore database from one server to another through C sharp Console Application.
    My Backup is working fine but restoring is not working and throwing below error:
    An unhandled exception of type 'Microsoft.SqlServer.Management.Smo.FailedOperationException' occurred in Microsoft.SqlServer.SmoExtended.dll
    Database name is fine while restoring.
    Please give me some ideas in resolving this.
    Thanks in advance.
    blrSvsTech

    Hi Olaf,
    I used Replace database option.
    My code is something like this.
      public void Restoredb(string serverName, string useraame, string password)
                ServerConnection conn;
                if (useraame == " ") // for Windows Authentication
                    SqlConnection sqlCon = new SqlConnection(@"Data Source=" + serverName + @";Integrated Security=True;");
                    conn = new ServerConnection(sqlCon);
                else // for Server Authentication
                    conn = new ServerConnection(serverName, useraame, password);
                Server srv = new Server(conn);
                Database database = srv.Databases["db_Miller"];
                string dbPath = Path.Combine(database.PrimaryFilePath, "db_Miller.mdf");
                string logPath = Path.Combine(database.PrimaryFilePath, "db_Miller.ldf");
                Restore restore = new Restore();
                BackupDeviceItem deviceItem = new BackupDeviceItem(path, DeviceType.File);
                restore.Devices.Add(deviceItem);
                restore.Action = RestoreActionType.Database;
                restore.ReplaceDatabase = true;
                restore.NoRecovery = true;
                restore.SqlRestore(srv);  ------------- Getting error in this line.
                database = srv.Databases["db_Miller"];
                database.SetOnline();
                srv.Refresh();
                database.Refresh(); 
    Thanks in advance.
    blrSvsTech
    Hi blrSvsTech,
    You haven’t specified the restore destination database, please try the following codes:
    public void Restoredb(string serverName, string useraame, string password)
    ServerConnection conn;
    if (useraame == " ") // for Windows Authentication
    SqlConnection sqlCon = new SqlConnection(@"Data Source=" + serverName + @";Integrated Security=True;");
    conn = new ServerConnection(sqlCon);
    else // for Server Authentication
    conn = new ServerConnection(serverName, useraame, password);
    Server srv = new Server(conn);
    Database database = srv.Databases["db_Miller"];
    string dbPath = Path.Combine(database.PrimaryFilePath, "db_Miller.mdf");
    string logPath = Path.Combine(database.PrimaryFilePath, "db_Miller.ldf");
    Restore restore = new Restore();
    BackupDeviceItem deviceItem = new BackupDeviceItem(path, DeviceType.File);
    restore.Devices.Add(deviceItem);
    restore.Action = RestoreActionType.Database;
    restore.ReplaceDatabase = true;
    restore.NoRecovery = true;
    restore.database = srv.Databases["db_Miller"];
    restore.SqlRestore(srv); ------------- Getting error in this line.
    database = srv.Databases["db_Miller"];
    database.SetOnline();
    srv.Refresh();
    database.Refresh();
    If the issue occurs again, please post all the error message here for analysis.
    For more detail information, you can refer to he following link:
    Restore.SqlRestore Method
    http://technet.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.restore.sqlrestore.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1
    Best Regards,
    Allen Li
    Allen Li
    TechNet Community Support

  • Help me! cann't restore database using RMAN!!

    i've backuped database using RMAN,
    now datafile of system tablespace have lost,
    and i execute the command as following:
    run {
    allocate channel c1 type disk;
    restore database;
    these are errors:
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: restore
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: IRESTORE
    RMAN-06003: ORACLE error from target database: ORA-01843: not a
    valid month
    RMAN-06097: text of failing SQL statement: select decode(bitand
    (festa,(4096+128)
    ),128,fecps,4096,fecps,0) ,decode(bitand(festa,
    (4096+128)),128,281474976710655,4
    096,controlfile_change#,0) ,decode(bitand(festa,
    (4096+128)),128,SYSDATE,4096,con
    trolfile_time,to_date('JAN 01 1988','MON DD
    YYYY')) ,feofs ,feonc_scn ,to_date(n
    vl(feonc_tim,'01/01/88 00:01:01'),'MM/DD/RR HH24:MI:SS')
    into :b1,:b2,:b3,:b4,:b
    5,:b6 from x$kccfe ,v$database where (fenum=:b7 and fedup=1)
    RMAN-06099: error occurred in source file: krmk.pc, line: 21652

    Try setting the NLS_DATE_FORMAT at the command prompt.

  • Unable to restore database using RMAN in oracle 10g

    Hi Everyone!!!!!!!
    I have following scenario. In which I don't want to drop newly created tablespace (test). So, let me know how to restore database from existing backup without dropping new tablespace and taking new backup?
    1. I took database backup as
    RMAN > backup database;
    2. Create one tablespace "test"
    3. Then I tried to restore database as (In mount mode)
    RMAN > restore database
    4. But I can't restore database. Even I tried after taking "test" tablespace offline , It returns error as follow
    ORA-01119: error in creating database file 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTCAT\TEST.DBF'
    ORA-27038: created file already exists
    OSD-04010: <create> option specified, file already exists
    Please suggest me step/way so that I can restore database without taking new backup or dropping new tablespace (test).........

    Hello;
    Rename this datafile :
    D:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTCAT\TEST.DBF
    Then try the restore again.
    If this isn't a test database stop and think about how you will recover if this does not work. That is how will you recover from the recover if it goes bad?
    Best Regards
    mseberg

  • ORA-27067 Error while restoring database using RMAN

    Hi All,
    I am trying to restore the backups from my production database to an other server. I was able to restore the spfile and control files but at the step where I restore the datafiles I get the following error:
    RMAN-03002: failure of restore command at 11/03/2008 14:28:16
    ORA-19587: error occurred reading 0 bytes at block number 1
    ORA-27091: skgfqio: unable to queue I/O
    ORA-27067: skgfdisp: size of buffer is invalid
    The OS and the Oracle version on the source server (on which the backups were taken) and the target server (the backups being restored to) are the same. They both are running SUNOS 5.9 and Oracle 9.2. I
    Below are what were reported in the trace files:
    Unix process pid: 12359, image: oracle@ (TNS V1-V3)
    *** SESSION ID:(13.1) 2008-11-03 15:23:26.265
    *** 2008-11-03 15:23:26.275
    corrupt block 1 found during reading backup piece,file=/xxx/xxx/36jucqpe_1_1.bak, corr_type=1
    dump corrupted block
    2F11600 00020000 00000001 00000000 00000101 [................]
    2F11610 00000000 00000000 00000000 00000000 [................]
    Repeat 6 times
    *** 2008-11-03 16:19:29.778
    corrupt block 1 found during reading backup piece,file=/xxx/xxx/36jucqpe_1_1.bak, corr_type=1
    dump corrupted block
    3211C00 00020000 00000001 00000000 00000101 [................]
    3211C10 00000000 00000000 00000000 00000000 [................]
    Repeat 6 times
    Redo thread mounted by this instance: 0 <none>
    Oracle process number: 14
    Unix process pid: 12194, image: oracle@ (TNS V1-V3)
    *** SESSION ID:(11.3) 2008-11-03 14:09:42.986
    (blkno = 0x88, size = 276, max = 1, in-use = 1, last-recid= 0)
    (blkno = 0x89, size = 56, max = 145, in-use = 1, last-recid= 1)
    *** 2008-11-03 15:16:40.960
    *** SESSION ID:(13.1) 2008-11-03 15:16:40.951
    =====================
    PARSING IN CURSOR #2 len=68 dep=0 uid=0 oct=42 lid=0 tim=172140509128 hv=287842151 ad='35cd9364'
    alter session set events '10046 trace name context forever, level 8'
    END OF STMT
    EXEC #2:c=0,e=250,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=4,tim=172140509103
    WAIT #2: nam='SQL*Net message to client' ela= 8 p1=1650815232 p2=1 p3=0
    *** 2008-11-03 15:17:18.666
    WAIT #2: nam='SQL*Net message from client' ela= 36822299 p1=1650815232 p2=1 p3=0
    =====================
    PARSE ERROR #2:len=50 dep=0 uid=0 oct=3 lid=0 tim=172177341974 err=1219
    select /*+ FULL(t) */ count(*) from sys.source$ t
    WAIT #2: nam='SQL*Net break/reset to client' ela= 61 p1=1650815232 p2=1 p3=0
    WAIT #2: nam='SQL*Net break/reset to client' ela= 279 p1=1650815232 p2=0 p3=0
    WAIT #2: nam='SQL*Net message to client' ela= 5 p1=1650815232 p2=1 p3=0
    Unix process pid: 12156, image: oracle@ (TNS V1-V3)
    *** SESSION ID:(11.3) 2008-11-03 14:09:08.687
    Archiving is disabled
    Archiving is disabled
    Can anyone help me resolve this error?
    Thanks,
    Ashok

    Hi,
    We finally got this issue resolved. I think the error was because the source database server was running 64 bit Oracle 9.2.0 and we installed a 32 bit Oracle 9.2.0 database on the target server. We then did a fresh install of 64 bit Oracle 9.2.0 database on the target server and the restoration worked. Also, after copying all the backup files to the target DB server, change the access rights of all those files and the folder containing them to 777.
    Thanks,
    Ashok

  • How to Connect Database Using Script?

    Hi all,
                    Am using Adobe InDesign CS3. Is there any way to connect database from Adobe InDesign CS3 Scripting (Javascript)? Thanks in advance.
    Regards,
    Mohan

    I don't know javascript so I can't help with that part.
    The system plug in you need is from Actual Technologies : http://www.actualtechnologies.com/ The setup for that is detailed in their instructions. You will probably want to set it up for system-wide access, not by user. I found system-wide access more reliable, fwiw.
    For Applescript I send a command through the Terminal/command line that returns the data from the query.
    Here is Applescript:
    set query to "YOUR DB QUERY"
    set results to (do shell script "echo \"" & query & "\" | iodbctest \"dsn=" & dsn & ";uid=" & uid & ";pwd=" & pwd & "\" | awk '{ if (match($0,\"SQL>\")) {k++; if (k==1) next; if (k==2) exit; } if (k==1) print; }'")
    You can probably do something similar in Javascript. You'll have to parse out the text data returned then. I think there may be plug-ins for InDesign that can directly connect to a database (?). Or some plug-ins like inData can take their data passed from a script as well.
    Chris

  • Creating a Duplicate Database using Scripts

    Hi All
    Hello there!
    I have an oracle 8.1.7 database set up running on windows, and i was wondering is there any way i can run a command which will create the scripts that i then could use to set up a duplicate database, if you get me?
    Say you had one script which would create all your tables, then another for views, constraints.
    I know you can do it with SQL server and Ingres
    Any ideas?
    Cheers in advance for any help.
    Gillian

    Hello,
    Have a look on the import parameter "INDEXFILE":
    "Specifies a file to receive index-creation commands.
    When this parameter is specified, index-creation commands for the requested mode are extracted and written to the specified file, rather than used to create indexes in the database. No database objects are imported.
    If the Import parameter CONSTRAINTS is set to Y, Import also writes table constraints to the index file.
    The file can then be edited (for example, to change storage parameters) and used as a SQL script to create the indexes.
    To make it easier to identify the indexes defined in the file, the export file's CREATE TABLE statements and CREATE CLUSTER statements are included as comments."
    You have to edit this file to create the tables, the views,...
    Bertrand

  • Restore sql database using c# code

    i need to restore ms sql database by selecting backup file in windows application...how to do it...?  thanx

    Hello,
    You can find a simple C#/VB.NET example to backup / restore a database in MSDN:
    Restore.SqlRestoreMethod
    And other example at CodeProject:
    Backup and Restore Databases using SMO
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How do I move databases using RMAN with minimal downtime ?

    How can I do the following using RMAN ?
    DB version 10.2.0.4
    Redhat 5.2
    I am not using an rman catalogIn the past I have moved large databases from 1 server to another with 5 minutes downtime using backups done the old way by putting tablespaces in backup mode and making copies of the datafiles.
    I used the following method :
    ========> Part 1
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE set DATABASE "VPMY" RESETLOGS ARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 3
         ....etc
    LOGFILE
    ......... log file names
    DATAFILE
    ... list of datafiles
    CHARACTER SET US7ASCII;
    ========> Part 2
    Up until the scheduled downtime, I would copy the archive logs from the production server to the new and run the following to apply the latest archive logs:
    RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
    ->AUTO<-
    ========> Part 3
    After applying the last archive log while in restrict mode -
    ALTER DATABASE OPEN resetlogs;
    My question is, how do I do Part 2 in RMAN. I have managed to duplicate databases and restore databases using rman to a different server, but this obviously only covers the data upto the backup point. How can I do the above parts 1 -3 with downtime of about 5 minutes like I have done using old methods ?
    Any help is much appreciated/

    you should be able to recover as you go with rman as well..
    copy the archived logs from A to B and apply them as they come in.
    run
    set until sequence x thread 1;
    recover database;
    if you're not opening the database after recovery you can just increment the set until sequence as the logs come in and do a new recovery.

  • Restore database not working

    Hi
    i am using oracle9i as database server
    using RMAN i am taking full backup on 22-dec-06
    after that i am doing lot of r&d in database e.g. drop user with cascade
    now i want to restore database using above *.bk file
    so i am doing following things
    STARTUP MOUNT;
    RESTORE DATABASE;
    Starting restore at 07-FEB-07
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 02/07/2007 13:35:52
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 24 found to restore
    error occurs
    please can you help me to find out solution
    i want to restore from *.bk files
    Chetan

    [1] this is command issued
    =======================
    RMAN>restore database;
    out put is
    Starting restore at 07-FEB-07
    using target database controlfile instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=8 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 02/07/2007 14:06:13
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 24 found to restore
    RMAN-06023: no backup or copy of datafile 24 found to restore
    RMAN-06023: no backup or copy of datafile 22 found to restore
    RMAN-06023: no backup or copy of datafile 21 found to restore
    RMAN-06023: no backup or copy of datafile 20 found to restore
    RMAN-06023: no backup or copy of datafile 19 found to restore
    RMAN-06023: no backup or copy of datafile 18 found to restore
    RMAN-06023: no backup or copy of datafile 17 found to restore
    RMAN-06023: no backup or copy of datafile 16 found to restore
    RMAN-06023: no backup or copy of datafile 15 found to restore
    RMAN-06023: no backup or copy of datafile 14 found to restore
    RMAN-06023: no backup or copy of datafile 13 found to restore
    RMAN-06023: no backup or copy of datafile 12 found to restore
    RMAN-06023: no backup or copy of datafile 11 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 9 found to restore
    RMAN-06023: no backup or copy of datafile 8 found to restore
    RMAN-06023: no backup or copy of datafile 7 found to restore
    RMAN-06023: no backup or copy of datafile 6 found to restore
    RMAN-06023: no backup or copy of datafile 5 found to restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    [2] list backup
    ==================
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    182 Full 1M DISK 00:00:01 21-DEC-06
    BP Key: 182 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20061221-00
    SPFILE Included: Modification time: 11-DEC-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    203 Full 1M DISK 00:00:02 31-JAN-07
    BP Key: 203 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20070131-00
    SPFILE Included: Modification time: 31-JAN-07
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    204 Full 1M DISK 00:00:01 31-JAN-07
    BP Key: 204 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20070131-01
    SPFILE Included: Modification time: 31-JAN-07
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    205 Full 1M DISK 00:00:02 07-FEB-07
    BP Key: 205 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20070207-00
    SPFILE Included: Modification time: 31-JAN-07
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    206 Full 1M DISK 00:00:01 07-FEB-07
    BP Key: 206 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20070207-01
    SPFILE Included: Modification time: 31-JAN-07
    [3] file name
    =========================================
    ORACLE9I_20061222_212.bkp
    ORACLE9I_20061222_211.bkp
    Please help me

  • New database create script using DBCA

    Hi,
    I'm trying to generate a database create script using DBCA. I have another database running on the same physical server(HP-UX and oracle 10g R2). When I run the DBCA, it is creating scripts to Clone DB and Clone RMAN restore. Why it is not generating to create a new database instead of cloning the DB.
    Thanks

    Rock2 wrote:
    Hi,
    I'm trying to generate a database create script using DBCA. I have another database running on the same physical server(HP-UX and oracle 10g R2). When I run the DBCA, it is creating scripts to Clone DB and Clone RMAN restore. Why it is not generating to create a new database instead of cloning the DB.
    ThanksWhen you launch dbca, you need to select to create a 'custom' database, not one of the pre-canned templates. The templates will all result in a script that does an rman restore from a backup that comes with the product. Selecting 'custom' database will result in scripts built around the CREATE DATABASE sql statement.

  • I got the above error while i restore the standby database using RMAN backu

    Dear All,
    RMAN> crosscheck archivelog all;
    using target database controlfile instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=14 devtype=DISK
    specification does not match any archive log in the recovery catalogi got the above error while i restore the standby database using RMAN backup from production.
    Help need.i take the backup without catalog database.
    regards,
    DB

    rman> list backup;
    it shows lengthier but i showed only the corresponding
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    3479    Full    17G        DISK        01:29:42     09-FEB-13
            BP Key: 3479   Status: AVAILABLE   Tag: 09FEB13_FULL_ESMSRV1_DB
            Piece Name: /oradatabkp/rman/esmsrv1_full_db_09feb13
      SPFILE Included: Modification time: 08-FEB-13
      List of Datafiles in backup set 3479
      File LV Type Ckp SCN    Ckp Time  Name
      1       Full 1759250260 09-FEB-13 /esmsrv1/dbs/system01.dbf
      2       Full 1759250260 09-FEB-13 /esmsrv1/dbs/undotbs01.dbf
      3       Full 1759250260 09-FEB-13 /esmsrv1/dbs/cwmlite01.dbf
      4       Full 1759250260 09-FEB-13 /esmsrv1/dbs/drsys01.dbf
      5       Full 1759250260 09-FEB-13 /esmsrv1/dbs/example01.dbf
      6       Full 1759250260 09-FEB-13 /esmsrv1/dbs/indx01.dbf
      7       Full 1759250260 09-FEB-13 /esmsrv1/dbs/odm01.dbf
      8       Full 1759250260 09-FEB-13 /esmsrv1/dbs/tools01.dbf
      9       Full 1759250260 09-FEB-13 /esmsrv1/dbs/users01.dbf
      10      Full 1759250260 09-FEB-13 /esmsrv1/dbs/xdb01.dbf
      11      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_default_seg_001.dbf
      12      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_property_ind_seg_001.dbf
      13      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_property_seg_001.dbf
      14      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_upload_ind_seg_001.dbf
      15      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_upload_seg_001.dbf
      16      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_rate_ind_seg_001.dbf
      17      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_rate_seg_001.dbf
      18      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_summary_ind_seg_001.dbf
      19      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_summary_seg_001.dbf
      20      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_overflow_seg_001.dbf
      21      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_overflow_seg_002.dbf
      22      Full 1759250260 09-FEB-13 /esmsrv1/dbs/dpipe_summary_seg_002.dbf
      23      Full 1759250260 09-FEB-13 /esmsrv1/dbs/perfstat_001.dbf
      39      Full 1759250260 09-FEB-13 /esmsrv1/dbs/oem_repository.dbf
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    3480    Full    17G        DISK        01:21:30     09-FEB-13
            BP Key: 3480   Status: EXPIRED   Tag: TAG20130209T200021
            Piece Name: /oradatabkp/rman/esmsrv1/esmsrv1_full_Feb09
      SPFILE Included: Modification time: 08-FEB-13
      List of Datafiles in backup set 3480
      File LV Type Ckp SCN    Ckp Time  Name
      1       Full 1759422265 09-FEB-13 /esmsrv1/dbs/system01.dbf
      2       Full 1759422265 09-FEB-13 /esmsrv1/dbs/undotbs01.dbf
      3       Full 1759422265 09-FEB-13 /esmsrv1/dbs/cwmlite01.dbf
      4       Full 1759422265 09-FEB-13 /esmsrv1/dbs/drsys01.dbf
      5       Full 1759422265 09-FEB-13 /esmsrv1/dbs/example01.dbf
      6       Full 1759422265 09-FEB-13 /esmsrv1/dbs/indx01.dbf
      7       Full 1759422265 09-FEB-13 /esmsrv1/dbs/odm01.dbf
      8       Full 1759422265 09-FEB-13 /esmsrv1/dbs/tools01.dbf
      9       Full 1759422265 09-FEB-13 /esmsrv1/dbs/users01.dbf
      10      Full 1759422265 09-FEB-13 /esmsrv1/dbs/xdb01.dbf
      11      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_default_seg_001.dbf
      12      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_property_ind_seg_001.dbf
      13      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_property_seg_001.dbf
      14      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_upload_ind_seg_001.dbf
      15      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_upload_seg_001.dbf
      16      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_rate_ind_seg_001.dbf
      17      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_rate_seg_001.dbf
      18      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_summary_ind_seg_001.dbf
      19      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_summary_seg_001.dbf
      20      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_overflow_seg_001.dbf
      21      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_overflow_seg_002.dbf
      22      Full 1759422265 09-FEB-13 /esmsrv1/dbs/dpipe_summary_seg_002.dbf
      23      Full 1759422265 09-FEB-13 /esmsrv1/dbs/perfstat_001.dbf
      39      Full 1759422265 09-FEB-13 /esmsrv1/dbs/oem_repository.dbf
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    3481    Full    4M         DISK        00:00:03     09-FEB-13
            BP Key: 3481   Status: AVAILABLE   Tag: TAG20130209T212205
            Piece Name: /oradatabkp/rman/esmsrv1/esmsrv1_controlfile_copy_Feb09
      Controlfile Included: Ckp SCN: 1759462488   Ckp time: 09-FEB-13
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    3482    Full    0          DISK        00:00:01     09-FEB-13
            BP Key: 3482   Status: AVAILABLE   Tag: TAG20130209T212212
            Piece Name: /oradatabkp/rman/esmsrv1/esmsrv1_spfile_copy_Feb09
      SPFILE Included: Modification time: 08-FEB-13
    ls -l /oradatabkp
    root@drsrv1#ls -l /oradatabkp
    total 1108672
    drwxr-xr-x   2 ovsd       dba             96 Sep 27  2009 alert_bkp
    -rw-r--r--   1 oracle     dba            195 Mar 15  2007 create.sql
    drwxr-xr-x   2 oracle     dba           8192 Aug  7  2009 ctrl_bkp
    -rw-r--r--   1 root       sys        565114880 Apr 24  2007 drsrv1.tar
    drwxrwxrwx   2 root       sys             96 Jun 17  2011 drsrv2-ignitebkp
    drwxr-xr-x   4 root       sys             96 Apr 24  2007 esmsrv1
    -rw-r-----   1 root       sys        1613824 Feb 22  2007 esmsrv1stby.ctl
    -rw-r--r--   1 esmsrv1    dba           5120 Dec 31  2009 esmtables.dmp
    -rw-r--r--   1 esmsrv1    dba            538 Dec 31  2009 esmtables.log
    drwxrwxrwx   4 root       sys           8192 Mar 10  2009 export
    drwxr-xr-x   8 root       sys           8192 Apr 24  2007 finalbackup
    -rw-r--r--   1 oracle     dba           3820 Sep  5  2008 invalid.sql
    -rw-r--r--   1 esmsrv1    dba         303104 Dec 31  2009 kirdevports.dmp
    -rw-r--r--   1 esmsrv1    dba            591 Dec 31  2009 kirdevports.log
    drwxr-xr-x   2 root       root            96 Feb 12  2007 lost+found
    -rw-r--r--   1 oracle     dba          24954 Aug  9  2009 ovcontrol-090909.ctl
    drwxr-xr-x  22 root       sys           8192 Apr 24  2007 ovpi
    drwxr-xr-x   2 oracle     dba           8192 Aug  7  2009 pfile_bkp
    drwxrw-rw-   4 oracle     dba           8192 Feb 10 15:25 rman
    drwxr-xr-x  28 root       sys           8192 Feb  1 17:15 schedbkp
    drwxr-xr-x   2 oracle     dba           8192 Jul 11  2011 sdnnm
    -rw-r--r--   1 esmsrv1    dba           2196 Dec 31  2009 srirdevports.log
    drwxr-xr-x   2 oracle     dba             96 Mar 13  2009 statsreport
    -rw-r--r--   1 oracle     dba            966 Mar 15  2007 tbs.sql
    drwxr-xr-x   5 oracle     dba             96 Mar 16  2007 testov
    drwxr-xr-x   2 root       sys         442368 Mar 11  2009 trendadm_files
    root@drsrv1#ls -l /oradatabkp/rman
    total 37244448
    drwxr-xr-x   2 oracle     dba           8192 Feb 10 15:25 esmsrv1
    -rw-r-----   1 oracle     dba        19068198912 Feb  9 14:21 esmsrv1_full_db_09feb13
    drwxrw-rw-   2 oracle     dba           8192 Feb  9 21:36 openview
    -rw-r--r--   1 oracle     dba         920442 Feb  9 21:37 rmanbkp-all.log

  • Use of Table Valued Parameter to restore databases

    I'm a noob with table valued parameters.  Not sure if I can use TVP for what I need to do.  I want to restore/refresh multiple databases from arbitrary number of .BAK files.  I can successfully populate a TVP with the needed
    source information which includes:
    Database name
    File/device name (i.e., xxx.BAK file)
    Logical data file name
    Logical log file name
    Now I want to create a stored procedure that contains Restore Database command like this:
       RESTORE DATABASE <@database name> 
       FROM <@path and name of .bak file> 
       WITH MOVE <@logical data file> TO <new path and file name>,
       MOVE <@logical log file name> TO <new path and file name>;
    Can I replace those variables with the column values in the TVP?  I'm not sure because all the stored proc examples I see simply insert rows from the TVP into rows of an existing table.

    Yes, but you would need to run a cursor of your TVP:
    DECLARE cur CURSOR STATIC LOCAL FOR
       SELECT db, path, logical_data_file, new_data_path, logical_log_file,
              new_logfile_apth
        FROM  @TVP
    OPEN cur
    WHILE 1 = 1
    BEGIN
       FETCH cur INTO @db, @path, @logical_data_file, @new_data_path,
                      @new_logical_log_file, @new_logfile_path
       IF @@fetch_status <> 0
          BREAK
       RESTORE DATABASE @db FROM DISK = @path
       WITH MOVE @logical_data_file TO @new_data_path,
            MOVE @new_logical_log_file, @new_logfile_pth
    END
    DEALLOCATE cur
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to restore a mysql dump file to database using java

    hai friends,
    i'm developing an application. in that i need to back up and restore the database. i'm using mysql.
    in that i used a code to back up the db.. its working perfectly and the dump file is created perfectly..
    but while trying to restore the dump file nothing is happening...
    can anyone provide me a sample code to restore the dump to database using java code...
    thanks in advance...

    The first, biggest mistake you made in the code is that you didn't read standard output and error from the process, and/or you're ignoring exceptions. Because if you did, you would have read error messages that would have given you a clue what's wrong. (either that, or you ignored the clues, or didn't understand them and failed to tell us what the error messages are)
    The second mistake is that you invoked exec with the call that takes a single string, when that string includes whitespace not used as delimiters.
    The third mistake was that you used a terrible subject line for your post. Your problem is that you're having trouble with Runtime.exec. The fact that it's about mysql isn't relevent.
    The fourth mistake is that you didn't mention Runtime.exec at all until pushed. You should provide these details. When you try to self-diagnose something that you don't understand, and then hide information, you're just wasting everybody's time, including your won.
    The fifth mistake is that you're using poor spelling.
    The sixth mistake is that you still haven't said why you're doing this in Java.

  • How to create database using shell script

    hai
    how to create database using shell script

    The documentation details the steps to create a database manually. Another option is to use DBCA to create the scripts. DBCA will give you a complete set of scripts that will create a database.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref220

Maybe you are looking for

  • IPhoto doesn't bring in new uploaded photos from web gallery

    Published album to web gallery; had folks upload pics to that one; auto-sync into iPhoto worked fine. Updated OSX to 10.5.3 yesterday; had more pics uploaded from folks to the web gallery; iPhoto is not syncing anymore. Running latest upgrades. Sugge

  • IDOC script in custom element forms

    Hi, I am using Site Studio 10gr4. I was wondering if its possible to use IDOC script inside custom element forms. What I want to acheive is to display a combox box inside a custom element in a static list. The values inside the combobox are retreived

  • Assigning digital Spidf in / out put in logic LE using TC KONNEKT 24 D

    hi there.. i know LE doesnt support digital in/out puts but ive been told i have to configure is manually through my KONNECT 24d audio interface.. that i have no clue how to configure and assign these in/out puts... if any one knws how to do that ..

  • Changing the Reel Name after capture

    It appears that you can change a clip's assigned Reel Name by editing the clip's Reel attribute in the FCE browser. (If you change the Reel attribute value, you get a warning that it will modify the file on disk.) Is there any other way (or utility)

  • Burning DVD image returns error 0xC0AA0301

    Hi, HP ENVY 700-203eo/Windows 8.1 I'm trying to burn an .iso image to DVD but it fails with error code 0xC0AA0301. I have also tried burning the DVD using the included bloatware Power2Go, with similar result. Downloaded and tried ImgBurn - which also