Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to create Database in linux system

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to create a database in the linux system. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

One: system environment: Red Hat Enterprise Linux Server release 5.4

ORACLE version Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production

Two:

1 / install the database software first

two。 Set environment variabl

3. Create the required directory

4. Create a parameter file pfile

5. Create a password file

6. Boot the database to numount and create a script for Oracle to build the database

7. Create a data dictionary for Oracle

1. First install the database software; install the rlwrap software.

two。 Set environment variabl

Export PATH

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

Export ORACLE_SID=willson

Export PATH=$PATH:$ORACLE_HOME/bin

Alias sqlplus='rlwrap sqlplus'

Alias rman='rlwrap rman'

3. Create the required directory

Mkdir-p $ORACLE_BASE/oradata/willson

Mkdir-p $ORACLE_BASE/admin/willson/adump

Mkdir-p $ORACLE_BASE/admin/willson/bdump

Mkdir-p $ORACLE_BASE/admin/willson/pfile

4. Create a parameter file

Cd cd $ORACLE_HOME/dbs

Vim initwillson.ora

Audit_file_dest='/u01/app/oracle/admin/willson/adump'

Audit_trail='db'

Compatible='11.2.0.0.0'

Control_files='/u01/app/oracle/oradata/willson/control01.ctl','/u01/app/oracle/oradata/willson/control02.ctl'

Db_block_size=8192

Db_domain=''

Db_name='willson'

Diagnostic_dest='/u01/app/oracle'

Memory_target=442006528

Open_cursors=300

Processes=150

Remote_login_passwordfile='EXCLUSIVE'

Sessions=170

Undo_tablespace='UNDOTBS1'

Log in to sqlplus / as sysdba

Create spfile

Create spfile from pfile

5. Create a password file

Orapwd file=orapwwillson password=willson entries=10 creates a password file

6. Boot the database to nomount and create a script for ORACLE to build the database

Spool willson_dbcreate.log

Create database "willson"

Character set "AL32UTF8"

National character set AL16UTF16

Datafile'/ u01 size

SYSAUX DATAFILE'/ u01 SIZE SIZE 100m

UNDO TABLESPACE "UNDOTBS1"

DATAFILE'/ u01 SIZE SIZE undotbs01.dbf'

DEFAULT TEMPORARY TABLESPACE temp TEMPFILE'/ u01 SIZE

DEFAULT TABLESPACE uses DATAFILE'/ u01 SIZE

Logfile GROUP 1 (

'/ u01 apprenticeship oradataUniver will _ 01a.rdo'

'/ u01 apprenticeship oradataUniver will _ 01b.rdo'

) SIZE 100m

GROUP 2 (

'/ u01 apprenticeship oradataUniver will _ 2a.rdo'

'/ u01 apprenticeship oraclescarplesoradataUniple will _ 2b.rdo'

) SIZE 100m

GROUP 3 (

'/ u01 apprenticeship oradataUniver will _ 03a.rdo'

'/ u01 apprenticeship oradataUniver redo03b.rdo'

) SIZE 100m

Spool off

7. Create an ORACLE data dictionary

SQL > @? / rdbms/admin/catalog.sql

SQL > @? / rdbms/admin/catproc.sql

Catalog.sql---- creates data dictionary base table and data dictionary view

Catproc.sql---- installs the oracle system package

This is how to create a database in the linux system shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report