How to create PDB from backup? Oracle XE - oracle

I have two machines with Oracle XE.
I created a backup on machine 1
rman TARGET /
rman> backup keep until time 'sysdate+1' format 'c:\BackupDB\test_db%u' tag 'my_bkup' (database ROOT) (pluggable database 'pdb$seed', mypdb);
I did a clean install Orcale XE and transferred the backup files to machine 2. How to create/clone/move a PDB from a backup file in a database on machine 2?

Related

Oracle RAC RMAN Backup not writing to NFS Share

run {
SET nocfau;
ALLOCATE CHANNEL CH0 DEVICE TYPE DISK FORMAT '/nfs/datafile/%U_%T';
ALLOCATE CHANNEL CH1 DEVICE TYPE DISK FORMAT '/nfs/datafile/%U_%T';
ALLOCATE CHANNEL CH2 DEVICE TYPE DISK FORMAT '/nfs/datafile/%U_%T';
ALLOCATE CHANNEL CH3 DEVICE TYPE DISK FORMAT '/nfs/datafile/%U_%T';
BACKUP AS COPY INCREMENTAL LEVEL 0 TAG 'INCR_MERGE' DATABASE;
BACKUP ARCHIVELOG ALL FORMAT '/nfs/archivelogs/%U' NOT BACKED UP 1 TIMES;
RELEASE CHANNEL CH0;
RELEASE CHANNEL CH1;
RELEASE CHANNEL CH2;
RELEASE CHANNEL CH3;
}
The above is the rman script to run backup for Oracle RAC. I have NFS share that is mounted with following options: rw,user,hard,noac,vers=4
The NFS Server has the following export: NFSv4,rw,no_root_squash,no_all_squash,secure
The issue is that nothing gets written to the NFS share. I can create files, copy large files, but when RMAN is run nothing is copied to the NFS share.
The RMAN process runs till it's terminated.
When I do nfsiostat -a it shows 5 mandatory GETATTR requests.
Does it mean the Oracle datafiles are not being written in NFS share because the file attributes along with file uid/gid is not being successfully retrieved?
Update: tried running the backup on Oracle 19c RAC setup
Get the following RMAN error
RMAN-03009: failure of backup command on CH0 channel at 08/24/2020 16:59:11
ORA-19504: failed to create file "/home/oracle/nfs/ractest/1178998226/full/datafile/data_D-ORAMS19C_I-1178998226_TS-SYSAUX_FNO-3_rhv8m5mt_20200824"
ORA-17503: ksfdopn:11 Failed to open file /home/oracle/nfs/ractest/1178998226/full/datafile/data_D-ORAMS19C_I-1178998226_TS-SYSAUX_FNO-3_rhv8m5mt_20200824
ORA-17500: ODM err: No such file or directory
I ran the rman backup on a local disk they succeed and the datafiles have the group asmadmin. Do backups fail on NFS share becuase the datafile attributes/group information is not being copied to the NFS share?
The oracle user is not part of the asmadmin group.
Your NFS options are wrong for RMAN. For Oracle RAC, they should be as follows:
rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600
These options are required, per Oracle documentation. Also, the use of the "noac" option is specifically a problem for RMAN and should not be used.
It seems to be an issue with Oracle 12.1, Following the oracle support document and applying the patch(20720667) provided has resolved the issue. Here is the link

is it possible to recover the Oracle Data Pump master table?

I'm trying to import a few files with a published Oracle Data Pump perl script: dumpinfo.pl
After successfully importing several dump files from the same export process, another file failed with:
# impdp system/****** DIRECTORY=RESTORE_DIR DUMPFILE=exp_%u.dmp PARALLEL=8
Import: Release 11.2.0.2.0 - Production on Mon Jul 7 11:40:37 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39059: dump file set is incomplete
ORA-39246: cannot locate master table within provided dump files
The script reports that it can't find a master table. Assuming that the master table is lost, there any mechanics for recover it?
Thanks...
ORA-39246 cannot locate master table within provided dump files
Cause: Check the export log file and make sure all of the files that
were exported are included in the current job. Action: A Data Pump
IMPORT or SQL_FILE operation was being performed but not all of the
files from the Data Pump export dump file set were included. In
particular, the dump file containing the export job's master table was
not provided.
Check that you have all dump files in that directory and they all are accessible to impdp utility. I got this error when our backup team has restored first five dmp files, and two last ones were missing.

Oracle 11g directory objects to remote path

We're in the process of migrating over a system from Oracle 10G (windows 2003 32 bit) to 11G (on windows 2008 R2 64bit), where currently, our backup process consist a directory object that points to a remote (unc) path on our storage box so that we don't have to perform the expdp locally, and then move the file, which seems to work without issue, however on our new windows 2008 box with 11G, I can create the directory object and test it through the EM console, however whenever I try to run my import, I get the following:
Connected to: Oracle Database 11g Release 11.2.0.2.0 - 64bit ProductionWith the Automatic
Storage Management option
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
Any ideas?? Just trying to test with metadata_only right now to troubleshoot this, but still no luck.
E:\>impdp xxxxx/xxxxx#prod CONTENT=METADATA_ONLY directory=Restoreloc dumpfile=XXXXX_
MAY172011.DMP logfile=XXXXXIMPDP.log exclude=grant
Ensure that the oracle process has write access to the directory.
or
You have to manually create directory in specified path then try your operation.
Check this post.

Oracle tns listener error

I've just installed Oracle 10g When I try to connect to oracle db i get an error:
could not start OracleOraHome92TNSListener
when i got to services and try to start it, it says that the file doesnt exist. the service file is C:\oracle\ora92\BIN\TNSLSNR (TNSLSNR is a file not a directory)
C:\oracle\ora92\BIN\TNSLSNR doesn't exist on my machine at all. do you know how to get it?
Could not start the Oracle Ora92 Listener service on Local Computer.Error 2: The system cannot find the file specified
Here's a couple of issues I see. You say you installed 10g but the error is a 9.2 error. It could be that your computer already had an Oracle 9i on it that was mis-configured or uninstalled and that is leading to the error.
You need to check your disk and find the ORACLE_HOME (directory) where Oracle 10g was installed. Once you find that you can adjust the PATH and ORACLE_HOME and TNS_ADMIN environment variables to point to the right place. This should allow you to start the database and the listener.
If you need to install the Oracle Client for 10g then this information below will be helpful as well.
The Oracle client can be installed separately. Just go to this address, download the client and unzip it into a subdirectory and then run the Oracle Universal Installer by running setup.exe from the directory.
Oracle Downloads Page

Oracle moving / transferring schemas from one server to another

I am having to move databases from one server to another.
Oracle on Server A has died so I can't back up the existing databases in order to move them across.
I was wondering if there is another way to move databases across servers in Oracle.
There is a way of coping some data and control files and installing them in a new server.
See: User-Managed Backup and Recovery Guide
http://download.oracle.com/docs/cd/B10501_01/server.920/a96572/toc.htm
( but look for the correct version of your database)
For example something like:
% cp /disk1/oracle/dbs/*.dbf /disk2/backup
% cp /disk1/oracle/dbs/*.cf /disk2/backup
% cp /disk1/oracle/network/admin/*.ora /disk2/backup
% cp /disk1/oracle/rdbms/admin/*.ora /disk2/backup
If the old database shut down relatively cleanly you should be able to just copy the db files over to the new host. "db files" includes datafiles, tempfiles, control files, and online redo logs (off the top of my head). If you can make the directory structures on the new host the same as the old ones, you should then just be able to source the correct environment (including ORACLE_SID) and then issue a startup from SQL*Plus. You use the phrase "Oracle service" in your answer to my question, so I'm guessing you are on Windows - I don't know how you go about re-registering it as a Windows service.
If the servers are the same os then yes. You can create the same directory structure on the new server as the old. Install the oracle software and patch it to the same version as on the old window server. Copy all the datafiles, control files, spfile , etc to their respective location on the new server. Using the account you install oracle which has administrator privelege and belonging to the dba group, run oradim to add the service to windows to start oracle, point it to the spfile of your database.
ORADIMxx -NEW -SID -INTPWD -STARTMODE
-PFILE
or with newer database version:
ORADIM -NEW -SID | -ASMSID [-SYSPWD password]
[-STARTMODE auto | manual] [-SRVCSTART system | demand]
[-PFILE filename | -SPFILE]

Resources