"Oracle XE Series III" Manually create an Oracle XE database using OMF

Source: Internet
Author: User
Tags sqlplus

Environment: Win10_x64_pro

1. Create a DB instance with an instance named PF

C:\oraclexe\app\oracle\product\11.2.0\server\bin>oradim-new-sid PF

The instance has been created.

error: dim-00014: Could not open Windows NT Service Control Manager. os-error: (OS 5) denied access.

Workaround: Run as an administrative identity.

2. For SYS users can connect to the database to perform operations, first create the database password file, the password file name must be the PWDSid. Ora

C:\oraclexe\app\oracle\product\11.2.0\server\bin>orapwd password=oracle file=c:\oraclexe\app\oracle\product\ 11.2.0\server\database\pwd PF. ora

3. Create the following directories to hold data files and dump information

#数据文件目录

C:\oraclexe\app\oracle\oradata\PF

#background Dump Directory

C:\oraclexe\app\oracle\oradata\PF\bdump

#core Dump Directory

C:\oraclexe\app\oracle\oradata\PF\cdump

#user Dump Directory

C:\oraclexe\app\oracle\oradata\PF\udump

4. Modify Listener.ora for the following information, register this database in the listener (optional) under C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home = C:\oraclexe\app\oracle\product\11.2.0\server)
(program = Extproc)
)
(Sid_desc =
(Sid_name = Clrextproc)
(Oracle_home = C:\oraclexe\app\oracle\product\11.2.0\server)
(program = Extproc)
)
)

LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP) (HOST = Wanglifu) (PORT = 1521))
)
)

Default_service_listener = (PF)

Add based on file

5. In order to access the database, modify the Tnsnames.ora to the following information

Under the C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN

PF =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = PF)
)
)

Extproc_connection_data =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))
)
(Connect_data =
(SID = Plsextproc)
(PRESENTATION = RO)
)
)

Oraclr_connection_data =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))
)
(Connect_data =
(SID = Clrextproc)
(PRESENTATION = RO)
)
)

6. Create a pfile file C:\oraclexe\app\oracle\product\11.2.0\server\database\initPF. Ora, the contents of the file are as follows: (note file name)

Background_dump_dest= ' C:\oraclexe\app\oracle\oradata\PF\bdump '

Compatible= ' 11.2.0.1.0 '

Control_files= ' C:\oraclexe\app\oracle\oradata\PF\control01.ctl ', C:\oraclexe\app\oracle\oradata\PF\ Control02.ctl '

Core_dump_dest= ' C:\oraclexe\app\oracle\oradata\pf/cdump '

db_block_size=8192

Db_name= ' PF '

Db_recovery_file_dest= ' C:\oraclexe\app\oracle\fast_recovery_area '

db_recovery_file_dest_size=2147483648

pga_aggregate_target=41943040

processes=150

Remote_login_passwordfile= ' EXCLUSIVE '

sga_max_size=167772160

sga_target=125829120

Undo_management= ' AUTO '

Undo_tablespace= ' UNDOTBS1 '

User_dump_dest= ' C:\oraclexe\app\oracle\oradata\pf/udump '

Db_create_file_dest= ' C:\oraclexe\app\oracle\oradata\PF '

db_create_online_log_dest_1= ' C:\oraclexe\app\oracle\oradata\PF '

7. Connect to the database and create the SPFile file

C:\oraclexe\app\oracle\product\11.2.0\server\bin>set ORACLE_SID=PF

C:\oraclexe\app\oracle\product\11.2.0\server\bin>sqlplus.exe/as SYSDBA

Sql*plus:release 11.2.0.2.0 Production on Friday December 18 11:17:05 2015

Copyright (c) 1982, Oracle. All rights reserved.

Connected to the idle routine.

Sql>create SPFile from Pfile;

The file was created.

8. Start the database to Nomount

Sql>startup Nomount

Ora-32004:obsolete or deprecated parameter (s) specified for RDBMS instance
Ora-12853:insufficient memory for PX buffers:current 0K, Max needed 0K
ora-04031:unable to allocate 65560 bytes of shared memory ("Large pool", "Unknown Object", "Large Pool", "PX msg Pool")

Sql>

9. Create and execute the Creata database file C:\oraclexe\app\oracle\admin\PF\Create\createdb.sql script, as follows:

Create DATABASE PF

User SYS identified by Oracle

User system identified by Oracle

Default Temporary Tablespace Temp

Undo Tablespace Undotbs1

Character Set UTF8

national character set al16utf16;

Sql>@c:\oraclexe\app\oracle\admin\pf\create\createdb.sql

10. Execute Catalog.sql, create a data dictionary view of the database

Sql>spool C:\oraclexe\catalog.log

Sql>@c:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\catalog.sql

Sql>spool off

11. Execute catproc.sql to create all the packages required to execute the PL/SQL program

Sql>spool C:\oraclexe\catproc.log

Sql>@c:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\catproc.sql

Sql>spool off

This database pf has been created and can be used normally.

Places to be aware of:
(1) in 11g, if system01.dbf this file with extent management Local, you must create a temporary table space.
(2) 11g must create sysaux01.dbf this file
(3) If the above steps are wrong, and the error message is garbled, you can exit Sqlplus, set the environment variable set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK (Windows), and then log on to the database.

Summary: The creation process appeared a lot of problems and errors, after an error to view the alarm log alert_pf, in this case the path is C:\oraclexe\app\oracle\oradata\PF\bdump, according to the error number can Google, can solve a lot of problems, Some of the specific problems I will record in the log.

"Oracle XE Series III" Manually create an Oracle XE database using OMF

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.