SQL> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET';
2009/03/09
How to Check Character Set in Oracle
2009/03/06
Kill Session in RAC Database
You may get ORA-01940 even after you make sure that no user is connected by checking v$session.
If you are operating on RAC database, you probably should check gv$session and kill session on different instance. What Oracle will do is check sessions on the current instance you are connecting. So you will find nothing active there.
After you find the user connecting on another insntance through gv$session, you can kill that session by connecting to that instance if you are in versions before 11.
For Oracle 11, you can kill session in any instance by using this command:
If you are operating on RAC database, you probably should check gv$session and kill session on different instance. What Oracle will do is check sessions on the current instance you are connecting. So you will find nothing active there.
After you find the user connecting on another insntance through gv$session, you can kill that session by connecting to that instance if you are in versions before 11.
For Oracle 11, you can kill session in any instance by using this command:
SQL> ALTER SYSTEM KILL SESSION 'sid, serial#, @instance_id';
2009/03/05
Recover Database Using Backup Controlfile Until Cancel
Referenced from here:
http://searchoracle.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid41_gci1248488,00.html
If you were to recover the database with a current control file, Oralce will know the last SCN of the last checkpoint. So Oracle can use the information in the archived and online redo logs to apply recovery up to that SCN. This is called a "complete" recovery.
If you do not have the current control file, your option is to use a backup controlfile. Which means Oracle does not know the SCN to stop applying recovery. So you tell Oracle that you are using a "backup controlfile" and that you will tell it when to stop applying redo by replying "cancel." When Oracle starts recovery, it looks at the datafiles to know the last time a checkpoint was performed on the datafile. Oracle now knows to start applying recovery to the datafile for all SCNs after the SCN in the datafile header. Oracle rolls forward transactions. But Oracle does not know when to stop, and eventually, Oracle applies recovery in all of your archived redo logs. You can then tell Oracle to use the redo in the online redo logs. Oracle will ask you where to find more redo. At this point, you tell it to quit applying redo by replying CANCEL.
Hopefully, you never have to use this command. This is because you multiplex your control files and have three copies of the control file, all on different disk units. So if you lose a disk unit, you use the control files on the other disk units. The only time you need this command is when you lose all of your control files. In this case, either use a binary backup of the control file or you re-create the control file with the CREATE CONTROLFILE command and then recover with the backup control file.
http://searchoracle.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid41_gci1248488,00.html
If you were to recover the database with a current control file, Oralce will know the last SCN of the last checkpoint. So Oracle can use the information in the archived and online redo logs to apply recovery up to that SCN. This is called a "complete" recovery.
If you do not have the current control file, your option is to use a backup controlfile. Which means Oracle does not know the SCN to stop applying recovery. So you tell Oracle that you are using a "backup controlfile" and that you will tell it when to stop applying redo by replying "cancel." When Oracle starts recovery, it looks at the datafiles to know the last time a checkpoint was performed on the datafile. Oracle now knows to start applying recovery to the datafile for all SCNs after the SCN in the datafile header. Oracle rolls forward transactions. But Oracle does not know when to stop, and eventually, Oracle applies recovery in all of your archived redo logs. You can then tell Oracle to use the redo in the online redo logs. Oracle will ask you where to find more redo. At this point, you tell it to quit applying redo by replying CANCEL.
Hopefully, you never have to use this command. This is because you multiplex your control files and have three copies of the control file, all on different disk units. So if you lose a disk unit, you use the control files on the other disk units. The only time you need this command is when you lose all of your control files. In this case, either use a binary backup of the control file or you re-create the control file with the CREATE CONTROLFILE command and then recover with the backup control file.
Oracle Text
Introduction to Oracle Text can be found at Oracle documentation website named 'Text Reference' for different versions.
Oracle Text installation should be completed during the Oracle Installtion using OUI.
Using the following procedure to confirm Oracle Text installation:
Login to an account with DBA privileges and confirm that the CTXSYS user exists.
SELECT username FROM dba_users WHERE username='CTXSYS';
If there is no CTXSYS user, then it is not installed. It is best to use OUI to install it.
Doc 275689.1 in metalink is also a good reference for manual installation of Oracle Text 9.2.
Installing Oracle Text for 10gR2:
@$ORACLE_HOME/ctx/admin/catctx.sql ctxsys DRSYS TEMP NOLOCK
where ctxsys is the install schema, DRSYS is the default tablespace, Temp is well - temp tablespace for that user, and NOLOCK instructs the script to not lock the account when the install is complete (which by the way, you should lock).
If DRG-10700 comes up, check doc 107626.1 in metalink.
A good post for Oracle Text Indexing is here:
http://www.oracle-base.com/articles/9i/FullTextIndexingUsingOracleText9i.php
Oracle Text installation should be completed during the Oracle Installtion using OUI.
Using the following procedure to confirm Oracle Text installation:
Login to an account with DBA privileges and confirm that the CTXSYS user exists.
SELECT username FROM dba_users WHERE username='CTXSYS';
If there is no CTXSYS user, then it is not installed. It is best to use OUI to install it.
Doc 275689.1 in metalink is also a good reference for manual installation of Oracle Text 9.2.
Installing Oracle Text for 10gR2:
@$ORACLE_HOME/ctx/admin/catctx.sql ctxsys DRSYS TEMP NOLOCK
where ctxsys is the install schema, DRSYS is the default tablespace, Temp is well - temp tablespace for that user, and NOLOCK instructs the script to not lock the account when the install is complete (which by the way, you should lock).
If DRG-10700 comes up, check doc 107626.1 in metalink.
A good post for Oracle Text Indexing is here:
http://www.oracle-base.com/articles/9i/FullTextIndexingUsingOracleText9i.php
2009/03/04
Check Which Port is Listening or Open on Linux
1. cat /etc/services | grep port#
2. netstat -nan | grep port#
3. lsof -i -n -P | grep port#
4. nmap -sS -O ip
5. telnet ip port#
2. netstat -nan | grep port#
3. lsof -i -n -P | grep port#
4. nmap -sS -O ip
5. telnet ip port#
2009/03/02
Designated PFILE in Registry on Windows
On windows platform, sometimes there is an entry inside registry to specify which pfile to start oracle. The entry is located at HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\ORA__PFILE. If a pfile is specified, oracle will use this file to start the instance.
If you want to start oracle instance using spfile, there are workarounds for this problem.
1.You can remove the pfile entry ORA__PFILE from the registry.
2.In your init.ora you can add an entry spfile=.
If you want to start oracle instance using spfile, there are workarounds for this problem.
1.You can remove the pfile entry ORA_
2.In your init.ora you can add an entry spfile=
Automating Database Startup and Shutdown on Linux
http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php
Subscribe to:
Posts (Atom)