Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Manually create Oracle Database Explanations     - Install and configure GO 1.2.1 under CentOS 6.5 (Linux)

- Win7 + Ubuntu Kylin + CentOS 6.5 installed three systems (Linux)

- JDK installation and configuration environment variable under linuxb (Linux)

- 29 practical examples Linux system / network administrator of nmap (Linux)

- Apache POI Excel Document Processing (Linux)

- Android memory optimization of the disk cache (Linux)

- Java foundation comb: Array (Programming)

- Common DDOS attacks (Linux)

- Oracle Duplicate build DataGuard (Database)

- HAproxy let IP recording back-end RS (Server)

- JavaScript, some conclusions about the implicit conversion (Programming)

- Linux itself disguised illusion strengthen security (Linux)

- CentOS yum source as the default setting methods in DVD (Linux)

- Linux virtual machine settings network, hostname ssh access (Linux)

- Detailed Linux su command to switch users Mistakes (Linux)

- Linux system security check method (Linux)

- Spring Data study notes -Helloworld (Programming)

- Setting Hibernate connection MySQL database connection pool coding (Database)

- Linux vi command list (Linux)

- The basic principles for the protection of a good linux server security (Linux)

 
         
  Manually create Oracle Database Explanations
     
  Add Date : 2018-11-21      
         
       
         
  Read the navigation
Database version:
1. Set up environment variables and create directories
2. Create an initialization parameter file
3. Start the instance to the nomount state to create the database
4. Run the script to create the dictionary, view, package, role, permissions, synonyms
5. Check the database-related information
6. Enable the archive log

Database version:

SQL> select * from v $ version;
BANNER
-------------------------------------------------- ------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL / SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

1. Set up environment variables and create directories

$ Export ORACLE_HOME = / u01 / app / product / 11.2.0 / db_1
$ Export ORACLE_SID = mandb
$ Mkdir -p / disk2 / oradata / mandb / datafile
$ Mkdir -p / disk2 / oradata / mandb / logfile

2. Create an initialization parameter file

$ Vim /disk2/oradata/mandb/datafile/mandb.ora
Db_name = 'mandb' #database name
Instance_name = 'mandb'
Control_files = '/ disk2 / oradata / mandb / datafile / mandb_control01.ctl'
Memory_target = 500m
Db_block_size = 32768
Db_create_file_dest = '/ disk2 / oradata / mandb / datafile'

Db_block_size specifies the default database block size to be created. If not specified, the default is 8192. Note:
Db_create_file_dest When a data file path is not specified, the data file is created by default

3. Start the instance to the nomount state to create the database

$ Sqlplus / as sysdba
SQL> create spfile from pfile = '/ disk2 / oradata / mandb / datafile / mandb.ora';
SQL> startup nomount
SQL> create database mandb
  2 user sys identified by oracle
  3 user system identified by oracle
  4 logfile group 1 '/disk2/oradata/mandb/logfile/redo01.log' size 50m blocksize 512,
  5 group 2 '/disk2/oradata/mandb/logfile/redo02.log' size 50m blocksize 512,
  6 group 3 '/disk2/oradata/mandb/logfile/redo03.log' size 50m blocksize 512
  7 maxlogfiles 10
  8 maxlogmembers 5
  9 maxloghistory 5
 10 maxdatafiles 200
 11 character set al32UTF8
 12 National character set al16UTF16
 13 extent management local
 14 datafile '/disk2/oradata/mandb/datafile/system01.dbf' size 500m reuse
 15 sysaux
 16 datafile '/disk2/oradata/mandb/datafile/sysaux01.dbf' size 500m reuse
 17 default tablespace users
 18 datafile '/disk2/oradata/mandb/datafile/user01.dbf' size 100m reuse
 19 default temporary tablespace tempfile
 20 tempfile '/disk2/oradata/mandb/datafile/temp01.dbf' size 20m autoextend on
 21 undo tablespace undotbs01
 22 datafile '/disk2/oradata/mandb/datafile/undotbs01.dbf' size 20m autoextend on
 23 maxsize unlimited;

Log file block size: 512bytes, you can set 1024bytes, 4096bytes, control file block size: 16k;
Note: If an error occurs halfway or stops unexpectedly, delete files that are not specified or can not be specified for reuse (eg, control file, tempfile, undofile), and then run:

Rm /disk2/oradata/mandb/datafile/mandb.ora
Rm /disk2/oradata/mandb/datafile/undotbs01.dbf
Rm /disk2/oradata/mandb/datafile/undotbs01.dbf

4. Run the script to create the dictionary, view, package, role, permissions, synonyms

SQL> @? / Rdbms / admin / catalog.sql #### Dictionaries, Views, Public Synonyms, Roles, Permissions
SQL> @? / Rdbms / admin / catproc.sql #### system required pl / sql package

The official documentation also says that the user logged in to the system user to execute the @@ / sqlplus / admin / pupbld.sql script, but was not found on the 11.2.0.1.0 installation. At this point the database is created;

5. Check the database-related information

SQL> column name format a10
SQL> select DBID, name, DB_UNIQUE_NAME, CURRENT_SCN, open_mode from v $ database; - Database information
      DBID NAME DB_UNIQUE_NAME CURRENT_SCN OPEN_MODE
---------- ---------- ------------------------------ ----------- --------------------
3530583721 MANDB 385901 READ WRITE
SQL> column name format a50
SQL> select file #, name, block_size from v $ datafile; - Data file information
    FILE # NAME BLOCK_SIZE
---------- ---------------------------------------- ---------- ----------
        1 /disk2/oradata/mandb/datafile/system01.dbf 32768
        2 /disk2/oradata/mandb/datafile/sysaux01.dbf 32768
        3 /disk2/oradata/mandb/datafile/undotbs01.dbf 32768
        4 /disk2/oradata/mandb/datafile/user01.dbf 32768
SQL> column member format a40
SQL> select * from v $ Logfile; - Log file information
    GROUP # STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------- -------------- ---
        1 ONLINE /disk2/oradata/mandb/logfile/redo01.log NO
        2 ONLINE /disk2/oradata/mandb/logfile/redo02.log NO
        3 ONLINE /disk2/oradata/mandb/logfile/redo03.log NO
SQL> column name format a60
SQL> select * from v $ controlfile; - Control file information
STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------------------------- ----------------- --- ---------- --------------
        /disk2/oradata/mandb/datafile/mandb_control01.ctl NO 16384 668
SQL> column window_name format a17
SQL> select WINDOW_NAME, WINDOW_NEXT_TIME, WINDOW_ACTIVE, AUTOTASK_STATUS from DBA_AUTOTASK_WINDOW_CLIENTS; - Window information
WINDOW_NAME WINDOW_NEXT_TIME WINDO AUTOTASK
----------------- --------------------------------- ------------------------------------------ ----- --- -----
WEDNESDAY_WINDOW 08-APR-15 10.00.00.000000 PM PRC FALSE ENABLED
FRIDAY_WINDOW 10-APR-15 10.00.00.000000 PM PRC FALSE ENABLED
TUESDAY_WINDOW 07-APR-15 10.00.00.000000 PM PRC FALSE ENABLED
SATURDAY_WINDOW 11-APR-15 06.00.00.000000 AM PRC FALSE ENABLED
SUNDAY_WINDOW 05-APR-15 06.00.00.000000 AM PRC FALSE ENABLED
MONDAY_WINDOW 06-APR-15 10.00.00.000000 PM PRC FALSE ENABLED
THURSDAY_WINDOW 09-APR-15 10.00.00.000000 PM PRC FALSE ENABLED

Check for object errors:

SQL> select COUNT (*) "OBJECTS WITH ERRORS" from obj $ where status = 3;

If there are packages, java code wrong, can be provided by the oracle utlrp.sql re-translation

SQL> @? / Rdbms / admin / utlrp.sql

6. Enable the archive log

$ Sqlplus / as sysdba < < EOF
Alter system checkpoint;
Alter system checkpoint;
Alter system checkpoint;
Shutdown immediate;
Startup mount
Alter database archivelog;
Alter database open;
EOF

- The end
     
         
       
         
  More:      
 
- CentOS 6.x Basic System Optimization after installation (Linux)
- findmnt- Looking mounted file system (Linux)
- How to install Linux Go Language (Linux)
- How screenshots from the Linux command line (Linux)
- Monitoring Linux System 7 command-line tool (Linux)
- Debian (Wheezy) Install Redmine 2.6 (Programming)
- Android Service service applications and the phone SMS Listener Listener (Programming)
- ORA-12547: TNS: lost contact error Solution (Database)
- Iptables principle (Linux)
- CentOS 6.5 x86_64 system customized automated deployment (Linux)
- 20 Unix / Linux command skills (Linux)
- Why you should choose Python Programming (Programming)
- Linux Shell debugging (Programming)
- Installation JDK 1.8 under CentOS7 (Linux)
- Setting Wetty do not need an account login command line operations (Linux)
- Ubuntu GCC, G ++ and fortran Version Switch (Linux)
- Analysis of C ++ exception mechanism (Programming)
- The three-way division of the sorting algorithm Quicksort (Programming)
- Use innobackupex full realization of MySQL hot backup (Database)
- Intel Graphics Installer installation on Ubuntu 15.10 (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.