ORACLE_SID & DB_NAME CONFLICTS
Is it possible to have both Database name and oracle_SID the same..If possible..Pls reply how can be done...
The problem I felt while installing Clarify server s/w on Oracle 7.3..giving error message Error logging into Database...
Thanx
[email protected]
Hi vlethakula ;
However thanks for all reply from you !
From Your Reply :-
I don't understand your answer .
So db_name is set to AMIGO and loaded. And in your control files also DB_NAME is stored not ORACLE_SID.
IMO : Instance memory+background processes are started with SID name i.e [ instance started as amigo]
all datafile headers and control file your DB_NAME is stored. Your instance access datafiles and controlfiles
As per your reply my ques is
If instance (IMO) started as amigo , how amigo finds datafiles and controlfiles for tommy DATABASE ?
FYI :
I red from oracle docs following information
When the instance is started, the control file is updated with the current ORACLE_SID
Regards ;
Thiyagusham .G
Edited by: 952909 on Dec 4, 2012 2:26 PM
Edited by: 952909 on Dec 4, 2012 2:27 PM
Edited by: 952909 on Dec 4, 2012 2:27 PM
Similar Messages
-
Instance name = ORACLE_SID = db_name ?
I'm not sure whether the instance name is the same as the db_name as the ORACLE-SID ?
Could someone clarify this ? Thanks.think the question is which is the difference between an instance an a database ?
Imagine the database is what you backup ... so the files and the instance is what manage your files ...
Nope I don't think so. OP asked
whether the instance name is the same as the db_name as the ORACLE-SID
I didn't understand the last part of your reply. How does instance manages the files of the db?
Aman.... -
Configuration of the Physical & Logical standby servers on the same machine
I've encoutered a problem to connect to one of the standby servers .
I created a DataGuard in 10.2. Primary on 1 machine, 1 physical standby and 1 logical standby on another machine (both phy and logical in same machine)
I first created a primary then a physical standby. I've got no problem at all.
But when I created a logical standby server on the same machine with the physical then I could not connect to both phy and logical . I can connect to either one of them.
According to DataGuard setup, the db_name must be the same in primary and all standby servers. This is fine when each of the primary or the standby installed in a separate machine.
The db_name of the physical = rolex
The db_name of the logical = rolex
When we have more than one instance in the same machine, we just set the ORACLE_SID = db_name ( or instance), then connect to it.
If I connect to the physical, then I try to connect to the logical, it goes to the physical or vice versus.
Does anyone have the solution ?
QNDB_UNIQUE_NAME parameter will be the seperator.
give DB_UNIQUE_NAME parameters different names and set ORACLE_SID with DB_UNIQUE_NAME name you gave
DB_NAME is the primary instances database name DB_UNIQUE_NAME is given for standby instances database name -
Posting this:
#!/bin/sh
ORACLE_SID=DB_NAME
ORACLE_HOME=/u01/app/oracle/product/ORA9208EE
export ORACLE_SID ORACLE_HOME
cd $ORACLE_HOME/bin
./rman <<EOF!
connect target /
run {
change archivelog all crosscheck;
backup database plus archivelog;
exit;
set this up under CRON and for some reason, its not firing...any ideas?
Manual fire works.....cron doesnt......
Cron does work as I set "mailx" and that sends me mail...
thanksSo if works in the shell just not in the cron?
Sorry, I see the manual works.
I agree with the profile comment
Edited by: mseberg on Feb 4, 2011 11:37 AM
At the top of mine I do this:
#!/bin/bash
# Name: db_rman_full.sh
# Purpose: Database rman backup
# Usage : db_rman_full <DBNAME>
*. /u01/app/oracle/dba_tool/env/PRIMARY.env*
and my PRIMARY.env looks like this:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0
export ORACLE_SID=PRIMARY
export ULIMIT=unlimited
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
export LIBPATH=$LD_LIBRARY_PATH:/usr/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
PATH=$ORACLE_HOME/bin:$ORACLE_BASE/dba_tool/bin:/bin:/usr/bin:/etc:/etc/X11/xserver/C:.
export BACKUP_DIR=/u01/oradata/PRIMARY_cldbkp
export PATH -
How to take a backup manually in oracle 11g express edition?
how to take a backup manually in oracle 11g express edition? i want to take backup of a database and want to restore later on on a different computer .
Stop database, and copy all files to another machine.That sounds to me to be the closest answer to the question posted. And perhaps the easiest solution.
Install XE on the "another machine", shut it down. Shutdown the source database. Copy the datafiles to the new host. Startup your "new" database, it will be an exact clone of the original.
To find out what files need to be copied, as system (or sysdba) run:
select name from v$datafile;
... file1, file2 ...
show parameter control
... control_files ... file1 ...
alter database backup controlfile to trace [reset logs];
show parameter diag;
... diagnostic_dest ... <drive:>|/diag_pathTo do a proper database clone its better to recreate the controlfile and reset the archive sequence number- leave out the controlfile copy part. In the diag_path location find the trace file under diag/rdbms/$ORACLE_SID/<db_name>/trace it should be the latest ora*.trc file.
The trace file has the commands to recreate the controlfile, which includes the datafiles and putting the tempfile back in place. If the datafiles are in a different location, i.e. in Windows going to a different drive, or you want do put datafiles in a different folder location, the create controlfile statement is the easiest time to get the file directories right.
If you add the "reset logs" qualifier (don't use the brackets!) you'll get just the reset logs version of the create controlfile statement, otherwise you'll get both NORESETLOGS and RESETLOGS versions of a create controlfile statement, run one or the other. Not both. Not the entire trace file, just the create controlfile, alter database open [reset logs], alter tablespace temp add tempfile ... bits. No recovery is needed for a database that is shutdown when datafiles get copied to a new location/host. -
How to Import/Export database tables from one server to other in oracle8i
Hello friend,
Please can any one tell me how to import/export groups of database tables from one server with oracle to another using VB.net. It would be nice if some one can provide some code of it.
I am a software developer and I am in middle of a large project development, in which I need to export a large oracle database from one server to another efficiently.
Its very urgent so please someone help me.At command prompt (source db)
set ORACLE_SID=db_name
exp system/password@db_name full=y buffer=104857600 file=(c:\file1.dmp, c:\file2.dmp....) log=c:\exp.log filesize=2000M
Then ftp the export dump files (in binary) to the other server or copy to target server over the network.
At command prompt (target db)
set ORACLE_SID=db_name
imp system/password@db_name full=y ignore=y buffer=104857600 file=(c:\file1.dmp, c:\file2.dmp....) log=c:\imp.log filesize=2000M
If the path names of the datafiles are going to be different in the target server (as compared to the source), then precreate the tablespaces before import. Set buffer value accordingly.
Message was edited by:
FeNiCrC_Neil -
Ora-02084 : database name is missing a component
hai all,
i am a newbee to oracle. i am struggling to create a database, any help would be highly appreciated. i have installed Oracle 9i on a RH8.0 system. but while creating database through DBCA, i am getting the error message, "ORA -02084:Oracle database name is missing a component". i ahve gone through the documentation and found that probelm is with ORACLE_SID. i have set all the environment variables(including ORACLE_SID, DB_NAME AND DB_DOMAIN) according to the documentaion and created swap files, temporary space etc.i have set all the environment variables in .bash_profile in ORACLE_HOME.
i have stopped DBCA and gone through the files. i could see that the database is actually created, with initXXX.ora.441414312 file. but once when i started the database with nomount and checked, i could find the control files missing.
thanks in advance,
ramesh.Probably you are missing value for db_name (or missing parameter db_name) in parameter file.
Note you can still create db manualy (without DBCA). -
Does anybody know if it's possible to access sqlplus using Putty? I downloaded Putty, ran and I could access the server and got the ORACLE_HOME. However, when I issue the command sqlplus I get the follow message:
-bash: sqlplus: command not found
Thanks a lot.Hi Bruno,
As mentioned, be sure you have your $PATH set correctly.
The error you received is because the command you entered was not found in your current path.
Normally, this is defined in your .bash_profile.
But, you can also set up your path at the command prompt by putting in:
First*, you need to set your ORACLE_HOME. This is the home directory as defined by Oracle where the binaries for the software are installed.
Example:
$ export ORACLE_HOME=/oracle/product/11.1
Then*, you need to either set your Oracle bin directory in your path, or run it from the bin directory
Examples:
Set PATH to include the Oracle bin directory
export PATH=$ORACLE_HOME/bin:$PATH
You can also change directory to your *$ORACLE_HOME/bin* directory and run the command from there as:
./sqlplus <return>
or run it with the fully qualified path from any location as:
/oracle/product/11.1/bin/sqlplus <return>
Also, be sure to set your ORACLE_SID before your run SQL*Plus, or you will get an error SP2-0750.
example: export ORACLE_SID=<db_name>
HTH... -
Hi,
Daily I am taking the RMAN Full Hot Backup into the Disk and later to tape....so we need to test the whether backups are occuring correctly or not....means..we need to test full RMAN restore and recovery to some other machine.......
How can we acheive this...can anybody sched some light on this....Please it is urgent.....Hi,
thank you....
I got the following procedure...to test it and restore to some other machine and recover there....and check the production and restored one data...I got the material from RMAN Documents regarding restore and reocover to some other machine with same INSTANCE_NAME and ORACLE_SID and DB_NAME.......
can we do the RMAN clone to some other machine with different oracle_sid,db_name,instance_name using PRODUCTION RMAN FULL HOT BACKUP..... -
Because of the discussion present in the following thread, I did few experiments and would you like to share with you. Hope it is a useful information for you guys.
Re: db_name & memory allocation
OS: Win XP SP2 or Windows 2000 <b>(32-bit)</b>
Oracle Version: Oracle 10gR2
System RAM: 1G
<b>Attempting to create the database CCC by specifying db_name parameter only</b>
C:\oracle\product\10.2.0\db_1\database>copy con initCCC.ora
db_name=CCC
^Z
1 file(s) copied.
<b> Starting the service </b>
C:\oracle\product\10.2.0\db_1\database>oradim -new -sid CCC -startmode m
Instance created.
C:\oracle\product\10.2.0\db_1\database>set oracle_sid=CCC
C:\oracle\product\10.2.0\db_1\database>sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 6 07:50:06 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
SQL>
SQL> startup nomount
ORACLE instance started.
Total System Global Area <b>113246208</b> bytes -- Default SGA size
Fixed Size 1247588 bytes
Variable Size 58721948 bytes
Database Buffers 50331648 bytes
Redo Buffers 2945024 bytes
<b> On seeing dynamic components size, shared pool got
33m, large pool got 0m, java pool got 25m and buffer cache
got 50m. Please check the references for these default
values. </b>
SQL> select component,current_size from v$sga_dynamic_components;
COMPONENT CURRENT_SIZE
shared pool 33554432
large pool 0
java pool 25165824
streams pool 0
DEFAULT buffer cache 50331648
KEEP buffer cache 0
RECYCLE buffer cache 0
DEFAULT 2K buffer cache 0
DEFAULT 4K buffer cache 0
DEFAULT 8K buffer cache 0
DEFAULT 16K buffer cache 0
COMPONENT CURRENT_SIZE
DEFAULT 32K buffer cache 0
ASM Buffer Cache 0
13 rows selected.
<b>Total=109051904 </b>
SQL>
create database
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
<b>Errors in alert log file</b>
ORA-00604: error occurred at recursive SQL level 1
<b>ORA-04031: unable to allocate 40 bytes of shared memory ("shared pool","create unique index
i_proxy_...","sql area","kksol : kksnsg")
</b>
Error 1519 happened during db open, shutting down database
USER: terminating instance due to error 1519
<b>It was thought that shared_pool memory area is not
sufficient. Then thought to know how oracle will behave on
setting sga_target parameter.</b>
<b>initCCC.ora</b>
db_name=CCC
sga_target=113m
SQL> startup nomount
ORACLE instance started.
Total System Global Area <b>121634816 bytes -- Got around 121m </b>
Fixed Size 1247636 bytes
Variable Size 54527596 bytes
Database Buffers 62914560 bytes
Redo Buffers 2945024 bytes
<b>Now create database statement got success here.
Instance got few extra Mbs of memory and oracle can create
the database.</b>
<b>Then it was thought that, why to give 121Mb even. Let exactly 113246208 bytes be devoted to the instance.</b>
initCCC.ora
db_name=CCC
sga_target=113246208 -- providing exact number of bytes as obtained in default case
SQL> startup nomount
ORACLE instance started.
Total System Global Area 113246208 bytes
Fixed Size 1247588 bytes
Variable Size 54527644 bytes
Database Buffers 54525952 bytes
Redo Buffers 2945024 bytes
SQL>
<b> Now create database statement got success here as
well. Because of sga_target, automatic shared memory
management enabled and instance was taking care of buffer
cache, shared pool, large pool, java pool and
streams_pool. In this case shared pool got 46m (greater
than default case value). Java pool and Large pool got 4
mb each and buffer cache got 54m. </b>
SQL> select component,current_size
2 from v$sga_dynamic_components;
COMPONENT CURRENT_SIZE
shared pool 46137344
large pool 4194304
java pool 4194304
streams pool 0
DEFAULT buffer cache 54525952
KEEP buffer cache 0
RECYCLE buffer cache 0
DEFAULT 2K buffer cache 0
DEFAULT 4K buffer cache 0
DEFAULT 8K buffer cache 0
DEFAULT 16K buffer cache 0
COMPONENT CURRENT_SIZE
DEFAULT 32K buffer cache 0
ASM Buffer Cache 0
13 rows selected.
<b>Total=109051904 </b>
SQL>
By providing 113246208 bytes (as in default case) of
memory to SGA by setting sga_target value, Oracle gave
extra memory to shared_pool and buffer cache than in case
of default, thus helping create database statement to get
pass. Oracle always recommends to use automatic shared
memory management by setting sga_target parameter value.
Hope this experiment provides few clues about automatic
shared memory management feature of Oracle 10g. This case
was conducted on 32-bit Oracle. It is quite possible that
create database statement might get success in 64-bit
Platform as by default Oracle will provide 84 Mb to Shared
pool. But to confirm, it has to be experimented.
References:
Shared pool
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams196.htm#sthref804
Large Pool
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams090.htm#sthref377
Java Pool
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams087.htm#sthref364
Buffer Cache
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams043.htm#sthref185Hi,
Good Work Mohammed !!!
Regards
Taj -
Problem with ORACLE_SID
I am not able startup a database in nomount state for particular ORACLE_SID. It seems it doesn't like the ORACLE_SID I set to.
It's throwing following error
ORA-07345: The datafile name must not contain the string '..'.
Steps I did like follows
1) export ORACLE_SID=ABC
2) I have init.ora, which has DB_NAME=ABC
3) startup nomount pfile='/export/home/oracle/init.ora'
It works great and puts db in nomount state
But, when I change ORACLE_SID=XYZ and edited init.ora with
DB_NAME=XYZ, then did
startup nomount pfile=''/export/home/oracle/init.ora', then it throws following error
ORA-07345: The datafile name must not contain the string '..'.Normally the init.ora file is init<$ORACLE_SID>.ora
i.e. initABC.ora
Are you sure that you are trying to start ABC with the correct initialization file? -
Oracle 10g Espress Edition and change ORACLE_SID
I had installed Oracle Database 10g Express Edition whith linux, fedora core 4.
I want to change the database name and oracle_sid.
Oracle Database XE Server install autimatically a database. The database name and SID is XE.Is there a reason that you want to change the database name, or you could simply change the service names ?
[oracle ~ XE]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 16 10:19:40 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SYS@XE SQL> show parameter db_name
NAME TYPE VALUE
db_name string XE
SYS@XE SQL> alter system set service_names = 'testdb';
System altered.
SYS@XE SQL> conn test/test@localhost/testdb
Connected.
TEST@localhost/testdb SQL> select * from global_name;
GLOBAL_NAME
XE
TEST@localhost/testdb SQL> -
How do we know the ORACLE_SID
hi guys,
By using one query can we get the ORACLE_SID & the username loggedinto the database?
Please help gurus!SCOTT@demo102> select SYS_CONTEXT ('USERENV', 'SESSION_USER') "Use",
2 SYS_CONTEXT ('USERENV', 'DB_NAME') "DBName"
3 from dual;
Use
DBName
SCOTT
DEMO102
SCOTT@demo102> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#SQLRF06117
Nicolas. -
제품 : ORACLE SERVER
작성날짜 : 2002-10-22
(V7.X ~ V9.X) Modifying a database to run under a new ORACLE_SID
================================================================
1. Shutdown instance
2. Backup all control, redo and data files.
3. Go thru the .profile, .cshrc, .login, oratab, tnsnames.ora(for net v2)
, and redefine the environment variable ORACLE_SID to a new value.
ie search thru disks and do a grep ORACLE_SID *
4. cd $ORACLE_HOME/dbs and rename the following files:
o init<sid>.ora (or use pfile to point to the init file.)
o control file(s) This is optional if you don't rename any of
the controlfiles, and the control_files parameter is used.
control_files would be set in the initSID.ora file or in a file
it references with the ifile parameter. Make sure control_files
doesn't point to any old file names, if you renamed them.
o crdb<sid>.sql & crdb2<sid>.sql This is optional. These are
only used at database creation.
5. cd $ORACLE_HOME/rdbms/admin and rename the file:
o startup<sid>.sql This is optional.
(On some platforms, this file may be in $ORACLE_HOME/rdbms/install.)
Make sure the contents of this file do not reference old initSID.ora
files that have been renamed. This file simplifies the process to
"startup exclusive" your database.
6. To rename the database files and redo log files, you would follow
the instructions in the bulletin: 98863.723.
7. Change the ORACLE_SID environment variable to the new value.
8. start up database and verify it works. Once you have done this,
shutdown the database and take a final backup of all control, redo
and data files.
9. When the instance is started, the control file gets updated with
the current ORACLE_SID.
Changing the dbname for a database
1. sqldba
2. connect internal
3. alter database backup controlfile to trace;
This will write in a trace file, the CREATE CONTROLFILE command that
would recreate the controlfile as it currently exists.
4. Exit and go to the directory where your trace files are located.
They are usually in the $ORACLE_HOME/rdbms/log directory.
If user_dump_dest is set in the initSID.ora, then go to the directory
listed in the user_dump_dest variable.
The trace file will have the form "ora_NNNN.trc with NNNN being a
number.
5. Get the CREATE CONTROLFILE command from the trace file and put it in
a new file called something like ccf.sql.
6. Edit the ccf.sql file and modify the CREATE CONTROLFILE command.
Just change the word "REUSE" to "SET",and "NORESETLOGS" to
"RESETLOGS", and modify the dbname.
Old line:
CREATE CONTROLFILE REUSE DATABASE "olddbname" NORESETLOGS ...
New line:
CREATE CONTROLFILE set DATABASE "newdbname" RESETLOGS ...
Then save the ccf.sql file.
7. Rename the old control files for backup purposes and so they are not
in the way of creating the new ones.
8. Edit initSID.ora so that db_name="newdbname".
9. sqldba
10. connect internal
11. startup nomount
12. @ccf
13. alter database open resetlogs;
14. Make sure the database is working. Shutdown and backup the database.
Reference Documents
<Note:15390.1> -
LK DB_NAME FILE에 대하여 (ORA-1102에 대한 원인 설명)
제품 : ORACLE SERVER
작성날짜 : 2000-05-05
LK<DB_NAME> FILE에 대하여 (ORA-1102에 대한 원인 설명)
===================================================
Unix 용 Oracle7.3.3 이전의 version에서는 parallel server mode(OPS)로
운용하지 않더라도 서로 다른 ORACLE_SID를 이용하는 두개의 instance가 하나의
database를 동시에 mount하는 것이 경우에 따라서는 가능할 수도 있었다
(<Bug:272030>). 이 경우, 서로 독립적인 두개의 instance가 동일한 database
file들을 동기화 (synchronisation)없이 access할 수 있기 때문에 database
corruption을 유발시킬 수 있었다.
Unix system에서의 이러한 문제를 회피하기 위하여 7.3.3부터 'mount lock'
file이 이용된다. 이 file은 그 size가 0 byte, 생성되는 위치는
$ORACLE_HOME/dbs 이며 그 이름은 lk<DB_NAME> 이다.
Oracle이 database를 mount할 때 lk<DB_NAME> file과 관련하여 다음과 같은
절차를 수행한다.
1. file name의 'DB_NAME' 부분은 db_name parameter를 이용한다.
예를 들어, db_name=V803 이라면 사용되는 lock file의 위치와 이름은
'$ORACLE_HOME/dbs/lkV803'이 된다.
2. 만약 해당 file이 존재하지 않는다면 생성한다.
존재한다면 file을 open한다.
3. 이 file에 exclusive Unix file lock을 설정한다.
위의 과정 상에서 문제가 발생된다면 해당 instance는 db를 mount할 수 없으며
ORA-1102('cannot mount database in exclusive mode')가 return된다.
Releasae 7.3.3 이전에서는 동일한 $ORACLE_HOME, 동일한 db_name을 이용하는
두 개의 database를 $ORACLE_SID만 다르다면 동시에 open하여 사용할 수 있었다.
그러나 lock file이 사용되는 7.3.3부터는, lock file의 이름에 db_name이
이용되기 때문에 어느 한쪽의 db_name을 변경해야만 동시에 open하여 사용할
수가 있다.(db_name의 변경은 controlfile을 재생성함으로써 가능하다.)
이렇게 database의 db_name이 변경되면 각각의 lk<DB_NAME> file을 생성하여
이용하게 된다.
참고 사항
1. database를 구동하고 있는 instance가 있을 때에는 lk<DB_NAME> file은
삭제하지 않도록 한다.
2. database가 shutdown되더라도 lk<DB_NAME> file은 삭제되지 않고 존재한다.
따라서 이 file의 유무를 가지고 database의 구동 유무를 판단할 수 없다.
3. lk<DB_NAME>의 DB_NAME은 SID와는 다를 수 있다. SID가 아닌 DB_NAME을
이용함에 주의.
4. lock file과 관련하여 다음의 error들이 발생될 수 있다.
ORA-9992 scumnt: failed to open <FILENAME>
ORA-9993 scumnt: failed to lock <FILENAME>
ORA-1102 cannot mount database in exclusive mode
Maybe you are looking for
-
X freezes when launched with second GPU
Hey fellow Archers! I've got a workstation with an AMD FirePro V4900 card that has been running fine with catalyst-test from the AUR for months now. For my current project, I am doing some heavy-duty OpenCL computation, and thus decided to buy the be
-
Lumia 925 - GPS inaccurate after WP8.1 update
I have been using my Lumia 925 to track my jogs for half a year (using Sportstracker and Endomondo apps). Also, I use a separate sports clock with GPS. My phone and the sports clock have been givin really similar results. Couple of weeks back I updat
-
Dev 6.0(Prod) web forms not running
hi i am using oracle8 OAS 4.0.7, Developer 6.0 production with NT 4.0 and service Pack 3 when i try to run the form through jinitinator or JDK provided with the package i get the following error. running with jinitator Oracle JInitiator version 1.1.7
-
TS3297 Error when I use search function in itunes store and select an artist
When I use search function in itunes store and select an artist I get this message. Microsoft visual C++ run time library. Prog C:\progfiles\itunes\itunes.exe R6025 - Pure virtual function call . It then shuts down itunes and cannot provide a solut
-
Dears, I have installed Netweaver 2004s on Windows 2003 server. Now my users are getting error while they are using adobe service of SAP. Error is: com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: ADS Rend