Home » Infrastructure » Linux » 11gR2 create database dbca post tasks?
11gR2 create database dbca post tasks? [message #511091] Thu, 09 June 2011 10:47 Go to next message
jaywebguy
Messages: 6
Registered: May 2010
Location: Idaho Falls
Junior Member
So I've read and followed the directions for installing a 11gR2 on Linux 5.5. That part worked great. The article didn't mention though how to create a new database. I did a google search and found a bit more information. Namely that I need to set the ENV variables in the oracle users .bash_profile.

So this is what I have set

ORACLE_HOME
PATH
LD_LIBRARY_PATH
ORACLE_SID
ORACLE_UNQNAME
ORACLE_HOSTNAME

I then created my listener with netca and now have it started.

Next I created the database with dbca.

I saved the information from the dbca process.

What do I do next so that when I restart my linux box, oracle will come back up? This is where I'm having problems, I'm not certain what to do next and can't seem to find the answer. Is there any env variables I've missed? What file will I need to edit to insure all comes back up when I restart the machine?

I'd really appreciate a the answer(s) or better yet a link to a paper/tutorial, with the answers.

Thank you

Jason
Re: 11gR2 create database dbca post tasks? [message #511093 is a reply to message #511091] Thu, 09 June 2011 10:53 Go to previous messageGo to next message
BlackSwan
Messages: 26649
Registered: January 2009
Location: SoCal
Senior Member
when all else fails Read The Fine Manual => Installation Guide

http://www.oracle.com/pls/db112/portal.portal_db?selected=11&frame=

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: 11gR2 create database dbca post tasks? [message #511097 is a reply to message #511091] Thu, 09 June 2011 10:59 Go to previous messageGo to next message
jaywebguy
Messages: 6
Registered: May 2010
Location: Idaho Falls
Junior Member
Looks like one thing I needed to do was to set the DB_NAME var in the .bash_profile as well. My sqlplus returned the following error: ORA-12162 TNS:net service name is incorrectly specified.
I added the DB_NAME to the .bash_profile file then recompiled the file after which I was able to connect to sqlplus.

Re: 11gR2 create database dbca post tasks? [message #511104 is a reply to message #511093] Thu, 09 June 2011 11:17 Go to previous messageGo to next message
jaywebguy
Messages: 6
Registered: May 2010
Location: Idaho Falls
Junior Member
BlackSwan wrote on Thu, 09 June 2011 10:53
when all else fails Read The Fine Manual => Installation Guide

/www.oracle.com/pls/db112/portal.portal_db?selected=11&frame=

It would be helpful if you followed Posting Guidelines - www.orafaq.com/forum/t/88153/0/


BlackSwan,

I actually read through those. Here's the one that discusses post install tasks.

download.oracle.com/docs/cd/E11882_01/install.112/e16763/post_inst_task.htm#CHDCGCJI

I can't find anywhere in there that mentions specific env variables though. Pleas correct me if I'm wrong.

I did take a look into the /usr/local/bin/oraenv script. In there I see where it sets the ORACLE_SID, ORACLE_HOME, PATH, ORACLE_BASE. What about automating the startup on reboot or other variables like UNQ_NAME or DB_NAME?

Jason
Re: 11gR2 create database dbca post tasks? [message #511105 is a reply to message #511097] Thu, 09 June 2011 11:17 Go to previous messageGo to next message
BlackSwan
Messages: 26649
Registered: January 2009
Location: SoCal
Senior Member
two ways to connect to Oracle DB exist
1) locally when logged directly onto DB Server system itself via BEQUEATH protocol (sqlplus scott/tiger)
2) via SQL*Net (sqlplus scott/tiger@TNS_ALIAS)
to use #1 ORACLE_HOME, ORACLE_SID & PATH should be set.
to use #2 only need PATH to be set

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: 11gR2 create database dbca post tasks? [message #511116 is a reply to message #511104] Thu, 09 June 2011 11:38 Go to previous messageGo to next message
John Watson
Messages: 8135
Registered: January 2010
Location: Global Village
Senior Member
Oacle provides the scripts $OH/bin/dbstart and dbshut, which read the oratab file. If you invoke them through an rc script you can automate the startup and shutdown.
Re: 11gR2 create database dbca post tasks? [message #511120 is a reply to message #511116] Thu, 09 June 2011 11:49 Go to previous messageGo to next message
jaywebguy
Messages: 6
Registered: May 2010
Location: Idaho Falls
Junior Member
John Watson wrote on Thu, 09 June 2011 11:38
Oacle provides the scripts $OH/bin/dbstart and dbshut, which read the oratab file. If you invoke them through an rc script you can automate the startup and shutdown.


Something like this:

www.server-world.info/en/note?os=CentOS_5&p=oracle11g&f=4

I thought I read that in 11gR2, the dbstart/dbshut have been dprecated?

download.oracle.com/docs/cd/E11882_01/server.112/e10839/strt_stp.htm#BABGDGHF


Anyways, this is leaving me a bit confused?

Jason
Oracle 11gR2 CentOs 5.5 64bit
Re: 11gR2 create database dbca post tasks? [message #511121 is a reply to message #511120] Thu, 09 June 2011 11:56 Go to previous messageGo to next message
BlackSwan
Messages: 26649
Registered: January 2009
Location: SoCal
Senior Member
>I thought I read that in 11gR2, the dbstart/dbshut have been dprecated?
If you did everything "by the book" then you would NOT have installed on CentOS; since it is not supported OS!
Re: 11gR2 create database dbca post tasks? [message #511123 is a reply to message #511121] Thu, 09 June 2011 12:07 Go to previous messageGo to next message
jaywebguy
Messages: 6
Registered: May 2010
Location: Idaho Falls
Junior Member
BlackSwan wrote on Thu, 09 June 2011 11:56
>I thought I read that in 11gR2, the dbstart/dbshut have been dprecated?
If you did everything "by the book" then you would NOT have installed on CentOS; since it is not supported OS!



Why are you being so confrontational? I don't see any help from your comment?

Jason
Re: 11gR2 create database dbca post tasks? [message #511133 is a reply to message #511123] Thu, 09 June 2011 12:45 Go to previous message
jaywebguy
Messages: 6
Registered: May 2010
Location: Idaho Falls
Junior Member
Ok,

So it looks like I've got it working. I was able to successfully install 11gR2 on CentOs 5.6, create a database, restart the machine and have it all come backup. So for future reference here is a summary of the steps and documents that I followed this is assuming that centos is all ready up and running.

1. Preconfigure CentOs 5.6 -- http://www.jameskoopmann.com/docs/Install_Oracle11gCentOS5.htm
This article did a pretty good job of outlining the install process for the software. It's probably a good idea to familiarize yourself with any terms that you don't know. oracle-base.come/google/orafaq.com all good resources for this purose.
2. After following the previous document you should have 11g installed, so what do you need to do next. For me it was create a database, but there's a few steps you need to complete first, this seems to be were I initially got lost.
A.
Set env variables in /home/oracle/.bash_profile. I had a heck of a time find specifics on this. But this is what I ended up with:
export ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export ORACLE_SID=oraclebird
export ORACLE_UNQNAME=$ORACLE_SID
export DB_NAME=oraclebi
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_HOSTNAME=oraclebird.servertest.local

run . /home/oracle/.bash_profile (reset env variables)

/usr/local/bin/oraenv will set some of these variables for you, but not all. It's worth it to read through it.

B. You need to create your listener before you create your database, so from command line run netca

C. Now you're ready to run dbca ( There are a lot of configurations options here and the oracle document does a pretty good job of covering the details.

D. Post dbca, This is were I messed up previously. We are not quite done. I'll be honest I still need to read up on the oracle autostart feature in 11g, still not sure how to use it. But for me I followed the instructions here to use the dbstart dbshut scripts to automate restarting the database on system shutdown/restart. www.server-world.info/en/note?os=CentOS_5&p=oracle11g&f=4

Hopefully this will help someone else in the future. Now I have a test system I can use to practice my backup/recovery procedures.

Jason
11gR2/centos 5.6 64 bit







Previous Topic: Help installing Oracle 10g Release 2 (10.2) for Linux x86-64
Next Topic: Facing error in Shell scripting
Goto Forum:
  


Current Time: Sun Jan 26 09:22:54 CST 2020