Posted in 2016

a GNS fairytale

I don’t really understand the purpose of GNS and how to configure it. If I understand this article good I need to have let’s say 3 PCs.

dns.example.com eth0 192.168.10.250/24
rac1.example.com eth0 192.168.10.1/24 eth1 192.168.192.1/24
rac2.example.com eth0 192.168.10.2/24 eth1 192.168.192.2/24

On the dns.example.com I create my DNS configuration as for a standard cluster.

rac1  192.168.10.1
rac1-priv 192.168.192.1
rac2 192.168.10.2
rac2-priv 192.168.192.2

and

gns.example.com 192.168.10.100

in the resolv.conf

options attempts: 2
options timeout: 1

search example.com
nameserver 192.168.10.250
nameserver 192.168.10.100

and after I have setup this it should be possible to create a Grid installation with GNS?
if the answer is no, why do I need a subdomain?

Edit:
GNS configuration for Oracle 11gR2 in DNS using DHCP

Advertisements
Posted in 2016

Recovering a PDB

I have to continue my DBA journey even though I don’t have the possibility to use multitenant. (I wanted a RAC, now I have a RAC, now I need an Exadata, Multitenant, a private cloud, maybe goldengate and an environment where I can use storage snapshots for cloning. ) Well, no job is in this world really perfect, maybe only working for Oracle in a DBA team would open the true door to Oracle’s features, but there must be a complication too, because as written at the beginning, nothing is perfect.

SQL> show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 RCAT 			  READ WRITE NO

[oracle@test ~]$ rman target=/

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Jun 14 13:59:37 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RCLOUD (DBID=3718501809)

RMAN> backup as compressed backupset database plus archivelog delete input ;

RMAN> list backup summary ;

List of Backups
===============
Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------- ------- ------- ---------- ---
20      B  A  A DISK        14.06.2016 14:00:04 1       1       YES        TAG20160614T140004
21      B  F  A DISK        14.06.2016 14:00:16 1       1       YES        TAG20160614T140006
22      B  F  A DISK        14.06.2016 14:00:27 1       1       YES        TAG20160614T140006
23      B  F  A DISK        14.06.2016 14:00:34 1       1       YES        TAG20160614T140006
24      B  A  A DISK        14.06.2016 14:00:35 1       1       YES        TAG20160614T140035
25      B  F  A DISK        14.06.2016 14:00:36 1       1       NO         TAG20160614T140036

[oracle@test ~]$ sqlplus psorger@rcat

SQL*Plus: Release 12.1.0.2.0 Production on Tue Jun 14 14:01:04 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter password:
Last Successful login time: Tue Jun 14 2016 13:52:15 +02:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> create table test (id number) ;

Table created.

SQL> select timestamp_to_scn(systimestamp) from dual ;

TIMESTAMP_TO_SCN(SYSTIMESTAMP)
------------------------------
		       1008446

SQL> insert into test values (1) ;
insert into test values (1)
            *
ERROR at line 1:
ORA-01950: no privileges on tablespace 'USERS'
SQL> connect / as sysdba
Connected.
SQL> alter session set container=rcat ;

Session altered.

SQL> alter user psorger quota unlimited on users ;

User altered.

SQL> insert into psorger.test values (1) ;

1 row created.

SQL> commit ;

Commit complete.

SQL> select timestamp_to_scn(systimestamp) from dual ;

TIMESTAMP_TO_SCN(SYSTIMESTAMP)
------------------------------
		       1008513

[oracle@test ~]$ rman target=/

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Jun 14 14:04:08 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RCLOUD (DBID=3718501809)

RMAN> backup as compressed backupset database plus archivelog delete input ;

RMAN> list backup summary ;

List of Backups
===============
Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------- ------- ------- ---------- ---
20      B  A  A DISK        14.06.2016 14:00:04 1       1       YES        TAG20160614T140004
21      B  F  A DISK        14.06.2016 14:00:16 1       1       YES        TAG20160614T140006
22      B  F  A DISK        14.06.2016 14:00:27 1       1       YES        TAG20160614T140006
23      B  F  A DISK        14.06.2016 14:00:34 1       1       YES        TAG20160614T140006
24      B  A  A DISK        14.06.2016 14:00:35 1       1       YES        TAG20160614T140035
25      B  F  A DISK        14.06.2016 14:00:36 1       1       NO         TAG20160614T140036
26      B  A  A DISK        14.06.2016 14:04:29 1       1       YES        TAG20160614T140429
27      B  F  A DISK        14.06.2016 14:04:41 1       1       YES        TAG20160614T140430
28      B  F  A DISK        14.06.2016 14:04:52 1       1       YES        TAG20160614T140430
29      B  A  A DISK        14.06.2016 14:04:53 1       1       YES        TAG20160614T140453
30      B  F  A DISK        14.06.2016 14:04:54 1       1       NO         TAG20160614T140454

RMAN> alter pluggable database rcat close ;

Statement processed

RMAN> run {
2> set until scn 1008446 ;
3> restore pluggable database rcat ;
4> recover pluggable database rcat ;
5> alter pluggable database rcat open resetlogs ;
6> }
Posted in 2016

Discovering new features

Reading the documentation from the beginning to the end is always hard work. Mostly you already know these things, but Oracle adds always something new. Well I started today with the Database Administrator’s Guide and voila:

alter system quiesce restricted ;
alter system unquiesce ;

– you can put the database into a quiet state, all transactions will become blocked.