Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to manually create an Oracle 10g database on UNIX 2

Status
Not open for further replies.

JazzGeek

IS-IT--Management
Jun 23, 2002
165
US
All,

I messed up the default database instance: orcl. And now I need to create a new database (instance?) so i can install a program. However, I'm new to Oracle (and my boss refuses to provide training), and do not know how to manually create another 10g Database on this UNIX server.

I look for instructions, but cannot find any! I just want to create a blank database and then populate it with data from this application install.

Any help is appreciated!

Thanks

SJ

Sebastian Jazzer
MCSE 4.0 & 2000, Network+, A+, Web Developer

 
quick and dirty (kinda); if you installed the server you should have all needed permissions.
my 2 cents - after you create the database, create a user and give appropriate permissions on the newly created db, then use this user unless you need admin rights (then switch to sys as sysdba),
jablonsky
 
Seb,

I haven't looked at the link from jablonsky, but manually creating Oracle 10g (and 9i) databases is what I do all day long (when I'm not on Tek-Tips), so I have plenty of scripts that I tailor to fit customers' needs.

Building a 10g database is not for the faint of heart, unless you have a good paradigm to follow. There are several (rather +/- major) options to choose from when setting up the Oracle database, so I hesitate simply "tossing out" onto this thread a bunch of scripts without first understanding better your needs and also your ability to administer the db once it gets built since you have already indicated that your boss refuses to provide training. (...which is kinda like asking you to fumble through brain surgery but he doesn't want to pay for neurosurgical training...Is he willing to pay for/suffer the consequences? Is he gonna sue you for malpractice afterward? <grin>)

I'm just packing to leave on a trip to the Philippines tomorrow, but if you contact me via my signature, I can possibly lend a hand to you today. (For best results, have some method of my connecting to your target server.)

Lemme know.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Thanks to you both.

What Im' trying to do is create a new Oracle 10gR2 instance, a very basic one just to start with.

Is this the same thing as creating an Oracle database?

Thanks

SJ

Sebastian Jazzer
MCSE 4.0 & 2000, Network+, A+, Web Developer

 
When people talk about creating and "instance" and creating a "database" in Oracle, they might, or might not be talking about the same thing (since they are technically not the same thing).

Again, I don't want to flog a bunch of code and scripts out on this thread, which a "casual" DBA might think met their needs, but could cause them problems if they do not understand all of the components.

I will make time to help you (free of charge)...to tailor the scripts to meet your needs (i.e., "starter" 10g database/instance on Solaris) if you contact me via my signature.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Jazzgeek,

I only have experience of oracle on windows, but if you type 'DBCA' at the command prompt, a GUI-driven more user friendly database creation tool should appear.

Investigate this option, and if you get that far, create a database from a template and use the general purpose template, as a starting point.

Regards

Tharg

Grinding away at things Oracular
 
John,

Althoug DBCA can be helpful, in my experience, it weighs one down with so much unnecessary craaaaaaaaaaaap (with infrastructure for Oracle options that one may not want). That's why I use my scripts tailored to precisely what "the doctor orders". <smile>

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Thank you both for the great help!

I think, for the sake of time right now, that I'll use the dbca utility.

Thank you though, Mufasa, as if I had more time, i would probably take you up on your kind offer!

Thanks again to you both. This worked great!

Cheers

SJ

Sebastian Jazzer
MCSE 4.0 & 2000, Network+, A+, Web Developer

 
Okay, sorry.. but here's a really silly question.

How in the world do I start up the new database created?

It told me to go to this url:
but that doesn't work. I started up the DB console like so:

emctl start dbconsole

But that only opened up the default instance, not the new database I created.

Do you know how I can start up the newly created database I just created? (Called: IFKDK)

Thank you!

SJ

Sebastian Jazzer
MCSE 4.0 & 2000, Network+, A+, Web Developer
 
Seb,

Here are the steps:

1) Log into Solaris with a login that is a member of the Unix Oracle DBA group.
2) % echo $ORACLE_SID
(the result should display the name of your new database)
3) ...
Code:
% sqlplus /nolog
SQL> connect / as sysdba
(If the database is not up, then a message says:
"connected to an idle instance."
If the database is running, then a message says:
"connected."
SQL> startup (if the database is down)

If step 2, above, does not show your new database name, then do the following:
Code:
% cat /var/opt/oracle/oratab
The results should show, at the bottom of the output, the name of your instance, followed by the $ORACLE_HOME value, followed by a "Y"/"N" telling whether or not Oracle should start up automatically following a server re-boot. You can direct Oracle to set properly the values of $ORACLE_SID and $ORACLE_HOME by issuing the command:
Code:
. oraenv
It prompts you for the name of the instance to which you wish to connect. Enter the case-sensitive instance name from your "oratab" file for the instance you want to connect to with the "sqlplus /nolog" command. (You should use the "sqlplus /nolog" command only for very high-level Oracle DBA administrative activities as "SYS" such as "startup" and "shutdown" of the database.


Let us know how all of this works for you.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Mufasa

That worked great, thanks!

Now I have one more problem. (Sorry!)

I'm trying to connnect to that database from another server, but unable to using the "sys" user. (I need to use the "sys" user because I'm installing an application that needs the highest privlege.)

I CAN connect successfuly using the "system" account however. I'm using this syntax:

./sqlplus system/passwrd@orcl

But when I try:

./sqlplus sys/passwrd@orcl

It doesn't work! ugh.

Any idea how I can get sys to connect to the database server from another machine?

Thank you again!

SJ





Sebastian Jazzer
MCSE 4.0 & 2000, Network+, A+, Web Developer

 
It "appears" I got connect remotely using this command:

connect sys@orcl as sysdba

But, i'm not sure!

Is there an sql command I can use to find out what database I'm currently connected to?

Thanks again!!

Sebastian Jazzer
MCSE 4.0 & 2000, Network+, A+, Web Developer

 
Yes, you can log in to the Oracle server as "SYS" from a remote machine, but you need to ensure that the target server has an init<SID>.ora file setting of:
Code:
remote_login_passwordfile = exclusive[/b]. Also, you need to properly run the "orapwd" program that creates the password file for remote access.

I'm sorry I cannot give you a specific, coded, working example at the moment, but I'm just trying to get out the door for a flight to the Philippines. (When I get there and get reconnected [at about 5:00 a.m. EDT Sunday], I'll check to see if someone else has been able to help you get connected in the fashion you want.)

Best regards,

 [santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: [b]www.dasages.com[/b]]
 
Jazz,

Code:
SELECT NAME FROM V$DATABASE;

T

Grinding away at things Oracular
 
Sorry, John...I may have missed something...how does that move Sebastian nearer to resolving his need?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Dave,

re your scripts, I quite agree. I remember my first strugglings with Oracle creation, and if Jazz is in a similar situation, a scripted db creation is too much to learn right now. He appears to be at the beginners stage (apologies if this is wrong Jazz) which is why I mentioned the dbca.

Although your comment about the overhead of unwanted stuff is self-evidently correct, I do have one issue with it. When using other standard features, the various Oracle tools usually assume the presence of things which are added as standard by the dbca.

For example, I think when adding Application express, it takes much less time on a dbca created db than a scripted
one. My thinking was that if I had a database in production, I'd rather suffer the overhead of building and/or storing some superfluous stuff, than risk an outage when attempting to upgrade a minimalist database. I think the cost of a mistake during upgrade could far outweigh the cost of some extra disk space.

Answers on a post card please....

J



Grinding away at things Oracular
 
Dave,

it must be post-holiday dip.

Jazz asked "Is there an sql command I can use to find out what database I'm currently connected to?" to which I replied as above.

Does that make sense or am I losing the plot a wee bit?

J

Grinding away at things Oracular
 
No, John, I'm the one with "Half-Heimers" Disease...It's bad timing on my part...I saw only Seb's 10:17 a.m. question, I composed my response (posted at 10:45 a.m.) and was completely oblivious to the fact that Seb posted his 10:39 question to which you promptly responded at 10:47! I'm the weirdo that was not keeping up with the game.

Sorry for my silliness. You're response makes perfect sense under the complete scenario.

Thanks for your patience with an old man.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Just to add to the confusion ;-) you can also issue a host echo $ORACLE_SID command at the SQL prompt to get the name of the database according to the OS.

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top