Archive

Archive for the ‘Oracle’ Category

Running jar files that need JDK – Windows 8 / 10

First you need a JDK installed.

Then you need to set JAVA_HOME to the JDK folder

FROM: Using command prompt, navigate to the directory where you downloaded the installation program.

TO :     Using command prompt, navigate to the directory where you downloaded the installation program or %JAVA_HOME%\bin

AND
changing step # 4’s For Example : …

FROM: ” \home\Oracle\jdk7_15\jdk1.7.0_15\bin\java -jar jdev_suite_121200.jar

TO :        Downloads>   “C:\Program Files\Java\jdk1.7.0_40\bin\java”  -jar      jdev_suite_121200.jar
Or…
bin>               java   -jar    C:\Users\user\Downloads\jdev_suite_121200.jar

Categories: Oracle, Programming

Oracle 11g Enterprise Management Console Reinstall / Recreate

In some cases when you install Oracle 11g (11.2.0)  the Enterprise Management Console fails to be created even when you follow standard procedure or in case you rename or change the server name or IP (the case of having a installation of Oracle 11g on a virtual machine)

In this case you need to recreate the Oracle 11g Enterprise Management Console…

These steps mainly are for the case the console does not work in case of IP Change

Drop and re-create Oracle db console
1. Change the %ORACLE_HOME%\network\admin\listener.ora file from an IP number to machine name.
2. Change the %ORACLE_HOME%\network\admin\tnsnames.ora file from an IP number to a machine name.
3. Change the C:\WINDOWS\System32\drivers\etc\hosts file by adding a line below the default localhost line for the new Hostname value

oracle_em_change_host_name
4.Drop the em configuration with the following commands
C:\Data> set ORACLE_SID=”replace with hostname”
C:\Data> emca -deconfig dbcontrol db -repos drop

 

oracle_em_recreate

 

5. Create the em environment with the following command:

C:\Data> set ORACLE_SID=WS08
C:\Data> emca -config dbcontrol db -repos create

 

oracle_em_recreate4

 

If you get the below error while creating dbconsole;

SEVERE: Dbcontrol Repository already exists Fix the error(s) and run EM Configuration Assistant again in standalone mode;
oracle.sysman.emcp.exception.EMConfigException: ‘job_queue_processes’ must be greater than or equal to 1. Fix the error(s) and run EM Configuration Assistant again in standalone mode.

Run the following command in SQLPLUS or SQL developer:

show parameter job_queue_processes ;

ALTER SYSTEM SET job_queue_processes=10;

And execute the create command again

 



oracle_em_recreate1

 

 

 



 

 

 

oracle_em_recreate3

oracle_em_recreate2

 

Categories: Databases, Oracle Tags: ,

Oracle Audit Vault – Windows

If you are planning to install Oracle Audit Vault in your IT environment , you need a Linux Box or machine cause the releases for Oracle Audit Vault Server (link) are for the Linux/UX environment.

But :

The Audit Vault server for Windows was made available only for version 10.2.2.1.0. For subsequent versions of Audit Vault – 10.2.3.0.0 and 10.2.3.1.0, only the agent was made available on Windows, not the server. As such, if you want to use the features available in the 10.2.3 versions on Windows, you will need a corresponding 10.2.3 server running on another platform – one of Linux/x86, Linux/x86-64, Solaris/SPARC64, AIX/POWER64, and HP-UX/IA64.

And

the latest release is Oracle Audit Vault Server (10.2.3)

Oracle® Audit Vault Release Notes Release 10.2.3.2

Categories: Oracle

Oracle 11g R2 x64 Windows 2008 R2 Installation Walkthrough.

22/08/2011 7 comments

1. Introduction

You need to download the setup zip files from the Oracle website.The file names are:

1. win64_11gR2_database_1of2.zip
2. win64_11gR2_database_2of2.zip

Once you have the Windows 2008 R2 x64 setup copy these file to the “D:” drive (etc.) and you can install 7zip (etc.) to unzip the two compressed files.

NOTES: My test environment was:

Windows 2008×64 Hyper-V, with two virtual hard disks and 1512 MB RAM to host the OS and install Oracle.

It is recommended you read through the complete Oracle 11g R2 x64 Windows 2008 R2 Installation Walkthrough steps once before you proceed with you installation.

You need to combine the archives before you proceed ,One easy way you can combine both archives  into one by coping/moving the contents of the second zip archive into the extracted folder of the first as shown in the below screenshots.Else you may get missing file if you run the setup.exe as show in the last two screenshots of this walkthrough.

 

2. Installation Walkthrough

Click the setup.exe to begin the installation.

Installation splash screen…

You can skip the email information part if needed.

Click the Yes Button to continue without the email setting.

Select the first option “Create and configure a database” to start installation, click the Next  Button to continue.

Select Server Class option to install the Server Configuration and click Next Button to continue.

Select Single instance database installation and click Next Button to continue.

Select the Advanced Install and click the Next Button to continue.

Select the languages in which your product will run.

Select Enterprise Edition and if you need to change any options click the Select Options Button to continue.

Select Enterprise Edition and if you need to change any options click the Select Options Button to continue.

Select Enterprise Edition and if you need to change any options click the Select Options Button to continue.

Select the path according to you drive names etc. and click the Next Button to continue.

Select the type of database you want to create.

You need to change the default database name and the SID so that it matches you environment.Here we have kept it same as the server name.

You need to change the default database name and the SID so that it matches you environment.Here we have kept it same as the server name.

No change was made here…

Change the database character set if you plan on multiple language support.

Change the database character set if you plan on multiple language groups.

No change was made in this step…

This was selected since we needed a sample database…

This can be changes as needed…

This can be changes as needed…

This can be changed according to your hard disk and storage configurations.

This was not changed according to your needs for back up…

You need to change your admin passwords here..

You need to change your admin passwords here.. or keep the same for all accounts depending on your need for security.

Setup Prerequisite Checks…

Setup Pre-stage Summary…

Installation progress…

Installation progress…

Installation progress…

Installation progress…

Installation completion…

Installation completion…

Setup details summary…

Setup details summary…

 

 

3. Database Configuration Assistant: Database Setup Steps.

If you check the option create database with sample schemas you’d probably get this (not 100% sure but it seems so).

4. Configuring the TNS + Web Admin Console.

Configuring the administrator website (administrator console, database control url , database management studio etc.)

 

Hey I installed everything , but how do I administer the stuff ?

 

Well apparently , I had to check the tns and network settings and dig around the internet for getting the admin console working.

 

I had to reconfigure the created database as below using the wizard as shown in the screenshots  below, you can start the Database Configuration Assistant again from Program Files and do below steps.

You may have to check the net manager if you don’t get a tns and have to reconfigure at this level if you get this message below.” Could not find appropriate listener for this database.Configuring DB control requires database to be registered with at-least one listener.”

If you make tns changes etc. It would be advisable to restart the machine.

5. Installation Errors

You may get this error if you do not copy the second archive and run the setup.exe as mentioned in the beginning of this walkthrough.

6. Post Installation Notes

  • You will find the Oracle 11G utils and other tools in the Program Files shortcut.
  • Most of the other tools are in the bin folder.
  • SQL Command Prompt is available.
  • We had difficulty getting the Admin URL to work on IE 8 on Windows 2008 R2 so installed Firefox.We got a blank page normally for the url
  • Reconfigure Oracle EM
  • Oracle 11g on Windows 7

7. Post Installation Checks

    The database control is as shown below:

    Login as sys dba to access full functionality

    Oracle Database Control

The following are the services that are available related to oracle once the installation is complete, If you do not find the OracleDBConsole_SID as shown below means that it was never installed in the first place, so you need to install it as in above walkthrough.

    Once the Database Console is install you will find the Database Control Shortcut along with the complete list of shortcuts as shown below:

8. Connecting via Oracle SQL Developer

The installation comes with a Oracle SQL Developer, the shortcut gives you the location, but you need to have Java (x64) SDK  installed if you want to run it on the server.You need to download it from the oracle or java site and give the path to jave.exe to proceed.Recommended you do it elsewhere.

 

I hope this walkthrough was useful to you.

Post Image Hosting: imgur.com

Categories: Oracle

Oracle: How to find and kill a locked session ?

Run below as SYSTEM or SYS

select    oracle_username || ' (' || s.osuser || ')' username
,    s.sid || ',' || s.serial# sess_id
,    owner || '.' ||    object_name object
,    object_type
,    decode(    l.block
 ,    0, 'Not Blocking'
 ,    1, 'Blocking'
 ,    2, 'Global') status
,    decode(v.locked_mode
 ,    0, 'None'
 ,    1, 'Null'
 ,    2, 'Row-S (SS)'
 ,    3, 'Row-X (SX)'
 ,    4, 'Share'
 ,    5, 'S/Row-X (SSX)'
 ,    6, 'Exclusive', TO_CHAR(lmode)) mode_held
from    v$locked_object v
,    dba_objects d
,    v$lock l
,    v$session s
where     v.object_id = d.object_id
and     v.object_id = l.id1
and     v.session_id = s.sid
order by oracle_username
,    session_id

/

SELECT s.sid,
 s.serial#,
 s.osuser,
 s.program
FROM   v$session s;

ALTER SYSTEM KILL SESSION '15,2043' IMMEDIATE;
Categories: Oracle