manual database creation [message #146094] |
Tue, 08 November 2005 09:58 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #146205 is a reply to message #146094] |
Wed, 09 November 2005 05:16 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #146816 is a reply to message #146094] |
Mon, 14 November 2005 01:19 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #146912 is a reply to message #146856] |
Mon, 14 November 2005 10:28 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
sunil_v_mishra
Messages: 506 Registered: March 2005
|
Senior Member |
|
|
hi,
home work for you galaxy....
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
|
|
|