Manual database creation by Oracle Xe 10g in Windows (2)

Source: Internet
Author: User
Oracle Xe 10 Gb manual database creation for Windows XP

Previous/

Next Article 00:56:30/personal classification: Oracle Database notes

View (376 )/
Comment (2 )/
Rating (
1/0)

WindowsUse the OMF method to manually createDatabase

 

1. Create a database instance named ora10g(Required only for Windows platforms, not for UNIX platforms)

D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ bin> oradim-New-Sid ora10g

The instance has been created.

 

2. To allow sys users to connect to the database for operations, create a password file for the database. The name of the password file must bePwdsid. ora

D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ bin> orapwd Password = Oracle file = D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ database \ pwdora10g. ora

 

OPW-00001: Unable to open Password File

** Create related directories **

D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ bin> orapwd Password = Oracle file = D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ database \ pwdora10g. ora

 

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

# Data file directory

D: \ oraclexe \ oradata \ ora10g

# Background dump directory

D: \ oraclexe \ app \ oracle \ admin \ ora10g \ bdump

# Core dump directory

D: \ oraclexe \ app \ oracle \ admin \ ora10g \ cdump

# User dump directory

D: \ oraclexe \ app \ oracle \ admin \ ora10g \ udump

4. Modify listener. ora to the following information and register the database in the listener (optional) at D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ Network \ admin.

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME = D: \ oracle \ app \ oracle \ product \ 10.2.0 \ Server)
(Program = EXTPROC)
)
(Sid_desc =
(Sid_name = clrextproc)
(ORACLE_HOME = D: \ oracle \ app \ oracle \ product \ 10.2.0 \ Server)
(Program = EXTPROC)
)
)
Listener =
(Description_list =
(Description =
(Address = (Protocol = IPC) (Key = extproc_for_ora10g ))
(Address = (Protocol = TCP) (host = ssjwork) (Port = 1521 ))
)
)

Default_service_listener = (ora10g)

Add according to file

5. to access the database, modify tnsnames. ora to the following information:

Under D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ Network \ admin

Ora10g =
(Description =
(Address = (Protocol = TCP) (host = ssjwork) (Port = 1521 ))
(CONNECT_DATA =
(Server= Dedicated)
(SERVICE_NAME = ora10g)
)
)

Extproc_connection_data =
(Description =
(Address_list =
(Address = (Protocol = IPC) (Key = extproc_for_ora10g ))
)
(CONNECT_DATA =
(SID = plsextproc)
(Presentation = Ro)
)
)

Export lr_connection_data =
(Description =
(Address_list =
(Address = (Protocol = IPC) (Key = extproc_for_ora10g ))
)
(CONNECT_DATA =
(SID = clrextproc)
(Presentation = Ro)
)
)

 

6. Create the pfile D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ database \ init.Ora10g. Ora, the file content is as follows: (Note the file name)

 

Background_dump_dest = 'd: \ oraclexe \ app \ oracle/admin/ora10g/bdump'

Compatible = '10. 2.0.1.0'

Control_files = 'd: \ oraclexe \ oradata \ ora10g \ control01.ctl ', 'd: \ oraclexe \ oradata \ ora10g \ control02.ctl'

Core_dump_dest = 'd: \ oraclexe \ app \ oracle/admin/ora10g/cdump'

DB _ block_size = 8192

Db_name = 'ora10g'

Db_recovery_file_dest = 'd: \ oraclexe \ app \ oracle/flash_recovery_area'

Db_recovery_file_dest_size = 2147483648

Pga_aggregate_target = 41943040

Processes = 150

Remote_login_passwordfile = 'clusive'

S ga_max_size = 167772160

Sga_target = 125829120

Undo_management = 'auto'

Undo_tablespace = 'undotbs1'

User_dump_dest = 'd: \ oraclexe \ app \ oracle/admin/ora10g/udump'

Db_create_file_dest = 'd: \ oraclexe \ oradata \'

Db_create_online_log_dest_1 = 'd: \ oraclexe \ oradata \'

7. Connect to the database and create a spfile file.

D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ bin> set oracle_sid = ora10g

 

D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ bin> sqlplus.exe/As sysdba

 

SQL * Plus: release10.2.0.1.0-production on Thursday March 24 13:59:53 2011

 

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

 

Already connected to the idle routine.

 

SQL> Create spfile from pfile;

 

The file has been created.

 

8. Start the database to nomount

SQL> startup nomount

The Oracle routine has been started.

 

Total system global area 167772160 bytes

Fixed size 1286364 bytes

Variable Size 104861476 bytes

Database buffers 58720256 bytes

Redo buffers 2904064 bytes

SQL>

 

9. Execute the creata database script

# The specific content of createdb. SQL script is as follows:

Create Database ora10g

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> @ D: \ oraclexe \ app \ oracle \ admin \ ora10g \ create \ createdb. SQL

10. Run catalog. SQL to create the data dictionary view of the database.

SQL> spool D: \ oraclexe \ catalog. Log

SQL> @ D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ RDBMS \ admin \ catalog. SQL

SQL> spool off

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

SQL> spool D: \ oraclexe \ catproc. Log

SQL> @ D: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ Server \ RDBMS \ admin \ catproc. SQL

SQL> spool off

The database ora10g has been created and can be used properly.

Note:
(1) In 10 Gb, if the file system01.dbf uses extent management local, a temporary tablespace must be created.
(2) The sysaux01.dbf file must be created for 10 Gb.
(3) If an error occurs in the preceding steps and the error prompt is garbled, you can exit sqlplus, set the environment variable set nls_lang = american_america.zhs16gbk (Windows), and then log on to the database.

Conclusion: many problems and errors occur during the creation process. When an error occurs, view the alarm Log alert _Ora10gIn this example, the path is D: \ oraclexe \ app \ oracle \ admin \ ora10g \ bdump. According to the error codeGoogleThis can solve many problems. I will record the specific problems in the log.

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.