Thursday, March 29, 2012

Database Link Ras.Oracle.Com Connects To Ras.Regress.Oracle.Com


Alter Database Rename Global_Name To Ras.Oracle.Com;

Alter System Set Global_Name=False;

On Both target and source Databases

ORA- MEMORY_TARGET Is Not Supported On This System



we get this error in linux platform when the size of a temp file system is smaller than  Memory_Target parameter size

# umount tmpfs

 # mount -t tmpfs shmfs -o size=1300m /dev/shm

 # df -k /dev/shm

          filesystem           1k-blocks      used   available   use%    mounted on

          shmfs                  1331200         0      1331200     0%        /dev/shm

To Debug A Shell Script

    we can use        -v  OR -x

-v

      The -v option is used to print shell commands as they are read along with the outcome of the              
       script. So if after some command if see desired output is not coming you can
       note down that commands.

    example for  sh -v sample.sh

                    echo "Warning! You are installing the Fall Creek portal software"

                    echo -n "Enter the product installation directory: "

                    read InstallDir

   OUT PUT :

                    echo "Warning! You are installing the Fall Creek portal software"

                   Warning! You are installing the Fall Creek portal software

                   echo -n "Enter the product installation directory: "

                   Enter the product installation directory: read InstallDir

-x

           The -x option is used for expanding each command. It displays the command, system variable and  

           then its expanded arguments.

  EXAMPLE FOR sh -vx sample.sh

                     echo "Warning! You are installing the Fall Creek portal software"

                    + echo 'Warning! You are installing the Fall Creek portal software'

                  Warning! You are installing the Fall Creek portal software

                  echo -n "Enter the product installation directory: "

                  + echo -n 'Enter the product installation directory: '

                 Enter the product installation directory: read InstallDir

                 + read InstallDir

ORA-01031: insufficient privileges whiling logon through / as sysdba


Here we have 2 solutions

a)       In sqlnet file in network folder  we should have

When it is set to NTS, which should only be set on Windoze, it allows users to be authenticated using Windows NT native security. What this means is that by setting SQLNET.AUTHENTICATION_SERVICES to NTS
and a creating a role called ORA_DBA with your user in that group you should be able to log in to oracle without supplying a password. (connect / as sysdba)

b)        Or check weather is there  password file or not .  by giving sysdaba privilege to
           Sys . if u get any error 

create pwd file using orapwd utility  with not giving the “nosysdba=y”  parameter

Undo Tbs Increases and Doesn't Shrink or Gone to Recover State

drop Tablespace UNDOTBS;

drop Tablespace UNDOTBS

*
ERROR at line 1:

ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping tablespace

       1)Create pfile if you started with database with spfile.

SQL>Create PFILE from SPFILE;

        2)Edit pfile and set undo management to manual.

undo_management = manual

       3)Put the entries of the undo segments in the pfile by using the following statement in the pfile:

_offline_rollback_segments=(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,.....)

       4)Mount the database using new pfile.

Startup mount pfile='fullpath to pfile'

      5)Drop the datafiles,

sql>Alter Database datafile '&filename' offline drop;

     6)Open the database.

sql>Alter Database Open;

       7)Drop the undo segments,

sql>Drop Rollback Segment "_SYSSMU1$";

......

       8)Drop Old undo tablespace.

sql>Drop Tablespace old_tablespace_name Including Contents;

       9)Add the new undo tablespace.

      10) Shutdown Immediate;

      11) Change the pfile parameters back to Undo_management = AUTO and modify the parameter Undo_tablespace=new_undo_tablespace_name and remove the _offline_rollback_segments parameter.

      12) Startup the Database.

User is already authenticated

kill all os  processs related to that instance

Spfile currupted in RAC environment


Restore spfile from backup in global location .Try to start db using srvctl . If it started well and good or it gives any error like  parameters are mismatched in both instance  do the following .
keep spfile location to global location .Start  one node manually using startup command and  create pfile from started instance and  copy it to 2nd node .  make all parameters of two node are same .  start other node using this pfile . create spfile  with 2nd node and copy this spfile to global location then start both nodes using srvctl .

How to exclude lob segments from export

INCLUDE=object_type[:name_clause] [, ...]

                     EXCLUDE=object_type[:name_clause] [, ...]

The following code shows how they can be used as command line parameters.

expdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

expdp scott/tiger@db10g schemas=SCOTT exclude=TABLE:"= 'BONUS'" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

ORA-12528: TNS:listener: all appropriate instances are blocking new connections

i got this error while create standby databse when i  was trying to connect  remote database through rman
from source database

in tnsnames.ora

DBASE_CONN=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =saturn)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME =dupbase)(UR=A)
)
)

OR

Check Listener .Ora File In Standby Db   . Add Sid List Properly With Correct Service Name