Visit Counter

Thursday, November 14, 2013

How to unplug a PDB and Plug it back into the same CDB



You have just unplugged a PDB and want to know how to eventually plug it back into the same container.
Let's assume I have a pluggable database named PDB1 and I am just able to unplug it using the following commands: 


Container Database:   CDB1
Pluggable Databases: PDB1 , PDB2


$ ORACLE_HOME='/ora/oracle/app/oracle/product/12.1.0/dbhome_1/bin
$ export ORACLE_HOME

$ ORACLE_SID=cdb1
$ export ORACLE_SID


SQL>  alter pluggable database pdb1 close immediate; 

Pluggable database altered.

SQL> alter pluggable database PDB1 unplug into '/ora/oracle/app/oracle/oradata/cdb1/pdb1.xml';    

Pluggable database altered.  


If you query the CDB_PDBS view you can receive useful information about all PDBs contained: id, name, unique identifiers, SCN at the time of creation and the status.
The STATUS column has several values:

  • NEW, the pdb has been created but never opened 
  • NORMAL, pdb available to be used 
  • UNPLUGGED, the pdb has been unplugged 
  • NEEDS UPGRADE, the pdb must be upgraded 
  • CONVERTING, a non-CDB is going to be converted into a pdb 
  • UNUSABLE, the pdb cannot be used (creation in progress) 
In my case the PDB1 pluggable database is in an UNPLUGGED status as expected: 


SQL> select * from CDB_PDBS;  

SQL> select * from CDB_PDBS;    

   PDB_ID PDB_NAME     DBID    CON_UID GUID        STATUS    CREATION_SCN     CON_ID  
---------- ---------- ---------- ---------- -------------------------------- ------------- ------------ ----------  

  2 PDB$SEED   4063489868 4063489868 E19363E52C005C9AE045000000000001 NORMAL      233   1  

  3 PDB2     1701599811 1701599811 E1F26215682E1142E045000000000001 NORMAL  1821405   1  

  4 PDB1     1497027100 1497027100 E1F329ECE0F411E6E045000000000001 UNPLUGGED  1844390   1  


To plug again the pluggable database PDB003 inside the original container (CDB001) you cannot use a syntax like: ALTER PLUGGABLE DATABASE ... PLUG (it doesn't exist in the "SQL Language Reference" manual a PLUG clause) ... 

SQL> alter pluggable database pdb1 plug;
alter plugable database pdb1 plug
                                            *
ERROR at line 1:
ORA-00922: missing or invalid option


... neither you can simply use CREATE PLUGGABLE DATABASE ... USING SQL> create pluggable database PDB003 using
 '/ora/oracle/app/oracle/oradata/cdb1/pdb1.xml' nocopy tempfile  reuse;

SQL> create pluggable database PDB003 using
          '/ora/oracle/app/oracle/oradata/cdb1/pdb1.xml' nocopy tempfile 

      reuse  *  ERROR at line 1:  
      ORA-65012: Pluggable database PDB003 already exists.  

you need first to drop the pluggable database (DROP PLUGGABLE DATABASE command) and then create it again (CREATE PLUGGABLE DATABASE command).
In this way the pluggable database is plugged again into the same CDB and using the same PDB name.
Have a look at the following commands: 


SQL> drop pluggable database PDB003;   

Pluggable database dropped.    

SQL> create pluggable database PDB1 using 
           '/ora/oracle/app/oracle/oradata/cdb1/pdb1.xml' nocopy;                   

Pluggable database created.    

SQL> select PDB_NAME, STATUS from CDB_PDBS;    

PDB_NAME   STATUS   
---------- -------------   
PDB$SEED   NORMAL   
PDB2       NORMAL   
PDB1       NEW    
  
SQL> alter session set container=PDB1;   

Session altered.    

SQL> alter database open;   

Database altered.    

SQL> select count(*) from emp.T1;    

 COUNT(*) 
----------  

       100  


Have a look again at the CDB_PDBS view and note the differences compared with the previous results.
All the unique identifiers of PDB003 have been recreated. 



Open another terminal & run the command.


SQL> select * from CDB_PDBS;   

   PDB_ID PDB_NAME     DBID    CON_UID GUID        STATUS    CREATION_SCN     CON_ID  ---------- ---------- ---------- ---------- -------------------------------- ------------- ------------ ----------  

2 PDB$SEED   4063489868 4063489868 E19363E52C005C9AE045000000000001 NORMAL      233   1 3 PDB1     1701599811 1701599811 E1F26215682E1142E045000000000001   NORMAL  1821405   1    4 PDB2     1497027100 1497027100 E1F329ECE0F411E6E045000000000001   NORMAL  1844390   1    




Wednesday, November 6, 2013

How to move the image catalog on a Solaris Server



Move Net backup catalog images to New location.


1. Shut down the NetBackup services on the master server. This may be done by running:

#  /usr/openv/netbackup/bin/netbackup stop

Check the status of Netbackup server.

# ./bpps -a 

2. Copy the contents of the /usr/openv/netbackup/db/images directory to its new location, then rename the old images directory to images_bak as a backup copy.

# cp -pr /usr/openv/netbackup/db/images /disk1/netbackup/db/images 


3. Rename the old images directory to images_bak as a backup copy:
# mv /usr/openv/netbackup/db/images /usr/openv/netbackup/db/images_bak 

4. Create a symbolic link from /usr/openv/netbackup/db/images to the new location:
# ln -s /disk1/netbackup/db/images /usr/openv/netbackup/db/images

5. Restart NetBackup services by running:

# /usr/openv/netbackup/bin/netbackup start

Tuesday, November 5, 2013

Unix Info about Processor & Core



number of physical cpu: "psrinfo -p"
number of cores: "kstat cpu_info|grep core_id|sort -u|wc -l"
number of threads: "psrinfo -pv"

Number of Physical CPU


# psrinfo -p

2

Number of Cores:

 # kstat cpu_info|grep core_id|sort -u|wc -l

  2

Number of threads:

 # psrinfo -pv

The physical processor has 1 virtual processor (0)
UltraSPARC-IIIi (portid 0 impl 0x16 ver 0x34 clock 1503 MHz)
The physical processor has 1 virtual processor (1)
UltraSPARC-IIIi (portid 1 impl 0x16 ver 0x34 clock 1503 MHz)





Sunday, November 3, 2013

Upgrade Firmware StorageTek SL24 Autoloader



Launch the Autoloader On-Board Remote Managment Interface (RMI) from a Web based browser by entering the IP address of the Autoloader in the browser address bar.

Caution: Before you perform the upload, make sure there are no processes or applications accessing the autoloader. If there are, shut down the process or application, or pause the operation, until the upload completes.

Login Account Type: Adminstrator

After entering the Adminstrator password,
select the Sign In button
Select the Support tab at the top of the page.
Select the Firmware tab under the Support banner.


















Use the Browse button to locate the firmware file (SUN_SL24_E.80.frm)
Select the Update button to start the firmware download.
Select the OK button when the Are you sure? message pops up on your screen.
On the left side of the screen, is a Download Progress bar.









A browser window will appear that states:
Autoloader Reboot
Please wait while the system is rebooting.
This page refreshes after 140 seconds.
If the page doesn't refresh automatically press the "refresh" button on your browser.
The Login screen will reappear in your browser.
Login into the Autoloader (User or Administrator, you many need to login twice)

The new Autoloader f/w level will be listed under Identity tab / Autloader tab.











Sunday, September 15, 2013

Restore Windows Active Directory User Using GRT Backup



Restore Individual Object from AD GRT backup 


Restore individual  user from windows active 2008 using GRT backup we have to duplicate data from tape to disk and then restore from disk to original location.


GRT Backup


GRT Backup ------> Disk --------> Tape


GRT Restore  


 Tape ------>  Disk -------> Windows Server


1. Open netbackup enterprise server.


Click on catalog and select the below options.


Media ID : 0058L4                 Copies:      Primary Copy           Actions:     Duplicate


Click on search button.


















3. Primary: Copy1   Storage Unit: GRT_backup  Retention: 1 Week










4.Click on Ok





5. Go to Activity Monitor





6. See the Detailed Status

7. Click on catalog and see the result.

















8.


Active Directory --->
                               DC =afigroup   ---->
                                                           OU = Trading ---->
                                                                                      OU = MIS --->
                                                                                                               CN = test3












Monday, August 26, 2013

Oracle 11g DB 64-bit Installation on Linux Suse ( Invalid source path specified for unzip)



Common Installation error.




Solution:

1. Download Oracle 11G Database.
2. Linux.x64_11gR2_Database_1of2.zip & Linux.x64_11gR2_Database_2of2.zip
3. Unzip both zipped files.
4. It will create to folders etc...database & database (2).
5.Goto to second folder etc...database (2)
6. Copy the following directories under below path.
/database (2)/stage/components/
oracle.ctx
oracle.jdk
oracle.owb.rsf
oracle.rdbms.install.seeddb
oracle.sysman.console.db

7. Paste all directories in below path.

/database/stage/components/

8. Run the installation.



Wednesday, August 21, 2013

Windows Active Directory GRT Backup Failed




GRT Backup Failed.


































































































































Client:

Create the log bpcd directory under below path on netbackup client.

C:\Program Files\Veritas\NetBackup\logs



Master Server:

  # ./bptestbpcd -client afidc01 -verbose -debug


09:38:30.721 [5850] <2> bptestbpcd: VERBOSE = 5
09:38:30.723 [5850] <2> read_client: dname=., offline=0, online_at=0 offline_at=0
09:38:30.723 [5850] <2> read_client: dname=.., offline=0, online_at=0 offline_at=0
09:38:30.723 [5850] <2> read_client: dname=CO_0, offline=0, online_at=0 offline_at=0
09:38:30.723 [5850] <2> read_client: dname=OA_0, offline=0, online_at=0 offline_at=0
09:38:30.723 [5850] <2> read_client: dname=host_info, offline=0, online_at=0 offline_at=0
09:38:30.724 [5850] <2> db_freeEXDB_INFO: ?
09:38:30.724 [5850] <2> local_bpcr_connect: bpcr.c.278: connect_opts = 0x01030202 connect_opts2 = 0x01000100
09:38:30.724 [5850] <2> local_bpcr_connect: bpcr.c.285: connect_opts = 0x01000100
09:38:30.725 [5850] <2> local_bpcr_connect: bpcr.c.324: daemon_port_type = 0
09:38:30.726 [5850] <2> vnet_sortaddrs: [vnet_addrinfo.c:3954] sorted addrs: 1 0x1
09:38:30.727 [5850] <2> vnet_get_pref_netconnection: [vnet_addrinfo.c:4828] using interface  ANY
09:38:30.727 [5850] <2> vnet_sortaddrs: [vnet_addrinfo.c:3954] sorted addrs: 1 0x1
09:38:30.727 [5850] <2> vnet_get_pref_netconnection: [vnet_addrinfo.c:4828] using interface  ANY
09:38:30.727 [5850] <2> vnet_sortaddrs: [vnet_addrinfo.c:3954] sorted addrs: 1 0x1
09:38:30.727 [5850] <2> vnet_get_pref_netconnection: [vnet_addrinfo.c:4828] using interface  ANY
09:38:30.728 [5850] <2> async_connect: [vnet_connect.c:1477] connect in progress 1 0x1
09:38:30.732 [5850] <2> vnet_pbxConnect: pbxConnectEx Succeeded
09:38:30.733 [5850] <2> do_pbx_service: [vnet_connect.c:2116] via PBX bpcd CONNECT FROM 192.0.0.198.47121 TO 192.0.0.51.1556 fd = 4
09:38:30.733 [5850] <2> async_connect: [vnet_connect.c:1644] connect async CONNECT FROM 192.0.0.198.47121 TO 192.0.0.51.1556 fd = 4
09:38:30.733 [5850] <2> connect_to_service: connect succeeded STATUS (0) SUCCESS FROM 0.0.0.0 TO afidc01 192.0.0.51 bpcd VIA pbx
09:38:30.733 [5850] <2> init_resilient_cache: [vnet_nbrntd.c:869] Initialize resilient cache. 0 0x0
09:38:30.733 [5850] <2> logconnections: BPCD CONNECT FROM 192.0.0.198.47121 TO 192.0.0.51.1556 fd = 4
09:38:30.734 [5850] <2> vnet_sortaddrs: [vnet_addrinfo.c:3954] sorted addrs: 1 0x1
09:38:30.734 [5850] <2> vnet_get_pref_netconnection: [vnet_addrinfo.c:4828] using interface  ANY
09:38:30.735 [5850] <2> vnet_sortaddrs: [vnet_addrinfo.c:3954] sorted addrs: 1 0x1
09:38:30.735 [5850] <2> vnet_get_pref_netconnection: [vnet_addrinfo.c:4828] using interface  ANY
09:38:30.735 [5850] <2> async_connect: [vnet_connect.c:1477] connect in progress 1 0x1
09:38:30.737 [5850] <2> vnet_pbxConnect: pbxConnectEx Succeeded
09:38:30.782 [5850] <8> do_pbx_service: [vnet_connect.c:2108] via PBX VNETD CONNECT FROM 192.0.0.198.47122 TO 192.0.0.51.1556 fd = 5
09:38:30.782 [5850] <2> async_connect: [vnet_connect.c:1644] connect async CONNECT FROM 192.0.0.198.47122 TO 192.0.0.51.1556 fd = 5
09:38:30.782 [5850] <2> connect_to_service: connect succeeded STATUS (0) SUCCESS FROM 0.0.0.0 TO 192.0.0.51 192.0.0.51 vnetd VIA pbx
09:38:30.782 [5850] <8> vnet_vnetd_connect_forward_socket_begin: [vnet_vnetd.c:443] VN_REQUEST_CONNECT_FORWARD_SOCKET 10 0xa
09:38:30.990 [5850] <8> vnet_vnetd_connect_forward_socket_begin: [vnet_vnetd.c:460] ipc_string 50682
09:38:31.051 [5850] <2> vnet_vnetd_connect_forward_socket_begin: [vnet_vnetd.c:471] hash_str1 17cf5b2037093624e12d99d2098cee4f
1 1 1
192.0.0.198:47121 -> 192.0.0.51:1556
192.0.0.198:47122 -> 192.0.0.51:1556
09:38:31.200 [5850] <2> bpcr_get_peername_rqst: Server peername length = 17
09:38:31.260 [5850] <2> bpcr_get_hostname_rqst: Server hostname length = 7
09:38:31.320 [5850] <2> bpcr_get_clientname_rqst: Server clientname length = 7
09:38:31.380 [5850] <2> bpcr_get_version_rqst: bpcd version: 07500004
09:38:31.440 [5850] <2> bpcr_get_platform_rqst: Server platform length = 7
09:38:31.500 [5850] <2> bpcr_get_version_rqst: bpcd version: 07500004
09:38:31.560 [5850] <2> bpcr_patch_version_rqst: theRest == > <
09:38:31.561 [5850] <2> bpcr_get_version_rqst: bpcd version: 07500004
09:38:31.620 [5850] <2> bpcr_patch_version_rqst: theRest == > <
09:38:31.621 [5850] <2> bpcr_get_version_rqst: bpcd version: 07500004
PEER_NAME = backupserver-baan
HOST_NAME = afidc01
CLIENT_NAME = afidc01
VERSION = 0x07500004
PLATFORM = win_x64
PATCH_VERSION = 7.5.0.6
SERVER_PATCH_VERSION = 7.5.0.6
MASTER_SERVER = backupserver-baan
EMM_SERVER = backupserver-baan
NB_MACHINE_TYPE = CLIENT
09:38:31.681 [5850] <2> vnet_sortaddrs: [vnet_addrinfo.c:3954] sorted addrs: 1 0x1
09:38:31.681 [5850] <2> vnet_get_pref_netconnection: [vnet_addrinfo.c:4828] using interface  ANY
09:38:31.681 [5850] <2> vnet_sortaddrs: [vnet_addrinfo.c:3954] sorted addrs: 1 0x1
09:38:31.681 [5850] <2> vnet_get_pref_netconnection: [vnet_addrinfo.c:4828] using interface  ANY
09:38:31.682 [5850] <2> async_connect: [vnet_connect.c:1477] connect in progress 1 0x1
09:38:31.684 [5850] <2> vnet_pbxConnect: pbxConnectEx Succeeded
09:38:31.715 [5850] <8> do_pbx_service: [vnet_connect.c:2108] via PBX VNETD CONNECT FROM 192.0.0.198.47123 TO 192.0.0.51.1556 fd = 6
09:38:31.716 [5850] <2> async_connect: [vnet_connect.c:1644] connect async CONNECT FROM 192.0.0.198.47123 TO 192.0.0.51.1556 fd = 6
09:38:31.716 [5850] <2> connect_to_service: connect succeeded STATUS (0) SUCCESS FROM 0.0.0.0 TO 192.0.0.51 192.0.0.51 vnetd VIA pbx
09:38:31.716 [5850] <8> vnet_vnetd_connect_forward_socket_begin: [vnet_vnetd.c:443] VN_REQUEST_CONNECT_FORWARD_SOCKET 10 0xa
09:38:31.927 [5850] <8> vnet_vnetd_connect_forward_socket_begin: [vnet_vnetd.c:460] ipc_string 50684
09:38:31.980 [5850] <2> vnet_vnetd_connect_forward_socket_begin: [vnet_vnetd.c:471] hash_str1 59315d05334ef517e801b150ae806307
192.0.0.198:47123 -> 192.0.0.51:1556
<2>bptestbpcd: EXIT status = 0
09:38:32.068 [5850] <2> bptestbpcd: EXIT status = 0


Go to Windows Client services and change the netbackup services with the administrator privilege.


Netbackup Legacy Network Services
Netbackup Legacy Client Services
Netbackup Client Services