IBM interview questions

IBM:
Tell me about yourself?
Day to day activities?
Monitoring Services in RAC?
How to find RAC instance?
Patch Steps?
how to find patch whether successfully applied or not?
How to recover the standby database not in sync with primary ?
How will find the gap in standby database?
Backup strategy in RMAN?
Restore scenario in RMAN?
Traditional exp/imp and Datapump difference?
Cloning Steps in RMAN?
How do you tune SQL queries to improve performance?
How to analyze query using explain paln?
How will you analyze AWR report?
Cummulative and Differential bkp difference?
Advantage of Catalog Mode in RMAN?
Temenos:
Tell me about yourself?
Day to day activities?
Patch Steps?
Difference in CPU and PSU Patch?
Traditional exp/imp and Datapump difference?
Performace parameter in Datapump?
Consistent Backup in Datapump and exp/imp
How will take table/tablespace/User Backup in exp/imp and Datapump?
Restore scenario in RMAN?
Incremental Backup in RMAN?
Datafile recovery step in RMAN?
How do you tune SQL queries to improve performance?
How to analyze query using explain paln?
How will you analyze AWR report?
Catalog and NoCatalog  Mode difference in RMAN?

Nologging and force logging examples

Nologging and force logging

NOLOGGING can be used to prevent bulk operations from logging too much information to
Oracle’s Redo log files.On the other hand, FORCE LOGGING can be used on tablespace or
database level to force logging of changes to the redo. This may be required for sites
that are mining log data, using Oracle Streams or using Data Guard (standby databases).
Nologging[edit]

NOLOGGING can be used to minimize the amount of redo generated by Oracle. Only the
following operations can make use of nologging:

SQL*Loader in direct mode
INSERT /*+APPEND*/ …
CTAS

ALTER TABLE statements (move/add/split/merge partitions)
CREATE INDEX

ALTER INDEX statements (move/add/split/merge partitions)
To create a table in NOLOGGING mode:

SQL> CREATE TABLE t1 (c1 NUMBER) NOLOGGING;
Table created.

To enable NOLOGGING for a table:

ALTER TABLE t1 NOLOGGING;
Table altered.
Force logging[edit]

A tablespace or the entire database is either in force logging or no force
logging mode. To see which it is, run:

SQL> SELECT force_logging FROM v$database;
FOR

NO
or
SQL> SELECT tablespace_name, force_logging FROM dba_tablespaces;
TABLESPACE_NAME                FOR
—————————— —
SYSTEM                         NO

To enable force logging:
SQL> ALTER DATABASE force logging;
Database altered.
SQL> ALTER TABLESPACE users FORCE LOGGING;
Tablespace altered.
To disable:
SQL> ALTER DATABASE no force logging;
Database altered.
SQL> ALTER TABLESPACE users NO FORCE LOGGING;
Tablespace altered.

Step by Step Process to Create Single Instance Database using DBCA with screen shot

1. Launch DBCA and Choose Database Operation:Launch DBCA by executing dbca command on unix prompt. If DBCA is not executing, Set appropriate Environment variables.


[oracle@database ~] dbca 



Image


This is just a welcome screen, User need not to give any input on this other than click on “Next“. 


Image


 Since, We have only Oracle Database S/W installed i.e. no grid Software So we will see only single instance related operations on the welcome screen. Though, Grid Software also has option to create Single instance database.



2. Choose Type of Database: Here, DBA has to choose which type of database he wants to create. There are not so much differences. I am going with default option “General Purpose or Transaction purpose“. 


Image


Click on “Next” after choosing the database type.


3. Provide Instance Name for Database:  Database Instance name is the unique name give to the database on database host machine. i.e. you can’t have more than one database with same SID. The length of SID should not be more that 8 characters. 


Image


Global Database Name is database name with it’s domain name. I choose database name as “newdb” and domain name for organization is oracle.com so the Global Database Name would be “newdb.oracle.com”.


4. Database Control Configuration: This step give you detail about configuring database with database control.


Image


Let it be with default option and move forward by clicking “Next“. 


5. Password for Sys and System user: Provide password for sys, system and DBSNMP user. Make sure you follow Oracle password policy otherwise you will see warning, though you can move forward by bypassing that warning.


Image

I am giving same password for all listed accounts, DBA can easily change these passwords in future if needed. 



6. Database Files Location Details:  We are using flat file system to store all database related files and “File System”  is default storage type chosen. So let’s move forward with default option.


Image 

 Click “Next” button.


7. Provide Recovery Configuration: Database administrator has to provide Database recovery path details in this step. Default location is $ORACL_BASE/fast_revoery_aren. DBA can also enable archive log by clicking “Enable Archiving“.

Image

 DBA can also change Recovery area size by giving appropriate input into Fast Recovery Area Size text box. I face a small challenge during this step show below. 

Image

DBA has to either reduce Fast Recovery Area Size in above input box or get some more free space at provided OS location. Click “Next” after filling these details.


8. Database Content Setting: If you want some sample schema to be installed in your database then click on “Sample Schemas check box and this will install HumanResources, Order entry and Product Media like schemas into the database. 

Image

 If DBA has to configure some scripts which automatically run after database creation In that case DBA can give their detail at Custom Scripts tab on this page.
 Image

After configuring all these Click on “Next” to move forward.


9. Initialization Parameter Inputs: If you wants to change some initialization parameter like SGA Size, PGA size, Database block size, Number of process, Character set and Connection mode use this GUI to do so. DBA can also change these value after database creation. 
Image 

Change required parameters or go with default setting and click “Next”.

  

10 Database Storage Summary: This page will show DBA database storage summary, You can expend a tree in the left panel of this Screen. This page doesn’t need any input for DBA.
Image

Click “Next” to move forward.
11. Database Creation Options: Here you will find three options Create Database(default), Save as a database Template and Generate Database Creation Scripts.


Create database will create a database only for this time.

Save database template will save this template for future use, In future DBA can use same template for database creation and this template will have all customizations done by Database Administrator. 
Generate Database Creation Scripts will create a script for database creation which can can execute manually as well.


Database administrator can chose multiple options at one time or all options as well. Here, I am just creating a database.


Image 

Click “Finish” to move forward. This will show you a summary of database going to create. 


Image

Click on “OK” button. Next database creation will start automatically. see below screen.
Image
Database creation will take around 15 to 20 Minutes, Database Administrator can also see the Percentage of work done using above screen. One this process is done you will see a password management screen like below.
Image
 If you want’s to unlock few uses Click “Password Management” and provide password for user or you can do this manually after database creation. DBA can also see log files for database creation at location given in this screen “/etc/oracle/cfgtoollogs/dbca/newdb“. Here You are done with RAC database creation with DBCA.
Now, check if you database is working or not using below unix command. This will list the database running by name newdb.
ps -ef | grep newdb
To create database using DBCA, Database Administrator need GUI access of the system, but in some cases which is not possible. In that situation DBA can use Manual Database Creation Script.

Since DBA has created database, Next step would be configure Listener.ora and Tnsname.ora to access database from outside. DBA can use Quick Steps to Configure Tnsnames.ora and Listener.ora file.

Create 12c database manually create using script method

OS version:
[root@O12c pfile]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
[root@O12c pfile]#

Database version:
[oracle@O12c ~]$ sqlplus
SQL*Plus: Release 12.1.0.1.0 Production on Sat Jul 18 07:35:10 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Create following directory on server and give permission to oracle user and oinstall group.
[root@O12c cdb1]#mkdir -p /u01/app/oracle/admin/orcl/dpdump
[root@O12c cdb1]#mkdir -p /u01/app/oracle/admin/orcl/adump
[root@O12c cdb1]#mkdir -p /u01/app/oracle/admin/orcl/pfile
[root@O12c cdb1]#mkdir -p /u01/app/oracle/oradata/orcl/controlfile
[root@O12c cdb1]#mkdir -p/u01/app/oracle/fast_recovery_area/orcl/controlfile/
[root@O12c cdb1]#chomd 775 /u01/app/oracle/
[root@O12c cdb1]#chown oracle:oinstall /u01/app/oracle/

Create pfile(init_orcl.ora) in pfile directory
[root@O12c cdb1]$ cd /u01/app/oracle/admin/orcl/pfile

[root@O12c pfile]$ vi init_orcl.ora
##############################################################################
# Copyright (c) 1991, 2013 by Oracle Corporation
##############################################################################
###########################################
# Cache and I/O
###########################################
db_block_size=8192
###########################################
# Cursors and Library Cache
###########################################
open_cursors=300
###########################################
# Database Identification
###########################################
db_domain=””
db_name=”orcl”
###########################################
# File Configuration
###########################################
db_create_file_dest=”/u01/app/oracle/oradata”
db_recovery_file_dest=”/u01/app/oracle/fast_recovery_area”
db_recovery_file_dest_size=4800m
###########################################
# Miscellaneous
###########################################
compatible=12.1.0.0.0
diagnostic_dest=/u01/app/oracle
###########################################
# Processes and Sessions
###########################################
processes=300
###########################################
# SGA Memory
###########################################
sga_target=1269m
###########################################
# Security and Auditing
###########################################
audit_file_dest=”/u01/app/oracle/admin/orcl/adump”
audit_trail=db
remote_login_passwordfile=EXCLUSIVE
###########################################
# Shared Server
###########################################
dispatchers=”(PROTOCOL=TCP) (SERVICE=cdb1XDB)”
###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=423m
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_tablespace=UNDOTBS1
control_files=(“/u01/app/oracle/oradata/orcl/controlfile/o1_mf_bsmgyw36_.ctl”,
“/u01/app/oracle/fast_recovery_area/orcl/controlfile/o1_mf_bsmgyw7v_.ctl”)

Set ORACLE_SID variable
[oracle@O12c dbs]$ export ORACLE_SID=orcl
[oracle@O12c dbs]$ echo $ORACLE_SID
orcl
[oracle@O12c dbs]$

Create password file
[oracle@O12c dbs]$orapwd file=/u01/app/oracle/product/12.1.0.2/db_1/dbs/orapworcl password=Admin entries=10
[oracle@O12c dbs]$ cd /u01/app/oracle/product/12.1.0.2/db_1/dbs
[oracle@O12c dbs]$ ls -ltr
total 32
-rw-r–r– 1 oracle oinstall 2992 Feb 3 2012 init.ora
-rw-rw—- 1 oracle oinstall 1544 Jul 6 04:48 hc_cdb1.dat
-rw-r—– 1 oracle oinstall 24 Jul 6 04:48 lkCDB1
-rw-r—– 1 oracle oinstall 7680 Jul 6 04:51 orapwcdb1
-rw-r—– 1 oracle oinstall 3584 Jul 18 07:30 spfilecdb1.ora
-rw-r—– 1 oracle oinstall 7680 Jul 18 08:41 orapworcl

Login to database
[oracle@O12c dbs]$ sqlplus
SQL*Plus: Release 12.1.0.1.0 Production on Sat Jul 18 08:46:42 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to an idle instance.

SQL> create spfile from pfile=’/u01/app/oracle/admin/orcl/pfile/init_orcl.ora’;
File created.

SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1336176640 bytes
Fixed Size 2288104 bytes
Variable Size 469763608 bytes
Database Buffers 855638016 bytes
Redo Buffers 8486912 bytes

SQL>@DBcreation.sql;
Database created.

Create database script (DBcreation.sql)..
[root@O12c ~]# cd /u01/app/oracle/product/12.1.0.2/db_1/dbs

[root@O12c dbs]# vi DBcreation.sql
CREATE DATABASE orcl
USER SYS IDENTIFIED BY sys_password
USER SYSTEM IDENTIFIED BY system_password
LOGFILE GROUP 1 (‘/u01/app/oracle/oradata/orcl/redo01a.log’,’/u01/app/oracle/oradata/orcl/redo01b.log’) SIZE 100M BLOCKSIZE 512,
GROUP 2 (‘/u01/app/oracle/oradata/orcl/redo02a.log’,’/u01/app/oracle/oradata/orcl/redo02b.log’) SIZE 100M BLOCKSIZE 512,
GROUP 3 (‘/u01/app/oracle/oradata/orcl/redo03a.log’,’/u01/app/oracle/oradata/orcl/redo03b.log’) SIZE 100M BLOCKSIZE 512
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 1024
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE ‘/u01/app/oracle/oradata/orcl/system01.dbf’
SIZE 700M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SYSAUX DATAFILE ‘/u01/app/oracle/oradata/orcl/sysaux01.dbf’
SIZE 550M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
DEFAULT TABLESPACE users
DATAFILE ‘/u01/app/oracle/oradata/orcl/users01.dbf’
SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE ‘/u01/app/oracle/oradata/orcl/temp01.dbf’
SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
UNDO TABLESPACE UNDOTBS1
DATAFILE ‘/u01/app/oracle/oradata/orcl/undotbs01.dbf’
SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
USER_DATA TABLESPACE usertbs
DATAFILE ‘/u01/app/oracle/oradata/orcl/usertbs01.dbf’
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

—> Run below script for build database scripts
SQL>@/u01/app/oracle/product/12.1.0.2/db_1/rdbms/admin/catalog.sql;
(Creates the views of the data dictionary tables, the dynamic performance views,
And public synonyms for many of the views. Grants PUBLIC access to the synonyms)

SQL>@/u01/app/oracle/product/12.1.0.2/db_1/rdbms/admin/catproc.sql;
(Runs all scripts required for or used with PL/SQL.)

SQL> alter user system
2 identified by manager;
User altered.

SQL> alter user system account unlock;
User altered.

SQL>conn system/manager
Connected.
SQL>

SQL>@/u01/app/oracle/product/12.1.0.2/db_1/sqlplus/admin/pupbld.sql;
(Required for SQL*Plus. Enables SQL*Plus to disable commands by user.)

—> Bounce the database
SQL> startup force;
ORACLE instance started.
Total System Global Area 1336176640 bytes
Fixed Size 2288104 bytes
Variable Size 469763608 bytes
Database Buffers 855638016 bytes
Redo Buffers 8486912 bytes
Database mounted.
Database opened.

SQL> select name from v$database;
NAME
———
ORCL
1 row selected.

SQL> select file_name from dba_data_files;
FILE_NAME
——————————————————————————–
/u01/app/oracle/oradata/orcl/system01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/users01.dbf
/u01/app/oracle/oradata/orcl/usertbs01.dbf
5 rows selected.

–>Create extra tablespace..

SQL>CREATE TABLESPACE apps_tbs LOGGING
DATAFILE ‘/u01/app/oracle/oradata/orcl/apps01.dbf’
SIZE 500M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;
Tablespace created.



— Create a tablespace for indexes, separate from user tablespace (optional)
SQL> CREATE TABLESPACE indx_tbs LOGGING
DATAFILE ‘/u01/app/oracle/oradata/orcl/indx01.dbf’
SIZE 100M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;
Tablespace created.

SQL> select NAME from v$tablespace;
NAME
——————————
SYSTEM
SYSAUX
UNDOTBS1
TEMPTS1
USERS
USERTBS
APPS_TBS
INDX_TBS
8 rows selected.
SQL>
Note:- database is a simple database not container database

Creating Oracle 11g Database manually

Creating Database in 11g is very simple.In 10g you need to create additional
directories bdump,cdump,udump instead of diagnostic dump directory.Below are the
steps:

Step 1:Create Directory structure with Oracle ownership and permission as below:

[oracle@localhost ~]$ cd /u03

[oracle@localhost u03]$ mkdir testdb

[oracle@localhost u03]$ chmod -R 777 /u03/testdb/*

[oracle@localhost u03]$ chown -R oracle:oinstall /u03/testdb/*

[oracle@localhost testdb]$ mkdir adump diag flash_recovery_area

[oracle@localhost u03]$ chmod -R 777 /u03/testdb/*

[oracle@localhost u03]$ chown -R oracle:oinstall /u03/testdb/*

Step 2:Create Parameter file in $ORACLE_HOME/dbs location:

[oracle@localhost testdb]$ cd $ORACLE_HOME/dbs

[oracle@localhost dbs]$ vi init_testdb.ora

db_name=’testdb’
memory_target=1G
processes = 150
audit_file_dest=’/u03/testdb/adump’
audit_trail =’db’
db_block_size=8192
db_domain=”
db_recovery_file_dest=’/u03/testdb/flash_recovery_area’
db_recovery_file_dest_size=2G
diagnostic_dest=’/u03/testdb/diag’
dispatchers='(PROTOCOL=TCP) (SERVICE=testdb)’
open_cursors=300
remote_login_passwordfile=’EXCLUSIVE’
undo_tablespace=’UNDOTBS1′
# You may want to ensure that control files are created on separate physical
# devices
control_files = (/u03/testdb/ora_control1.ctl,/u03/testdb/ora_control2.ctl)
compatible =’11.2.0′

Step 3:Prepare Create Database script :

[oracle@localhost u03]$ cd /u03/testdb/

[oracle@localhost testdb]$ vi createdb_shaik.sql

CREATE DATABASE testdb
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
LOGFILE
GROUP 1 ‘/u03/testdb/redo1.log’ SIZE 10M,
GROUP 2 ‘/u03/testdb/redo2.log’ SIZE 10M,
GROUP 3 ‘/u03/testdb/redo3.log’ SIZE 10M
DATAFILE
‘/u03/testdb/system.dbf’ size 200M REUSE
sysaux datafile ‘/u03/testdb/sysaux.dbf’ size 100m
undo tablespace UNDOTBS1
datafile ‘/u03/testdb/undo1.dbf’ size 100m
DEFAULT TEMPORARY TABLESPACE temp1
TEMPFILE ‘/u03/testdb/temp01.dbf’
SIZE 100M REUSE
CHARACTER SET AL32UTF8
;
:wq

Step 4:Set the Oracle ENVIRONMENT and SID of Database in the Operating System:

[root@localhost testdb]# su – oracle

[oracle@localhost ~]$ vi .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=orcl
export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin

:wq
[oracle@localhost ~]$ . .bash_profile
     This will set the Oracle Environment variables in Unix-based operating system.

[oracle@localhost ~]$export ORACLE_SID=testdb
     This will set the SID of the current Database in Unix-based operating system.

Step 5:Create the Password file.

[oracle@localhost ~]$orapwd file=$ORACLE_HOME/dbs/orapwtestdb
password=Oracle entries=10

Step 6:Create server parameter file.

[oracle@localhost dbs]$ sqlplus “/as sysdba”

SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 28 14:08:02 2012

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

Connected to an idle instance.

SQL>create spfile from pfile=’$ORACLE_HOME/dbs/init_testdb.ora’;

step 7:Start the Database in nomount State.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 1071333376 bytes
Fixed Size                  1341312 bytes
Variable Size             620759168 bytes
Database Buffers          444596224 bytes
Redo Buffers                4636672 bytes
SQL> select status from v$instance;

STATUS
————
STARTED

Note:Common issue memory_target not supported,refer the below link for resolving:

http://rafioracledba.blogspot.in/2011/06/ora-00845-memorytarget-not-supported-on.html

Step 8:Execute Create Database script created in Step 3

SQL> @/u03/testdb/createdb_shaik.sql

Database created

Step 9:Execute the catalog.sql,catproc.sql and pupbld.sql scripts:
a)catalog.sql =>Creates dictionary tables and views
b)catproc.sql =>Creates PL/SQL procedures,functions and packages necessary.
c)pupbld.sql  =>Creates user profiles.

So our database is created. Now just run the catalog.sql,catproc.sql and pupbld.sql
scripts.
WE will find catalog.sql and catproc.sql in $ORACLE_HOME/rdbms/admin path and
pupbld.sql in $ORACLE_HOME/sqlplus/admin path.

SQL> @$ORACLE_HOME/rdbms/admin/catalog.sql
SQL> @$ORACLE_HOME/rdbms/admin/catproc.sql
conn system/manager

SQL>@$ORACLE_HOME/sqlplus/admin/pupbld.sql

SQL> alter user system identified by manager;

User altered.

SQL> conn system
Enter password:
Connected.
SQL> @$ORACLE_HOME/sqlplus/admin/pupbld.sql
DROP SYNONYM PRODUCT_USER_PROFILE
             *
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist

  DATE_VALUE FROM PRODUCT_USER_PROFILE
                  *
ERROR at line 3:
ORA-00942: table or view does not exist

DROP TABLE PRODUCT_USER_PROFILE
           *
ERROR at line 1:
ORA-00942: table or view does not exist

ALTER TABLE SQLPLUS_PRODUCT_PROFILE ADD (LONG_VALUE LONG)
*
ERROR at line 1:
ORA-00942: table or view does not exist

Table created.

DROP TABLE PRODUCT_PROFILE
           *
ERROR at line 1:
ORA-00942: table or view does not exist

DROP VIEW PRODUCT_PRIVS
*
ERROR at line 1:
ORA-00942: table or view does not exist

View created.

Grant succeeded.

DROP PUBLIC SYNONYM PRODUCT_PROFILE
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

Synonym created.

DROP SYNONYM PRODUCT_USER_PROFILE
             *
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist

Synonym created.

DROP PUBLIC SYNONYM PRODUCT_USER_PROFILE
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

Synonym created.

Step 10:Verify the Dictionary views created.

SQL> select name from v$database;

Step 11:Change the Database mode from noarchive log to archive log mode
Changing to archive log mode:

——————————–

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Current log sequence           3
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1071333376 bytes
Fixed Size                  1341312 bytes
Variable Size             620759168 bytes
Database Buffers          444596224 bytes
Redo Buffers                4636672 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> select status from v$instance;

STATUS
————
MOUNTED

SQL> alter database open;

Database altered.

SQL> select status from v$instance;

STATUS
————
OPEN

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Next log sequence to archive   3
Current log sequence           3

Setup Custom DOT tk Domain in Blogger

                Are you experience frustration at some point in default long domain name
in Blogger like yourdomain.blogspot.com and want to change free custom .tk domain,
you are at right place to  set-up custom .tk domain in blogger.com,.

Read the below tutorial to get start-up

Step-1: Go to Freenom.com
Step-2: Enter your desire domain and select .tk from the option, click on “Search”
button, same below screenshot.

Image

 Step-3: If your desired domain is available then you redirect on Domain Registration
 page set registration length as 12 months and  like this screenshot below. If not,
then try any other domain name.

Step-4: Clicked Order Now button. Here you have to verify your account by email,

Image

Verification link Sent to Your Email The Link, go to your Email Index and Click On
The Link it redirect to checkout Page.

Step-5: Don’t worry about it Fill the form give Email ID and Password Login further
to Setup Domain in Blogger. Congratulation you have get your Domain, get ready for
Setup custom domain in Blogger

Image

Setup Custom Free Domain in Blogger
Step-1: Go to Blogger Settings and find Publishing option in your dashboard. Now
click on Set up a third-party URL for your blog.

Image

Step-2: Then enter your Dot Tk domain with www in the like http://www.technohalf-demo.tk
(as shown in the picture)

Image

Step-3: Hit Save button, you get a Error i.e. We have not been able to verify your
authority to this domain. Error 12. Now That’s what we require, two CNAME like below
picture. Don’t close this Page.

Image

Step-4: Open a New Tab in Browser and Go to Your Freenom ClientArea Link and click
on Domain Panel and then click on “My Domain” same below screenshot.

Image

Step-5: It will take to your Domain Page and click on “Manage Domain”. Like this-

Step-6: Now clicked on Manage Freenom DNS and it will take to DNS MANAGEMENT for
yourdoamin.tk

Image

Step-7: First of all Select “CNAME Record” from type option then write “www” in Name
and “ghs.google.com” in Target and Leave TTL to 14440 .

Image

Step-8: Again to add another CNAME click on “More Records” and then write Host Name
and Target that you got in error . You can do it same below image.

Image

Step-9: OK you have added your CNAME records successfully Let’s add “A Record”.
Clicked on More Records, select “A Record” from type and Leave Name to Blank and set
TTL to 300. Set First “Target” to 216.239.32.21. Again repeat this process and Add
Second “Target” to 216.239.34.21, Third “Target” to 216.239.36.21, Fourth “Target” to
216.239.38.21 like this Screenshot Below

Image

Step-10: You have done your job well click Save Change to get effect. Now! Just Wait
around 5 to 10 minutes and then go to your Blogger account and got to Setting>>Basic>>
Add a Custom Domain and enter your http://www.yourdomain.tk(Don’t Forget to add www before
domain name) domain and click on “Save”. Click on View Blog to see your custom domain

How to solve “Zone not Active Yet” ?
A:        Thank to KIT WING for the Solution,  just go to management tools >>
select Nameservers >> Use Default Nameserver Button and hit Change Nameservers
or you can check the Nameservers ( i.e, Nameserver 1: NS01.FREENOM.COM,
Nameserver 2: NS01.FREENOM.COM,Nameserver 3: NS01.FREENOM.COM,Nameserver
4: NS01.FREENOM.COM )

ORA-01019: unable to allocate memory in the user side

ORA-01019: unable to allocate memory in the user side


One of the in-house developed tools which connects to the database to allow a 

user to perform configuration updates was throwing an error:

ORA-01019: unable to allocate memory in the user side

Most of the docs that I could find online told me the same thing, namely:


Cause: The user side memory allocator returned error


Action: Increase the processes heap size or switch to the old set of calls

However, sometimes the Oracle errors that you receive don’t seem to be that 

helpful in actually determining what the problem is. The ORA-01019 error is 

no exception in this case…You will find numerous forums online which tell you

 to fix the ORA-01019 error by “increasing the processes heap size” on the 

client and that it’s not to do with any configuration, just resource. I have 

found differently.


Solution:-

So, what you need to check is whether or not you have multiple ORACLE_HOMES 

installed on the client machine. The reason I say this is because in our case

 we did. We had an old Oracle 10g client and a new 11g client. We found that the 

default client was still the 10g one, so when the client was attempting to connect 

to the database it was using executables and dlls which we didn’t expect or want 

it to use.

The way to resolve your ORA-01019: unable to allocate memory in the user side is

 to ensure that you have the correct default path for the Oracle client. The 

client was running on Windows so if you type PATH from a command prompt it will 

show you what the default one is.

Change the PATH

You can update this in My Computer -> Properties -> Advanced -> Environment 

Variables -> then scroll to the System Variables window at the bottom until you see PATH and edit that. Put the path to the Oracle home that you want to use first 


before any other Oracle home in the list order.

I have some more details about how to change the PATH environment variable in another 

post if you would like to see some screenshots of where to go and change it.

ORA-00257: archiver error,ORA-16014 No Available Destinations –oracle

ORA-16014 No Available Destinations
By Robert Jackson | 0 Comments
ora-16014 no available destinations
I arrived at work today to find a few emails in my inbox saying that one of the
development environments appeared to be down. My first check was to try logging
on as one of the application users, which failed with the error:

ORA-00257: archiver error. Connect internal only, until freed

I’ve written about this ORA-00257 error message previously, so read that for
some of the details, but in this post I would like to cover a little part this
I missed from that previous post. This part is related to the following error:

SQL> alter system archive log current;
alter system archive log current
*
ERROR at line 1:
ORA-16014: log 1 sequence# 161 not archived, no available destinations
ORA-00312: online log 1 thread 1:
‘X:\ORADATA\DEV\REDO\REDO01.LOG’

SQL> alter system archive log all;
alter system archive log all
*
ERROR at line 1:
ORA-16020: fewer destinations available than specified by LOG_ARCHIVE_MIN_SUCCEED_DEST
The first error above gives you a clue as to what the problem is, and this 2nd error
above really lets you know the problem; the destination that you are trying to write
out to is not available, is the short answer. This is because after a certain number
of tries the log archive destination that you have configured gets set to unavailable
 and therefore nothing can be written to it, even if you have cleared enough space.

 Solution:-

SQL> alter system set log_archive_dest_state_1=’ENABLE’ scope=both;

System altered.

SQL> alter system archive log all;

System altered.
It’s just a simple case of re-enabling the archiving destination to let the database
know that it is valid and enabled. That’s what I did with the alter system command
above.

Note: Check to make sure you are enabling the correct log_archive_dest. Remember,
you must enclose the ENABLE value with single quotation marks.

Oracle database Upgrade 10g to 11g(10.2.0.4.0 to 11.1.0.6.0 version only.)

Oracle 10g database is upgrade to oracle 11g database.This upgrade support from 10.2.0.4.0 to 11.1.0.6.0 version only.
Step -1
Pre Request
1. Check the database version.
SQL> select * from v$version;
BANNER
—————————————————————-
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – Prod
PL/SQL Release 10.2.0.4.0 – Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 – Production
NLSRTL Version 10.2.0.4.0 – Production

2. Check the packages validity.
SQL> select comp_name, version, status from sys.dba_registry;
COMP_NAME VERSION STATUS
———————————————– ———— ——
Oracle Database Catalog Views 10.2.0.4.0 VALID
Oracle Database Packages and Types 10.2.0.4.0 VALID
2 rows selected.
3. Check whether objects are valid
SQL> select object_name,status from dba_objects
where status=’INVALID’;
no rows selected.


4. Check whether any datafile is in backup mode
SQL> select * from v$backup where status=’ACTIVE’;
FILE# STATUS CHANGE# TIME
——— —————- ——————
1 NOT ACTIVE 0
2 NOT ACTIVE 0
3 NOT ACTIVE 0
5.check whether any datafiles is in recovery state
SQL> select * from v$recover_file;
no rows selected.
5. Stop the listener
lsnrctl> stop listener
Step -2
1)create 11g directory and new 11g bash profile and set it.
mkdir -p /u01/app/oracle/product/11.1.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ten.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
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/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

2)no need to shutdown 10.2.0.4.0 db

3)install 11gr1 using other terminal
database]$./runInstaller

4) go to 10.2.0.4.0 terminal
[oracle@teng ~]$ . .10g_profile
[oracle@teng ~]$ export ORACLE_SID=kfc
[oracle@teng ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 – Production on Thu Aug 11 10:52:45 2016

4.1)This utlu111i.sql script check the database and list requirements to upgrade.
SQL> spool db10g
SQL> @/u01/app/oracle/product/11.1.0/db_1/rdbms/admin/utlu111i.sql
SQL> spool off

4.2) create pfile in $ORACLE_HOME/dbs location
SQL>create pfile=’/u01/app/oracle/product/11.1.0/db_1/dbs/initkfc.ora’ from spfile;

4.3) Edit the parameter in pfile with upgrade requirements
     change this background_dump_dest=’/home/oracle/kfc/admin/bdump’ to
                diagnostic_dest=’/home/oracle/kfc/admin/diag/’
                 remove cdump and udump

5. Shut 10.2.0.4.0  the database and services (stop css if using asm) for Upgrade
SQL> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
TO UPGRADE
1. run a new 11g bash profile and set it.
. .bash_profile

2. Start the database with Upgrade option (if using asm start asm instance and css)
sqlplus sys/*** as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Tue Apr 27 09:50:25 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup upgrade;
ORACLE instance started.
Total System Global Area 534462464 bytes
Fixed Size 2146112 bytes
Variable Size 150995136 bytes
Database Buffers 377487360 bytes
Redo Buffers 3833856 bytes
Database mounted.
Database opened.

3. Run this script for database upgradataion
SQL> @?/rdbms/admin/catupgrd.sql
POST UPGRADE REQUEST
1. Check status of database components
SQL> select comp_name,version, status from dba_registry
COMP_NAME VERSION STATUS
—————————————- —————————— —————
Oracle Enterprise Manager 11.1.0.6.0 VALID
OLAP Catalog 11.1.0.6.0 VALID

2. Check for invalid objects
SQL> select count(*) from dba_objects where status like ‘INVALID’;
COUNT(*)
———-
0

3.Run this script to verify the database upgrade
@?/rdbms/admin/utlu111s.sql


4. Restart the database normally and start the listener.
SQL> shut immediate
lsnrctl> start listener
SQL> startup

oracle upgradation prerequest and postrequest from 10.2.0.1.0 to 10.2.0.4.0

Oracle 10g database is upgrade to oracle 11g database.This upgrade support from 10.2.0.4.0 to 11.1.0.6.0 version only.
Step -1
Pre Request
1. Check the database version.
SQL> select * from v$version;
BANNER
—————————————————————-
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – Prod
PL/SQL Release 10.2.0.4.0 – Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 – Production
NLSRTL Version 10.2.0.4.0 – Production

2. Check the packages validity.
SQL> select comp_name, version, status from sys.dba_registry;
COMP_NAME VERSION STATUS
———————————————– ———— ——
Oracle Database Catalog Views 10.2.0.4.0 VALID
Oracle Database Packages and Types 10.2.0.4.0 VALID
2 rows selected.
3. Check whether objects are valid
SQL> select object_name,status from dba_objects
where status=’INVALID’;
no rows selected.


4. Check whether any datafile is in backup mode
SQL> select * from v$backup where status=’ACTIVE’;
FILE# STATUS CHANGE# TIME
——— —————- ——————
1 NOT ACTIVE 0
2 NOT ACTIVE 0
3 NOT ACTIVE 0
5.check whether any datafiles is in recovery state
SQL> select * from v$recover_file;
no rows selected.
5. Stop the listener
lsnrctl> stop listener
Step -2
1)create 11g directory and new 11g bash profile and set it.
mkdir -p /u01/app/oracle/product/11.1.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ten.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
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/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

2)no need to shutdown 10.2.0.4.0 db

3)install 11gr1 using other terminal
database]$./runInstaller

4) go to 10.2.0.4.0 terminal
[oracle@teng ~]$ . .10g_profile
[oracle@teng ~]$ export ORACLE_SID=kfc
[oracle@teng ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 – Production on Thu Aug 11 10:52:45 2016

4.1)This utlu111i.sql script check the database and list requirements to upgrade.
SQL> spool db10g
SQL> @/u01/app/oracle/product/11.1.0/db_1/rdbms/admin/utlu111i.sql
SQL> spool off

4.2) create pfile in $ORACLE_HOME/dbs location
SQL>create pfile=’/u01/app/oracle/product/11.1.0/db_1/dbs/initkfc.ora’ from spfile;

4.3) Edit the parameter in pfile with upgrade requirements
     change this background_dump_dest=’/home/oracle/kfc/admin/bdump’ to
                diagnostic_dest=’/home/oracle/kfc/admin/diag/’
                 remove cdump and udump

5. Shut 10.2.0.4.0  the database and services (stop css if using asm) for Upgrade
SQL> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
TO UPGRADE
1. run a new 11g bash profile and set it.
. .bash_profile

2. Start the database with Upgrade option (if using asm start asm instance and css)
sqlplus sys/*** as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Tue Apr 27 09:50:25 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup upgrade;
ORACLE instance started.
Total System Global Area 534462464 bytes
Fixed Size 2146112 bytes
Variable Size 150995136 bytes
Database Buffers 377487360 bytes
Redo Buffers 3833856 bytes
Database mounted.
Database opened.

3. Run this script for database upgradataion
SQL> @?/rdbms/admin/catupgrd.sql
POST UPGRADE REQUEST
1. Check status of database components
SQL> select comp_name,version, status from dba_registry
COMP_NAME VERSION STATUS
—————————————- —————————— —————
Oracle Enterprise Manager 11.1.0.6.0 VALID
OLAP Catalog 11.1.0.6.0 VALID

2. Check for invalid objects
SQL> select count(*) from dba_objects where status like ‘INVALID’;
COUNT(*)
———-
0

3.Run this script to verify the database upgrade
@?/rdbms/admin/utlu111s.sql


4. Restart the database normally and start the listener.
SQL> shut immediate
lsnrctl> start listener
SQL> startup