Windows oracle11g Manual Build library ____oracle

Source: Internet
Author: User
Tags dba
Windows oracle11g Manual Build library

In the course of the project, you will inevitably encounter the need to manually build the library. This article mainly describes how to build a library manually in a common Windows environment.
Environment Introduction:
Operating system: Windows7 64 bits
Database version: Oracle 11GR2
The following is an example of a database built with SID as TestDB, which describes each link of manual library construction. First, create the necessary file path

For example, the Oracle root path for this machine is: E:\app\SANMSUNG. When the new library is created, for ease of administration, the related path is also built under the same sibling path.

(1) Create the TestDB folder under the Admin Path

Create a folder under the TestDB folder

Below is a description of how these file paths work.
Adump: Storing audit information
The Bdump:bdump directory stores the tracking information for each background process in the database movement process, in which the alert file is a warning file and its filename is called Alert_ Book.log, when a database problem occurs, you can first view the file to find out why, and the various problems that arise during the manual creation process can often be found by looking at the file.
Cdump: The database is used to store exception information when it encounters an exception.
Create: Unknown
Pfile: holds initialization parameter file.
Scripts: Unknown
Udump: The trace file for the session after SQL Trace is placed.
(2) Create the TestDB folder under the Oradata folder

(3) Create the Tesdb folder under the Flash_recovery_area folder
Second, create initialization parameter file

It should be noted here that the initialization parameter file that needs to be created is pfile. Before describing how to create, simply mention the role of initializing the parameter file. There are two types of initialization parameter files for Oracle: text-type parameter file pfile, binary parameter file SPFile. In fact, the two roles are the same. Are all the parameters that need to be stored in the database startup, such as memory, storage space allocation and so on.
Pfile the creation of a file, you need to start with an existing Pfile file.
At Oracle, a database with a SID ORCL is pre-installed, so you can get an initialization parameter file from the library. In path: E:\app\SANMSUNG\admin\orcl\pfile, an existing initialization parameter file name is: Init.ora.
The steps to create are as follows:
(1) Copy Init.ora to "E:\app\SANMSUNG\product\11.2.0\dbhome_1\database" path, and renamed to "Inittestdb.ora".
(2) Edit "Inittestdb.ora" file.
Open the file using a text editor, as follows. The section that needs to be modified has the following two points:
db_name = testdb– Specify database name
control_files= ("E:\app\SANMSUNG\oradata\TESTDB\control01.ctl", "E:\app\SANMSUNG\flash_recovery_area\TESTDB\ Control02.ctl ")
– Specify the full path to the control file and note that the file is not created. # Copyright (c) 1991, 2001, 2002 by Oracle Corporation # # Shared Server #

Dispatchers= "(protocol=tcp) (service=orclxdb)" # miscellaneous #

compatible=11.2.0.0.0
Diagnostic_dest=e:\app\sanmsung
memory_target=1146093568 # Security and auditing #

Audit_file_dest=e:\app\sanmsung\admin\orcl\adump
Audit_trail=db
Remote_login_passwordfile=exclusive # Database identification #

Db_domain=microsoft.com
Db_name=testdb # File Configuration #

control_files= ("E:\app\SANMSUNG\oradata\TESTDB\control01.ctl", "E:\app\SANMSUNG\flash_recovery_area\TESTDB\ Control02.ctl ")
Db_recovery_file_dest=e:\app\sanmsung\flash_recovery_area
db_recovery_file_dest_size=4039114752 # Cursors and Library Cache #

open_cursors=300 # System Managed Undo and Rollback segments #

UNDO_TABLESPACE=UNDOTBS1 # processes and Sessions #

processes=150 # Cache and I/O #

db_block_size=8192

The above initialization parameter file is created. If some of the parameters are outdated, you can wait for the library to complete before you modify it. Iii. Setting the instance name for Oracle startup

Open cmd command, enter command: Set ORACLE_SID=TESTDB
Iv. Creating database Instances

In the cmd command line, enter the command: Oradim-new-sid testdb

After execution, open the system service to query the TestDB database service you created.
v. Create a password file

Oracle's password file is used to store passwords for all users who connect to the database with SYSDBA or sysoper permissions.
Open the cmd command and enter the command line:
Orapwd File=e:\app\sanmsung\product\11.2.0\dbhome_1\database\pwdtestdb.ora password=oracle entries=2

Note that the entries parameter specifies the number of users with DBA authority on the database, which can be specified by the user. Six, start the database

After completing the previous work, start the instance. Here are two points to note:
(1) Only boot to nomount state.
(2) DBA Authority when connecting to a database
Vii. Execute the construction of the library statement

Execute the following build statement to create the related database file.
CREATE DATABASE TestDB
USER SYS identified by Oracle
USER SYSTEM identified by Oracle
LOGFILE GROUP 1 (' E:\app\SANMSUNG\oradata\TESTDB\redo01.log ') SIZE 100M,
GROUP 2 (' E:\app\SANMSUNG\oradata\TESTDB\redo02.log ') SIZE 100M,
GROUP 3 (' E:\app\SANMSUNG\oradata\TESTDB\redo03.log ') SIZE 100M
Maxinstances 8
Maxloghistory 1
Maxlogfiles 16
Maxlogmembers 3
Maxdatafiles 100
CHARACTER SET Al32utf8
National CHARACTER SET AL16UTF16
DataFile ' E:\app\SANMSUNG\oradata\mydb\SYSTEM01. DBF ' SIZE 325M reuse
EXTENT MANAGEMENT Local
Sysaux datafile ' E:\app\SANMSUNG\oradata\TESTDB\SYSAUX01. DBF ' SIZE 325M reuse
DEFAULT Temporary tablespace TEMP
Tempfile ' E:\app\SANMSUNG\oradata\TESTDB\TEMP01. DBF ' SIZE 20480K reuse autoextend on NEXT 640K MAXSIZE Unlimited
UNDO tablespace UNDOTBS1
DataFile ' E:\app\SANMSUNG\oradata\TESTDB\undotbs01.dbf ' SIZE 200M reuse autoextend on MAXSIZE Unlimited;
The above statement can be copied to the CMD command line execution, or it can be replicated to a text file with @ execution.
VIII. Implementation of catalog steps this creates a data dictionary

Execute under the cmd command line: @e:\app\sanmsung\product\11.2.0\dbhome_1\rdbms\admin\catalog.sql IX, execute CATPROC Create Package package

Execute under the cmd command line: @e:\app\sanmsung\product\11.2.0\dbhome_1\rdbms\admin\catproc.sql 10, execute pupbld

Switch the user to system before performing the pupbld.
11, created by Pfile SPFile

The creation of SPFile requires DBA authority.
12. Execute Scott script to create Scott mode

This link can be omitted, of course, if you need to practice the environment this link is best not to omit.
In the cmd command line, enter: @e:\app\sanmsung\product\11.2.0\dbhome_1\rdbms\admin\scott.sql 13, open the database to a normal state

Restart the database and verify that the library was successfully built.
Conclusion

This completes the Oracle manual build database under Windows, but the knowledge of Oracle is still in the getting started. Now only these four words to sum up: to be continued.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.