Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Monday, December 19, 2016

oracle identity management rcu with oracle 12c database

Certification matrix for Oracle Identity Management 11G R2 states 12C Database is supported. Concretely the document states that "The Oracle databases listed are supported on all configurations (including RAC) and platforms that the database team supports" and Oracle 12.1.0.1+ is in the list.

I create a 12C Database Container Database and i also create a pluggable Dastabase to host my OIM schemas. I have download the RCU 11.1.1.9 which is the version supported for OIM 11G R2. But when i run it and try it for create the repositories it said that my Database is not supported.

After searching on the web i realized that i haven't read the release notes for OIM. https://docs.oracle.com/cd/E52734_01/core/IDMRN/intro.htm#IDMRN389

The release notes states that: "Oracle Database 12c (12.1.0.x) with PDB is not Supported in 11g Release 2 (11.1.2.3)"

There is also a second minor problem with 12C support. We need to run xaview.sql from ORACLE_HOME/rdbms/admin directory to create XAVIEW objects because as the release document states "For Oracle Database 10g and 11g databases, these objects are automatically created by RCU if they are not already in place. Oracle Database 12c databases have a new XAVIEW structure that requires the explicit creation of these objects."

If this script haven't run before the RCU, the RCU will stop with the following error:

Error: Views/Synonyms required for XA transaction support are missing in this Database 12c.
         These views/synonyms are required by the OIM Schema.
  Action: Refer Oracle Database Administrator's Guide to install XA transaction recovery views/synonyms
 using the script xaview.sql. Contact your DBA.

Running the script output:
SQL> @xaview.sql

DROP VIEW d$xatrans$

*

ERROR at line 1:

ORA-00942: table or view does not exist

DROP VIEW d$pending_xatrans$

*

ERROR at line 1:

ORA-00942: table or view does not exist

View created.

Synonym created.

View created.

Synonym created.

So after running the script the RCU generates the OIM schema successful.

As a conclusion the release notes for Oracle Products contains valuable information that some times documentation does not include and should not be ignored before installation.

Wednesday, December 14, 2016

sqlcl improves the way we work with oracle databases from terminal

sqlcl is a command line tool for connecting and work with an oracle database from terminal. Having autocomplete, easy formatting for terminal or for export in CSV, HTML and other formats, history of commands, edit of SQL commands in external editor, edit or correct multi line commands and many many more features.

You can download it from Oracle website:

http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index-097090.html

For run it you need to extract it and put the sqlcl/bin in your system/user PATH for convenience.

the command to run it on linux is sql inside sqlcl/bin (You can use sql.bat or sql.exe on windows)

To connect with the database there are several ways. Personally i prefer to connect like this:

$ sql sys@//dbhostname:port/servicename as sysdba

The first thing to do is change the sqlformatl. You can do it using
SQL> set sqlformat ansiconsole

This will change the output of queries to be more easy to read from terminal. Try it with or without this setting and the improvements are obvious.

Using tab you can use the autocomplete for all kind of objects and commands. I found this very useful.

You can write multi line commands using the enter to separate the rows.
The nice thing is that after you wrote the command and execute it, you can edit it in vi (or the editor or your choice) from terminal without exit sqlcl and execute it again. To do this just do

SQL> edit
SQL>/

The / will execute the command you just edited with vi.

History is available using the history command
SQL> history

We can execute operating system commands using !
SQL>!ls

This will list the files from working directory

I am not a DBA and i occasionally connect and work with Databases but i loved this tool already because i enjoy working from terminal and sqlcl improves the way i work with databases from terminal. Give it a go i am sure you will enjoy with it.

You can find more information in this excellent blog:

http://krisrice.blogspot.com

And a getting started video here:

https://www.youtube.com/watch?v=HApdy-o525A





Thursday, October 22, 2015

Using Ansible to configure an Oracle Linux 7.1 server with Oracle 12c R1 Enterprise Edition Database


Ansible is the leading tool for configuring software and various parameters on servers. It does not require agents and other software installed on nodes like other popular tools (puppet or chef). Its also modular and already have hundreds of modules that help us configure our servers in several ways. In this article I will show how we can install an Oracle 12c R1 Database (12.1.0.2) in Oracle Linux 7.1 server. The same Ansible playbook can be used with Redhat Enterprise Linux 7.1 and CentOS 7.1. You can download the code in Github at:

https://github.com/cvezalis/oracledb-ansible




Source code also includes configuration for provision automatically a virtual machine using Vagrant.

Download from Oracle support the Oracle installation files:

- linuxamd64_12102_database_1of2.zip

- linuxamd64_12102_database_1of2.zip

and put them to folder roles/oracle-install/files inside checkout folder

After go into checkout folder and execute :

$ vagrant up 


After a few minutes a virtual machine with Oracle Database will be ready for you without any further configuration. You can access the Enterprise Manager Express using sys/sysdba and “oracle” as password.

https://oradb3.private:5500/em

You can shutdown the virtual machine using:

$ vagrant halt


You can destroy it (delete from disk) using:

$ vagrant destroy

more details at my article here : http://www.nodalpoint.com/devops-ansible-oracle-database-oraclelinux-7-vagrant/