Click here to Skip to main content
15,867,141 members
Articles / Operating Systems / Windows 7

Oracle 12c Installation on Windows 7 (Step by Step Solution)

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
5 Sep 2015CPOL5 min read 78.4K   6   4
How to Install Oracle 12c, How to create listener, How to create TablesSpaces and How to restore database

Introduction

For last a few years, I was working with MS SQL Server and

Recently I got a project which was using the oracle database, I faced a lot of difficulty to install and restore oracle database to a single test server

After searching for a simple solution I did not find it. So I thought to write a very simple step by step solution of beginners

Here are the steps for installation and logical restoration of latest backup,

Steps

I am using Windows 7 - 64Bit operating system.

You can download oracle 12c version from the following link

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-win64-download-2297732.html

 

Main Steps

  1. Decrypt both download files to a single folderImage 1

 

  1. Double Click on Setup

Image 2

  1. Loads Oracle Universal Installer

Image 3

 

  1. Then, load First Window of Oracle Installation, Enter your email if needed, else leave it as blank and Remove Tick from check box of “I wish to receive security….” and click “Next” button.

 

Image 4

 

  1. The ollowing warning message will display and click on “Yes” button.

 

Image 5

 

  1. Select the second option “Install database software only” from Installation option of loaded window. And click “Next” button.

Image 6

 

7. Select the first option “Single Instance database Installation” if you are using single standalone machine. Then click “Next” button.


Image 7

 

  1. Select the product languages you needed, by default English will be selected. Click “Next” button

Image 8

 

  1. By default Enterprise edition will be selected, just click “Next” button

Image 9

 

  1. You can create a user for oracle or just select “Use Windows Built –in Account” option and click “Next” button.

 

Image 10
 

  1. Click “Yes” and continue if you get the following message Box.

 

Image 11

 

  1. Click “Next” If the default location has enough space for installation else change the path.

Image 12

 

  1. Starts checking the prerequisites

Image 13

 

  1. Loads the summary for installation details, Click “Install” button to start installation of the product.

Image 14

 

  1. Installation starts and shows the progress of installation.

Image 15

 

 

  1. Once installation finishes successfully click “Close” button.

Image 16

 

That’s it you are installed Oracle 12c in your windows operating system.

 

Creating a database

Now we will create global database in the installed server.

For that, do the following steps

  1. Go to Start -> All Programs -> Oracle-OraDB12Home -> Configuration and Migration Tools ->

Database Configuration Assistant (right click on it and Run as Administrator)

Image 17

 

  1. Select “Create Database” option and click “Next” button.

Image 18

 

  1. Enter database name, password and select database character Set. And then click “Next” button.

Image 19

 

  1. Loads Database Configuration Summary, click on “Finish” button

Image 20

 

  1. Starts creating database file and loads the following window.

Image 21

 

  1. Click “finish” button once database is created.

Image 22

Yes..!! Now the database is created

Oracle Listener

Oracle Net Listener configuration, stored in the listener.ora file, consists of the following elements:

  1. Name of the listener
  2. Protocol addresses that the listener is accepting connection requests on
  3. Database services
  4. Control parameters

Now let us create listener.. Do the following steps for it.

1.  Go to Start -> All Programs -> Oracle-OraDB12Home -> Configuration and Migration Tools -> Net Configuration Assistant.

 

Image 23

 

2. Select first option “Listener configuration” and click “Next” button.

Image 24

 

3. Select first option “Add” then click “Next” button.

Image 25

 

  1. By default Listener name will be “LISTENER” will be there, just click on “Next” button

Image 26

 

  1. Select needed protocols and click “Next”  button

Image 27

  1. Use the standard port no 1521 or enter your custom port no. then click “Next” button.

Image 28

 

  1. If it alerts by asking of configuration another listener select  “No” and click “Next” button

Image 29

 

  1. Loads Listener configuration complete message , click “Next”  button

Image 30

 

  1. Click “Finish” button

Image 31

 

You did it…!!

Restoring a database

Now if you want to restore your logical database you have to create Tablespaces same as like in your source database

Check available table space in your source database using following query

SQL
SELECT * FROM DBA_DATA_FILES

Log in to your created database from SQL plus here is the steps

  1. Go to Start -> All Programs -> Oracle-OraDB12Home -> Application Development -> SQL Plus

 

Image 32

  1. Login using SYS and password provided while creating database.

Enter user-name: SYS AS SYSDBA

Password: (Administrative password entered while installing)

Then press Enter…

Image 33

  1. Run script ("SELECT * FROM DBA_DATA_FILES") to knowthe  available TABLESPACES in new database.
     
  2. Then create remaining TABLESPACES same as like in source server using following queries
SQL
CREATE  TABLESPACE 'tablespace name'  DATAFILE  'path - check the path of listed tablespaces'  SIZE  ? G

Image 34

 

  1. If source contains two TABLESPACE files for one TABLESPACE alter the TABLESPACE using following script
SQL
ALTER TABLESPACE 'TABLEspace name' ADD DATAFILE 'path' SIZE ?G;

Once you creates all tablespaces same as like in source server then create user in new server.

Create User using following query

SQL
CREATE USER USERNAME IDENTIFIED BY PASSWORD 

GRANT DBA TO USERNAME

If you get ORA-65096 Error

RUN THE FOLLOWING Script

SQL
ALTER SESSION SET "_ORACLE_SCRIPT"=true;

Session will get altered then again run script for creating user and grand user as dba

Importing

Now… You can import / restore your logical database to new database

Do the following steps

  1. go to start-> cmd as administrator
  2.  write "imp" press enter
  3.  enter created user name and password
  4. Then follow the lines.
  • Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.6.0 - Production

  • Import file: expdat.dmp > /mention/path/of/dumpFile/includingFileName.dmp without single quote
  • Enter insert buffer size (minimum is 8192) 30720> (press enter to accept default)
  • Export file created by EXPORT:V09.02.00 via conventional path

import done in US7ASCII character set and AL16UTF16 NCHAR character set

import server uses AL32UTF8 character set (possible charset conversion)

  • List contents of import file only (yes/no): no > press enter
  • Ignore create error due to object existence (yes/no): no > press enter
  • Import grants (yes/no): yes > press enter
  • Import table data (yes/no): yes > press enter
  • Import entire export file (yes/no): no > press enter or type no
  • Username: give the userName for which you want the data to be imported
  • Enter table(T) or partition(T:P) names. Null list means all tables for user
  • Enter table(T) or partition(T:P) name or . if done: press enter
  • . importing TST_001_V2's objects into TST_001_V2

 

Once it is completed, you can connect to you database and use ….

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionOracle installation Pin
EcareTechnologies5-Mar-17 23:19
EcareTechnologies5-Mar-17 23:19 
NewsLicensing Pin
Wendelius1-Dec-15 19:59
mentorWendelius1-Dec-15 19:59 
QuestionInstallation of Oracle 12c in windows 7 Pin
Member 119651027-Sep-15 0:55
Member 119651027-Sep-15 0:55 
GeneralRe: Installation of Oracle 12c in windows 7 Pin
Sean McPoland7-Sep-15 16:03
Sean McPoland7-Sep-15 16:03 
Very good write up. You beat me to it. The original was lacking in all this detail so this really helps. Thanks,

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.