Installing 12c Cloud Control R5
8/24/2015 07:48:00 PM
Gönderen Mete Karar
$ unzip em12105_linux64_disk1.zip -d oem
$ unzip em12105_linux64_disk2.zip -d oem
$ unzip em12105_linux64_disk3.zip -d oem
I'll choose to install in Simple mode and keep settings and preferences as default. You can move on with advanced type to customize configuration.
Set database connection parameters.
Run root script
On the summary screen you may find URLs to access Enterprise Manager.
Next step is deploying agents...
Installing 12c Database for 12c Cloud Control
8/24/2015 07:44:00 PM
Gönderen Mete Karar
Choose to install software only. It'll be a single instance.
Choose advanced mode to continue:
Select Database Template fro EM according to your EM deployment size; small, medium or large.
Set your database name
De-select "Configure EM Database Express"
Set appropriate directories for database files
Select the following script file to run. It'll set a couple of parameters:
/u01/app/oracle/product/12.1.0.2/dbhome_1/assistants/dbca/templates/shpool_12.1.0.2.0_Database_SQL_for_EM12_1_0_5_0.sql
Set SGA and PGA according to your server size:
Connection Timeouts and DNS
2/24/2015 10:25:00 PM
Gönderen Mete Karar
$ truss -aefo tnsping.trc tnsping <tns_db>
30539848: 31654123: _getpid() = 30539848
30539848: 31654123: kopen("/etc/resolv.conf", O_RDONLY) = 5
30539848: 31654123: kioctl(5, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
30539848: 31654123: kioctl(5, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
30539848: 31654123: kread(5, " n a m e s e r v e r 1".., 4096) = 114
30539848: 31654123: kread(5, " n a m e s e r v e r 1".., 4096) = 0
30539848: 31654123: statx("/etc/resolv.conf", 0x0FFFFFFFFFFF9108, 176, 0) = 0
30539848: 31654123: close(5) = 0
30539848: 31654123: socket(1, 1, 0) = 5
30539848: 31654123: kfcntl(5, F_SETFD, 0x0000000000000001) = 0
30539848: 31654123: connext(5, 0x0FFFFFFFFFFF8BD8, 1025) Err#2 ENOENT
30539848: 31654123: close(5) = 0
30539848: 31654123: kopen("/etc/netsvc.conf", O_RDONLY) = 5
30539848: 31654123: kioctl(5, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
30539848: 31654123: kioctl(5, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
30539848: 31654123: kread(5, " # @ ( # ) 4 3 ".., 4096) = 4096
30539848: 31654123: kread(5, " o n a n d r e s o l".., 4096) = 638
30539848: 31654123: close(5) = 0
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: kopen("/etc/hesiod.conf", O_RDONLY) Err#2 ENOENT
30539848: 31654123: __libc_sbrk(0x0000000000010020) = 0x00000001106A4D40
30539848: 31654123: kopen("/etc/irs.conf", O_RDONLY) Err#2 ENOENT
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: getdomainname(0x09001000A02273B0, 1024) = 0
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: getdomainname(0x09001000A02273B0, 1024) = 0
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: getdomainname(0x09001000A02273B0, 1024) = 0
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: getdomainname(0x09001000A02273B0, 1024) = 0
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: _thread_self() = 31654123
30539848: 31654123: kopen("/etc/hosts", O_RDONLY) = 5
30539848: 31654123: kioctl(5, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
30539848: 31654123: kfcntl(5, F_SETFD, 0x0000000000000001) = 0
30539848: 31654123: kioctl(5, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
30539848: 31654123: kread(5, " # @ ( # ) 4 7\t 1 . 2".., 4096) = 2018
30539848: 31654123: kread(5, " # @ ( # ) 4 7\t 1 . 2".., 4096) = 0
30539848: 31654123: close(5) = 0
30539848: 31654123: kopen("/etc/hosts", O_RDONLY) = 5
30539848: 31654123: kioctl(5, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
30539848: 31654123: kfcntl(5, F_SETFD, 0x0000000000000001) = 0
30539848: 31654123: kioctl(5, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
30539848: 31654123: kread(5, " # @ ( # ) 4 7\t 1 . 2".., 4096) = 2018
30539848: 31654123: kread(5, " # @ ( # ) 4 7\t 1 . 2".., 4096) = 0
30539848: 31654123: socket(2, 2, 0) = 6
30539848: 31654123: getsockopt(6, 65535, 4104, 0x0FFFFFFFFFFF7BE4, 0x0FFFFFFFFFFF7BE0) = 0
30539848: 31654123: connext(6, 0x09001000A0167878, 16) = 0
30539848: 31654123: _esend(6, 0x0FFFFFFFFFFF8AF0, 35, 0, 0x0000000000000000) = 35
30539848: 31654123: _poll(0x0FFFFFFFFFFF7CB0, 1, 1000) = 1
30539848: 31654123: _enrecvfrom(6, 0x0FFFFFFFFFFF9E20, 1024, 0, 0x0FFFFFFFFFFF8470, 0x0FFFFFFFFFFF7C98, 0x0000000000000000) = 104
30539848: 31654123: _esend(6, 0x0FFFFFFFFFFF8AF0, 47, 0, 0x0000000000000000) = 47
30539848: 31654123: _poll(0x0FFFFFFFFFFF7CB0, 1, 1000) = 1
30539848: 31654123: _enrecvfrom(6, 0x0FFFFFFFFFFF9E20, 1024, 0, 0x0FFFFFFFFFFF8470, 0x0FFFFFFFFFFF7C98, 0x0000000000000000) = 122
30539848: 31654123: close(6) = 0
30539848: 31654123: close(5) = 0
Spatial Index Creation Fails with ORA-01031
2/24/2015 10:17:00 PM
Gönderen Mete Karar
While re-creating a spatial index it failed as follow:
DROP INDEX TEST.SIX_POLYGON;
CREATE INDEX TEST.SIX_POLYGON ON TEST.POLYGON (GEOLOC) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('TABLESPACE=INDEX_TS') NOPARALLEL;
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in R-tree: [mdrcrtscrt]
ORA-13231: failed to create index table [MDRS_1EEB04$] during R-tree creation
ORA-13249: Stmt-Execute Failure: CREATE SEQUENCE "TEST".MDRS_1EEB04$ ORDER START WITH 1 CACHE 100
ORA-29400: data cartridge error
ORA-01031: insufficient privileges
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
After some digging in, I found the missing privilege: create sequence. You can check if the user has required rights by:
select privilege
from DBA_SYS_PRIVS
where privilege in ('CREATE TABLE', 'CREATE SEQUENCE' )
and grantee = 'TEST';
All needed is to grant create sequence to the target user before creating index. Afterwards you can revoke the right:
GRANT CREATE SEQUENCE TO TEST;
CREATE INDEX TEST.SIX_POLYGON ON TEST.POLYGON (GEOLOC) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('TABLESPACE=INDEX_TS') NOPARALLEL;
Upgrade Failed with PRKO-3226
1/18/2015 06:21:00 PM
Gönderen Mete Karar
PRKO-3226 : Upgrade from version 11.2.0.4.0 to version 11.2.0.4.0 using srvctl upgrade model command of version 11.2.0.4.0 is not supported
When it's queried, CRS's version seems upgraded:
$ crsctl query crs softwareversion
Oracle Clusterware version on node [node2] is [11.2.0.4.0]
Exadata and iPhone
4/10/2014 01:34:00 AM
Gönderen Mete Karar
I never thought one day I will find a similarity between Oracle Exadata and iPhone. But it was before Oracle announced X4-2C, the colorful Exadata:)
However, I don't think that X4-2C is cheaper as iPhone 5C is, since it's a limited edition...
Data Redaction in Oracle 12c and 11gR2
4/10/2014 01:13:00 AM
Gönderen Mete Karar
begin
dbms_redact.add_policy (
object_schema => 'DEMO',
object_name => 'CUSTOMERS',
column_name => 'CNAME',
policy_name => 'customers_pol',
function_type => DBMS_REDACT.REGEXP,
regexp_pattern => '(\S{3})(\S+)',
regexp_replace_string => '\1***',
expression => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') != ''SYS'''
);
end;
/
begin
dbms_redact.alter_policy (
object_schema => 'DEMO',
object_name => 'CUSTOMERS',
policy_name => 'customers_pol',
action => DBMS_REDACT.ADD_COLUMN,
column_name => 'DOB',
function_type => DBMS_REDACT.PARTIAL,
function_parameters => DBMS_REDACT.REDACT_DATE_EPOCH,
expression => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') != ''SYS'''
);
end;
/
begin
dbms_redact.alter_policy (
object_schema => 'DEMO',
object_name => 'CUSTOMERS',
policy_name => 'customers_pol',
action => DBMS_REDACT.ADD_COLUMN,
column_name => 'CID',
function_type => DBMS_REDACT.FULL,
expression => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') != ''SYS'''
);
end;
/
begin
dbms_redact.alter_policy (
object_schema => 'DEMO',
object_name => 'CUSTOMERS',
policy_name => 'customers_pol',
action => DBMS_REDACT.MODIFY_COLUMN,
column_name => 'CID',
function_type => DBMS_REDACT.RANDOM,
expression => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') != ''SYS'''
);
end;
/
Now, we set it to use random masking, random values will be generated for the column. Redacted query output is as below at the end:
SQL> select cid, cname, dob from demo.customers;
CID CNAME DOB
-----------------------------------------
1311680984 ABD*** AYD*** 01-JAN-70
102691765 AHM*** YIL*** 01-JAN-70
819107024 ARI*** DEM*** 01-JAN-70
7285271581 AYD*** TUR*** 01-JAN-70
22688323660 AZM*** SEV*** 01-JAN-70
7508336149 HAC*** ELM*** 01-JAN-70
46158355970 HAL*** HAT*** 01-JAN-70

































