Showing posts with label DataBase. Show all posts
Showing posts with label DataBase. Show all posts

Thursday, 26 September 2013

Oracle 11G: Starting the DB, listener and the enterprise manager console

Make sure all the necessary environment variables are set, especially the following variables.
  1. ORACLE_SID
  2. ORACLE_HOME
And follow the below steps to start, database, listener and enterprise manager(em) console
  • For db startup: 
             oracle@root.com$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Sun Nov 9 22:52:26 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 1389391872 bytes
Fixed Size 1299848 bytes
Variable Size 838863480 bytes
Database Buffers 536870912 bytes
Redo Buffers 12357632 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
  • Starting listener
              oracle@root.com$ ./lsnrctl start
  • Oracle Enterprise manager start
              oracle@root.com$  ./emctl start dbconsole
Now the enterprise manager server is started and can be accessed using the link on browser : https://hostname:1158/em

-------------------------------------------------------------------------------------------------------------------------

./lsnrctl start

[oracle@IMSQAOID bin]$ sqlplus

Enter user-name: / as SYSDBA

SQL> startup

[oracle@IMSQAOID bin]$ ./emctl start dbconsole

Oracle Internet directory (OID) Installation steps

Here’s are the simple steps to create an OID instance.
1. Install and configure your database instance and make sure it is working with all listener and emctl ports up.
2. Install weblogic, no need to configure a domain right now.
3. Install idm or OID, during installation you are provided with an option of creating a schema and adding a new weblogic domain.
4. once you have create schema and configured weblogic server using the OID installation menu, it take another 30-50 minutes to complete the entire configuration of OID.
 Planning to have a better guide with screenshots, will update it soon.

Parameter processes in oracle DB

How to update parameter processes value in oracle Database
1. Login to oracle
$sqlplus SYS as SYSDBA
2. Check the current processes value
$SQL> show parameter processes;
3. update it to the desired value, for eg: updating to 500
$SQL>alter system set processes=500 scope=spfile;
$SQL> commit
$SQL>shutdown immediate
$SQL> startup
4. you are done, recheck the value.

ORA-00845: MEMORY_TARGET not supported on this system

Getting ORA-00845: MEMORY_TARGET not supported on this system, while trying to start a database.
Error
sql> startup

ORA-00845: MEMORY_TARGET not supported on this system
Reason:
This is a very common error which you might face while starting up your oracle database. This happens when your system is out of temporary storage. While starting up the database oracle uses /dev/shm to store temporary files but when it runs out of memory you get this error.
/dev/shm is also know as tmpfs i.e. temporary file system which keeps all the file system in virtual memory to speed up several processes.
Solution:
Increase the size of /dev/shm
To check the size of /dev/shm
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 10G 4.4G 2.9G 61% /
tmpfs 504M 76K 504M 1% /dev/shm
/dev/sda1 194M 25M 160M 14% /boot
To increase the size
# mount -o remount,size=3G /dev/shm
Verify the size
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 7.6G 4.4G 2.9G 61% /
tmpfs 3G 1007M 2.1G 33% /dev/shm
/dev/sda1 194M 25M 160M 14% /boot
To make permanent changes to your file system update your fstab
# vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=3G 0 0
Update the new fstab file
# mount -a

Working with Oracle HTTP Server

In this blog i’m covering some basics on Oracle HTTP server(OHS) like
  • Checking OHS status.
  • Starting, stopping and restarting OHS.
  • Creating an Oracle HTTP server component.
  • Deleting an Oracle HTTP server component.
Checking OHS Status
We can determine the status of OHS by using the opmnctl command
$ORACLE_INSTANCE/bin/opmnctl status

Processes in Instance: instance1
---------------------------------+--------------------+---------+---------+-------
ias-component                    | process-type       |     pid | status | Ports
---------------------------------+--------------------+---------+---------+-------
ohs1                             | OHS                |    4789 | Alive  | https:1000, https:4444, http:7778
Starting, Stopping and restarting OHS
To Start use: >$ORACLE_INSTANCE/bin/opmnctl startall
To Stop use:  >$ORACLE_INSTANCE/bin/opmnctl stopproc process-type=OHS   or use  $ORACLE_INSTANCE/bin/opmnctl stopall
To restart: all Oracle HTTP Server components use: $ORACLE_INSTANCE/bin/opmnctl restartproc process-type=OHS
Creating an Oracle HTTP server component
The syntax for creating a Oracle HTTP server component is
$ORACLE_INSTANCE/bin/opmnctl createcomponent -componentType OHS -componentName component_name
For eg: to create an Oracle HTTP Server component named ohs1, use the following command:
>$ORACLE_INSTANCE/bin/opmnctl createcomponent -componentType OHS -componentName ohs1
When you create the Oracle HTTP Server component, ports are automatically assigned. However, you can use the following parameters to specify the ports of your choice:
-listenPort: HTTP listening port -sslPort: HTTPS (SSL) listening port -proxyPort: Proxy MBean port internally used by Oracle HTTP Server to communicate with Fusion Middleware Control
Deleting an Oracle HTTP server component
The syntax for deleting an Oracle HTTP server component using opmnctl is
>$ORACLE_INSTANCE/bin/opmnctl deletecomponent -componentName component_name
For eg: to delete an Oracle HTTP Server component named ohs1 use the following command:
>$ORACLE_INSTANCE/bin/opmnctl deletecomponent -componentName ohs1