Home » RDBMS Server » Server Administration » manual database creation
manual database creation [message #146094] Tue, 08 November 2005 09:58 Go to next message
galaxy
Messages: 62
Registered: October 2005
Member
Hello,

I had a normal database Oracle 9i. Everything works fine.
Then I shut down the database and started it in nomount Mode.
After that I created a new Database manually with create database ...

This also works after a few issues. Now my Problem.

I can connect to the new database. And also to the old one. But the Problem is that I always have to shutdown the one database and start up the other if I want to work with the other.

I can't open 2 Sqlplus Windows were I can work in the one window with the old database and in the othe window with the new one.

They work on the same instance i think. How can I solve this Problem. It is only a Test. Nothing on production.

Or must I create a new instance? If it is so, how can Ido this??

Thanks for help
Re: manual database creation [message #146152 is a reply to message #146094] Tue, 08 November 2005 22:11 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
They do have different names don't they? And they use different init.ora files right?

David
Re: manual database creation [message #146157 is a reply to message #146152] Tue, 08 November 2005 22:50 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

You might have done something wrong, read this

http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96521/create.htm#1000691

post the steps that you used to create a database
Re: manual database creation [message #146205 is a reply to message #146094] Wed, 09 November 2005 05:16 Go to previous messageGo to next message
galaxy
Messages: 62
Registered: October 2005
Member
Thats right. The databases have different names.
One is demodb an the othe has the name Oracle9i.

And we also uses different init.ora files


But what can I do tho get both databases online???

The steps I created the 2nd database:

- I installed the Oracle 9i Software with a testdatabase
(1st database)
- shut this database down with shutdown immediate
- startup nomount pfile path to the new init.ora file
- create database demodb .... (2nd database)
- run scripts like catalog.sql, ...

Is there something wrong?

Now we have 2 databases but we only can use 1 at one time, because we have to shut down the one to start up and use the other.

Is it possible to create now a second instance??

Thanks a lot for your help
Re: manual database creation [message #146207 is a reply to message #146205] Wed, 09 November 2005 05:34 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

can you please post the result of the following queries

Quote:

SQL> select instance_name from v$instance;

SQL> select name from v$database;


from both the databases.


Re: manual database creation [message #146361 is a reply to message #146094] Thu, 10 November 2005 00:49 Go to previous messageGo to next message
galaxy
Messages: 62
Registered: October 2005
Member
Here are the results of the Queries:

for the 1st database which was created when I installed the Oracle 9i Software:

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
oracle9i


SQL> select name from v$database;

NAME
---------
ORACLE9I



and here for the second database which I created manually with create database demodb ....

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
oracle9i

SQL> select name from v$database;

NAME
---------
DEMODB


what can I do to get both run at the same time?

Thanks for help
Re: manual database creation [message #146367 is a reply to message #146361] Thu, 10 November 2005 01:07 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

here lies the problem,

both the databases are running with the same instance name i.e. oracle9i.

I suppose, you are using Windows OS . so it means only one window service for both the databases , create one more window service named DEMODB using ORADIM utility .

Read the documentation on how to create a window service if dont know.

Now when done access one database normally ( for which ORACLE_SId is set) and other using Oracle Net service.


Re: manual database creation [message #146450 is a reply to message #146094] Thu, 10 November 2005 09:13 Go to previous messageGo to next message
galaxy
Messages: 62
Registered: October 2005
Member
Yeh, I work on Windows XP

I have created a new Windows service named demodb with oradim.

But how can i "connect" this service with the database demodb.

When i stop the service Oracle9i, I can't enter any database.
Also when the demodb service in still running.

But when I start the oracle9i service then I can enter both databases. Only one at the one time. To enter the other DB I have to shut down the first database.

It seems that the demodb service has no function.- How cann I connect it to the demodb???

Thanks for help
Re: manual database creation [message #146538 is a reply to message #146450] Thu, 10 November 2005 23:19 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

first of all shudown both the databases and then keep the window service demodb running.

Now

--set the environment variable
ORACLE_SID=demodb

-- open sqlplus and login as sys,
startup the database with demodb's pfile

hope it should open demodb.
Re: manual database creation [message #146598 is a reply to message #146538] Fri, 11 November 2005 06:38 Go to previous messageGo to next message
sunil_v_mishra
Messages: 506
Registered: March 2005
Senior Member
hi,

If you are working on windows o/s then you must know that oracleservice+sid is service name for any instance of database ..

Remember one thing instance name and global database name can differ

galaxy as per your query that what i had seen is you have oracle9i as instance for both the database. so on you PC/machine/comp only one oracleserviceoracle9i will be there.

So now i think you know what you have to do ,,,,, Razz

Regards
Always Friend Sunilkumar

Re: manual database creation [message #146816 is a reply to message #146094] Mon, 14 November 2005 01:19 Go to previous messageGo to next message
galaxy
Messages: 62
Registered: October 2005
Member
This is the Problem. I said it in an entry much earlier. But I don't know how to solve it.

There is only one windowsservice named oracleserviceoracle9i.
If this service runs, I can enter one of the two databases at one time. I can't use both at the same time. Even not if I have created an oracleservicedemodb manually with oradim.

It seems that this new service has no function. If I stop the service oracleserviceoracle9i and only the service oracleservicedemodb is still running, I can't connect to any database.

The demodb database allways starts with the instance Oracle9i. I don't know how I can change this to the service demodb which I created manually with oradim.

I change the entry for instance_name to demodb in the init.ora file of the demodb. But when I start the database, the instance name is oracle9i.

Can somebody please help me to solve this Problem?

The aim is that each database has its own service/instance and that I can use both databases at the same time

Re: manual database creation [message #146844 is a reply to message #146816] Mon, 14 November 2005 03:34 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member
look now as the both the database are attached with the same instance , first try doing this.

--> shutdown both the databases first.

--> set Oracle sid to "demodb".

--> create new service for "demodb" and attached it with the "init.ora" file for "demodb" database .
so u can use it something like
ORADIM -new -sid demodb -pfile "pfile location" 


for details of ORADIM command , write ORADIM on command prompt and press Enter and you will see all the options.

--> now check whether this service is up & running.

--> start the database "demodb" with the above specified "pfile".

now try this and post back the problems.

[EDIT: Read some docs related to ORADIM]

[Updated on: Mon, 14 November 2005 03:34]

Report message to a moderator

Re: manual database creation [message #146855 is a reply to message #146094] Mon, 14 November 2005 04:14 Go to previous messageGo to next message
galaxy
Messages: 62
Registered: October 2005
Member
we solved the Problem. Laughing

the point whas that we have to create the service with oradim like this:

oradim -new -sid demodb -INTPWD sys -startmode auto -pfile ...

And the intpwd was the important thing. We never have used this before. With this extension it works fine.


Thnaks all for your help.

Re: manual database creation [message #146856 is a reply to message #146855] Mon, 14 November 2005 04:18 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
KUDOS!!!!

Finally the effort paid off....

Gud one....
Re: manual database creation [message #146912 is a reply to message #146856] Mon, 14 November 2005 10:28 Go to previous message
sunil_v_mishra
Messages: 506
Registered: March 2005
Senior Member
hi,

home work for you galaxy.... Laughing

Find the difference between this two way of using oradim shown below.

First way
D:\oracle\ora92\bin>oradim -delete -sid clonehclsunil


Second way
D:\oracle\ora92\bin> oradim -delete -srvc OracleServiceclonehclsunil

Enjoy
Always Friend Sunilkumar



Previous Topic: strange issue ....!!!
Next Topic: SQL behaving differently on different RAC Node
Goto Forum:
  


Current Time: Sat Feb 15 17:16:48 CST 2025