Monday, June 14, 2010

CLONING ORACLE DATA BASE

STEPS FOR CLONING 
THROUGH COLD BACKUP

 


My old database name is "HRDEMO91"
My clone database name is "FSCLON"
  While using this steps fellow your database name instead or mine
1. Get the file path information using below query
                 select name from v$datafile;
                 select member from v$logfile;
                select name from v$controlfile;
2. Parameter file backup
               If HRDEMO91 database running on spfile then create pfile
                "Create pfile=E:\oracle\product\10.2.0\db_1\database\SPFILEHRDEMO91.ora  from spfile;"
              Now copy this pfile in another location .
3. Taken the control file backup
               "Alter database backup controlfile to trace ;"
4. Shutdown immediate
5. Create a folder with new db name (eg. db name is 'fsdemo')path to create the folder is
              "E:\oracle\product\10.2.0\oradata\"
                1} copy all tablespace and redo logs in this folder (except control file )
6. Now create folder with db name in another location .
                1} The location is "E:\oracle\product\10.2.0\admin\"
                2} In folder fsdemo create adump, bdump,cdump,udump,dpdump ,pfile .
           So you got this folder in "E:\oracle\product\10.2.0\admin\fsdemo\"
7. Now edit that pfile which we copy in another location edit db name file and save it with
           new name like "initfsdemo.ora"
                    1} copy this file and past it in "E:\oracle\product\10.2.0\db_1\database\"
                       2}past another copy in "E:\oracle\product\10.2.0\admin\fsdemo\pfile\"
8. Run this command from your c:\ prompt
             " E:\oracle\product\10.2.0\db_1\bin\oradim -new -sid FSDEMO -SRVC OracleServiceFSDEMO
              -STARTMODE auto -SRVCSTART system -PFILE
                 e:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\INITFSDEMO.ORA"
             This will create a new instance .

9. Now from "c:\ set oracle_sid=fsdemo"
10. Startup the Database in NOMOUNT stage .
11. Create the control file for cloning database .
             In udump of your old db i.e.HEREMO91 u got acurrent trace control file open it delete
             everything Excep control file ,logfile & datafile.
             Make sure you use SET instead REUSE and use your cloned database
             name on place of old DB and use "RESETLOGS" instead of "NORESETLOGS". Change all path of your dbf and log files according to your cloned
             DB and save it in sql file like c.sql and run it from sql promt
             "SQL> @E:\clone\c.sql"
     User this script for creating control file.
12. Now open database with
            "alter database open resetlogs;"
13.Create a TNS name i.e. Listner for the cloned database name
open     "E:\oracle\product\10.2.0\db_1\network\ADMIN\tnsname.ora"
FSDEMO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.129.3)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = FSDEMO)
)
)
Copy this script in in your tnsname.ora and save it .

congratulation  your cloning is done 


hoping this information will help you . if any query then please reply me .

Thursday, June 3, 2010

steps for Installation oracle 10 g




Installation of oracle 10g on windows
Oracle 10g PC Minimum Hardware Requirements:
 

Physical memory (RAM) 512 MB recommended
Virtual memory Double the amount of RAM
Temp disk space Hard disk space 1.5 GB
Video adapter
256 colors
CPU Processor 200 MHz minimum
For installation you need CD orcale10g or dumps of oracle10g and if u dont hav oracle you can download it from below link :
 if u have already oracle in your system and you need to uninstall it then check out this steps :
 How to uninstall Oracle database software :

1.       Uninstall all Oracle components using the Oracle Universal Installer (OUI).
2.       Run regedit.exe and delete the HKEY_LOCAL_MACHINE/ SOFTWARE/ORACLE key. This contains registry entire for all Oracle products.
3.       Delete any references to Oracle services left behind in the following part of the registry: HKEY LOCAL MACHINE/ SYSTEM/ CurrentControlsSet/ Services/Ora*. It should be pretty obvious which ones relate to Oracle
4.       Reboot your machine.
5.       Delete the C: \Oracle directory, or whatever directory is your Oracle_Base.
6.       Delete the C:\Program Files \Oracle directory.
7.       Empty the contents of your c:\temp directory.
8.       Empty your recycle bin.
Installing Oracle 10g database software:
 
1.      Insert Oracle CD , the autorun window opens automatically. If you are installing from network or hard disk, click setup.exe in the installation folder. 
2.   The Oracle Universal Installer (OUI) will run and display the Select Installation Method Window 


 3. Choose Basic Installation:
Select this option to quickly install Oracle Database 10g. This method requires minimal user input. It installs the software and optionally creates a general-purpose database based on the information you provide.
For basic installation, you specify the following:Oracle Home Location — Enter the directory in which to install the Oracle Database 10g software. You must specify a new Oracle home directory for each new installation of Oracle Database 10g. Use the default value, which is :
c:\oracle\product\10.2.0\db_1

Installation Type — Select Enterprise Edition :
If you have limited space, select standard edition. Personal edition installs the same software as the Enterprise Edition, but supports only a single-user development and deployment environment.Create Starter Database — Check this box to create a database during installation. Oracle recommends that you create a starter database for first Create Starter Database — time installations. Choose a Global Database Name, like cs157b, or just use the default value.
Type a password. Don’t lose this password, since you will need it to connect to the database server.
Click next


4. The Product-Specific Prerequisite Checks window appears: Click next  




 5. A summary screen appears showing information such as your global settings, space requirements and the new products to be installed. Click Install to start the installation.



 
6. The Install window appears showing installation progress
  

  
7. At the end of the installation phase, the Configuration Assistants window appears. This window lists the configuration assistants that are started automatically.  If you are creating a database, then the Database Configuration Assistant starts automatically in a separate window.               

                                            



At the end of database creation, you are prompted to unlock user accounts to make the accounts accessible. The SYS and SYSTEM accounts are already unlocked. Click OK to bypass password management.
   





Note: Oracle 10g still keeps scott / tiger username and password (UID=scott, PWD=tiger) from the old version of oracle. In the old version of oracle, scott/tiger user ID is available by default, but not in oracle 10g. If you want to use scott /tiger account, you must unlock it by clicking “Password Management” at the last window.
Password Management window will appear like the one shown below. Find the user name “Scott” and uncheck the “Lock Account?” column for the user name.
     




8. Your installation and database creation is now complete. The End of Installation window displays several important URLs, one of which is for Enterprise Manager.
 
  9. You can navigate to this URL in your browser and log in as the SYS user with the associated password, and connect as SYSDBA. You use Enterprise Manager to perform common database administration tasks .

i hope this will help you to install oracle in your machine if any quire is in your mind regarding this installation please write to me