Tuesday 25 February 2014

CLONING IN FULL SOLARIS DIFFERENT SERVER

useradd -d /export/home/oracle -g "dba" -m -s /bin/ksh oracle
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /oradata/oracle/ORC/arch
Oldest online log sequence     6613
Next log sequence to archive   6615
Current log sequence           6615

alter system switch logfile;
alter system switch logfile;
alter system switch logfile;
SQL>  archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /oradata/oracle/ORC/arch
Oldest online log sequence     6616
Next log sequence to archive   6618
Current log sequence           6618

alter database begin backup;

select * from v$backup;
col FILE_NAME format a50
select FILE_NAME,TABLESPACE_NAME,(BYTES)/1024/1024/1024,AUTOEXTENSIBLE,(MAXBYTES)/1024/1024/1024 from DBA_DATA_FILES;

scp /oradata/oracle/ORC/system/*.dbf root@192.168.20.182:/engn001/oradata/
scp /oradata/oracle/ORC/data/*.dbf root@192.168.20.182:/engn001/oradata/
scp /oradata/oracle/ORC/index/*.dbf root@192.168.20.182:/engn001/oradata/
scp /DB_Backup/oradata/*.dbf root@192.168.20.182:/engn001/oradata/
scp scrp -r *.arc root@192.168.20.182:/engn001/oradata/arch/

alter database end backup;



dbf
ora:308
=============================================================================================================================

create user
set ownership
set permission
create oratab file
create db_home tar file
then untar db_home target location
create controlfile backup file & change the location of dbf
create pfile & then change the parameter
switch archive log 3 to 4 times
database in backup mode

2.
===============================================================
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
# Select the appropriate ORACLE_BASE
ORACLE_BASE=/engn001/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0; export ORACLE_HOME
ORACLE_SID=ORC; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
===============================================================

ld.so.1: sqlplus: fatal: libsqlplus.so
April 4, 2012 1 Comment
Applies to Oracle Database 10g and higher versions, any platform.
The following settings are for Solaris 10 64-bit Operating system.
Cannot invoke sqlplus at the command line due to following library error
%sqlplus
ld.so.1: sqlplus: fatal: libsqlplus.so: open failed: No such file or directory Killed
Print shared library dependencies for sqlplus

%ldd sqlplus
        libsqlplus.so =>         (file not found)
        libclntsh.so.10.1 =>     (file not found)
        libnnz10.so =>   (file not found)
        libkstat.so.1 =>         /lib/64/libkstat.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libdl.so.1 =>    /lib/64/libdl.so.1
        libsched.so.1 =>         /usr/lib/64/libsched.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libthread.so.1 =>        /lib/64/libthread.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,Sun-Fire-V240/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,Sun-Fire-V240/lib/sparcv9/libmd_psr.so.1
Set the LD_LIBRARY_PATH to resolve the issue.
3.
=================================================================================================================
bash
export ORACLE_HOME=/engn001/oracle/product/10.2.0
export ORACLE_SID=ORC
export LD_LIBRARY_PATH=/engn001/oracle/product/10.2.0/lib:/usr/dt/lib:/usr/openwin/lib:/engn001/oracle/product/10.2.0/ctx/lib
export PATH=$ORACLE_HOME/bin:$PATH
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
==================================================================================================================
Now check the binary executable


bash-3.00$ ldd $ORACLE_HOME/bin/sqlplus
        libsqlplus.so =>
/oracle02/appslos/rdbms/10.2.0/lib/libsqlplus.so
        libclntsh.so.10.1 =>
/oracle02/appslos/rdbms/10.2.0/lib/libclntsh.so.10.1
        libnnz10.so =>   /oracle02/appslos/rdbms/10.2.0/lib/libnnz10.so
        libkstat.so.1 =>         /lib/64/libkstat.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libdl.so.1 =>    /lib/64/libdl.so.1
        libsched.so.1 =>         /usr/lib/64/libsched.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libthread.so.1 =>        /lib/64/libthread.so.1
        libm.so.1 =>     /lib/64/libm.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,Sun-Fire-V240/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,Sun-Fire-V240/lib/sparcv9/libmd_psr.so.1


4.startup nomount with pfile

db end backup then archive log switch 4 to 5 times
then scp archive to target machine
recover database using backup controlfile until cancel;
-----auto  applied archivelog mode
-----
when error throgh
-ORA-00308: cannot open archived log
-'/engn001/oradata/arch/ORC_1_6626_760818639.arc'
-ORA-27037: unable to obtain file status
-SVR4 Error: 2: No such file or directory
-Additional information: 3
it means fine the db
then after open the resetlog apply the db


=======================================================================================================
SQL>  create spfile from pfile='/engn001/oradata/initORC.ora';
 create spfile='/engn001/oracle/product/10.2.0/dbs' from pfile='/engn001/oradata/initORC.ora'
*
ERROR at line 1:
ORA-01078: failure in processing system parameters
ORA-27038: created file already exists
Additional information: 1

export ORACLE_SID=ORC
export ORACLE_HOME=/engn001/oracle/product/10.2.0
sqlplus "/ as sysdba"
create spfile from pfile='/engn001/oradata/initORC.ora';
check the cat dbs/spfile.ora the parameters are same or not
========================================================================================================


 

No comments: