In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces oracle 11g how to build the database manually, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.
Working environment: ORE 6.5
Building a database by hand is a basic skill that must be mastered by dba, which makes it clear to understand the directory structure of oracle, the necessary files of oracle, the understanding of table space, authentication and other concepts.
1. Set environment variabl
[oracle@ENMOEDU ~] $vi .bash _ profile
# .bash _ profile
# Get the aliases and functions
If [- f ~ / .bashrc]; then
. ~ / .bashrc
Fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
Export PATH
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
Export ORACLE_SID=ENMOEDU
Export PATH=$ORACLE_HOME/bin:$PATH
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libi
~
~
~
~
".bash _ profile" [readonly] 19L, 385C 1 All
[oracle@ENMOEDU ~] $source .bash _ profile
two。 Prepare password file and initialize parameter file and create database script
[oracle@ENMOEDU ~] $cd $ORACLE_BASE
[oracle@ENMOEDU oracle] $ls
Cfgtoollogs checkpoints diag product
[oracle@ENMOEDU oracle] $cd $ORACLE_HOME/dbs
[oracle@ENMOEDU dbs] $ls
Init.ora
[oracle@ENMOEDU dbs] $orapwd file=orapwdENMOEDU password=oracle entries=30
[oracle@ENMOEDU dbs] $cat init.ora | grep-v ^ $| grep-v ^ # > initENMOEDU.ora
[oracle@ENMOEDU dbs] $vi initENMOEDU.ora
Diagnostic_dest='/u01/app/oracle'
Db_name='ENMOEDU'
Memory_target=1G
Processes = 150
Audit_file_dest='/u01/app/oracle/admin/ENMOEDU/adump'
Audit_trail = 'db'
Db_block_size=8192
Db_domain=''
Db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
Db_recovery_file_dest_size=2G
Diagnostic_dest='/u01/app/oracle'
Open_cursors=300
Remote_login_passwordfile='EXCLUSIVE'
Undo_tablespace='UNDOTBS1'
Control_files = (/ u01qqapax oradataEnMOEDUqqcontrol01.ctlOnOn01ActionoradataandEnMOEDUcontrol 02.ctl)
Compatible = '11.2.0'
~
~
~
~
~
~
~
"initENMOEDU.ora" 15L, 493C written
3. Prepare the relevant directories needed to create the database
[oracle@ENMOEDU oracle] $cd / u01/app/oracle/
[oracle@ENMOEDU oracle] $mkdir-p admin/ENMOEDU/audmp
[oracle@ENMOEDU oracle] $mkdir-p flash_recovery_area
[oracle@ENMOEDU oracle] $ls
Admin cfgtoollogs checkpoints diag flash_recovery_area product
4. Start to build the library by hand
[oracle@ENMOEDU ENMOEDU] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 10 00:39:10 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL > startup nomount
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1349732 bytes
Variable Size 620758940 bytes
Database Buffers 444596224 bytes
Redo Buffers 4628480 bytes
[oracle@ENMOEDU ~] $vi create_db.sql
CREATE DATABASE ENMOEDU
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('/ u01 SIZE 100m oradata 512)
GROUP 2 ('/ u01 BLOCKSIZE SIZE) SIZE 100m oradata 512
GROUP 3 ('/ u01 BLOCKSIZE SIZE) SIZE 100m oradata 512
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE'/ u01 SIZE REUSE system 01.dbf' Oracle 325m
SYSAUX DATAFILE'/ u01 SIZE REUSE
DEFAULT TABLESPACE users
DATAFILE'/ u01qqappActionoradataOnEnMOEDUscarusers01.dbf'
SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE'/ u01qaphar oracle.oradataAccording to EnMOEDUhand temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs1
DATAFILE'/ u01 apprenticeship oracle.oradataUndotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
"create_db.sql" 24L, 1237C written
[oracle@ENMOEDU ~] $cd / u01/app/oracle
[oracle@ENMOEDU oracle] $ls
Admin cfgtoollogs checkpoints diag flash_recovery_area product
[oracle@ENMOEDU oracle] $mkdir-p oradata/ENMOEDU
[oracle@ENMOEDU oracle] $cd / u01/app/oracle/diag/rdbms/enmoedu/ENMOEDU/trace/
[oracle@ENMOEDU trace] $tail-100f alert_ENMOEDU.log
SQL > @ / home/oracle/create_db.sql
Database created.
SQL > @? / rdbms/admin/catalog.sql
.
PL/SQL procedure successfully completed.
TIMESTAMP
COMP_TIMESTAMP CATALOG 2014-02-10 01:12:14
SQL > @? / rdbms/admin/catproc.sql
.
SQL >
SQL > SELECT dbms_registry_sys.time_stamp ('CATPROC') AS timestamp FROM DUAL
TIMESTAMP
COMP_TIMESTAMP CATPROC 2014-02-10 01:25:21
1 row selected.
SQL >
SQL > SET SERVEROUTPUT OFF
SQL >
SQL >
SQL > select status from v$instance
STATUS
-
OPEN
1 row selected.
SQL > quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ENMOEDU ENMOEDU] $
5. Complete the manual construction of the database
On oracle 11g how to manually build the database to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.