Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Manually create Oracle Database Explanations     - Thinking in Java study notes - Access modifiers (Programming)

- Linux file compression and archiving (Linux)

- Between the two to achieve the main MySQL database synchronization from (Database)

- The development environment to build Nodejs under Ubuntu 14.04 (Linux)

- Oracle Enterprise Linux 64-bit install apache-tomcat-7.0.53 step (Server)

- System with Windows Remote Desktop to connect Ubuntu 15.04 (Linux)

- MySQL 5.7 and 5.6 group by differences (Database)

- RedHat virtual machine to install VMware Tools (Linux)

- Vim highlight lookup operation (Linux)

- Linux System Getting Started Learning: Linux how to install 7zip (Linux)

- ApacheDS configuration of users and user groups to achieve SSO (Server)

- 11 examples in Linux df command (Linux)

- Windows Remote Desktop Management CentOS 6.4 (Linux)

- Protect your files, modify the Linux value Umask (Linux)

- Use OpenSSL for RSA encryption and decryption (Linux)

- Under Ubuntu on how to use iptables firewall (Linux)

- Ubuntu 14.04 Docker installation (Linux)

- Java 8 stream parsed into SQL (Programming)

- mysqldump implement database logical backup (Database)

- Install KVM on Ubuntu and build a virtual environment (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:      
 
- Integrated security administrator Linux accident management (Linux)
- HAproxy let IP recording back-end RS (Server)
- Articles do not resolve after opening under Ubuntu WordPress setting a fixed link (Server)
- Python Flask environment to build (Linux)
- Ubuntu 14.04 install Sublime Text 3 plug and use SublimeClang (Linux)
- Android Application Development: Genymotion can not start solving (Linux)
- Linux environment variable settings and save places (Linux)
- 3 tips Linux command (Linux)
- Ubuntu dual-card system configuration method (Server)
- Digital jQuery scrolling effect (Programming)
- Binary search -Java achieve (Programming)
- 64-bit Ubuntu 15.10 How to compile the latest version of the 32 Wine 1.7.53 (Linux)
- Performance Optimization: Using Ramlog transfer log files to memory (Linux)
- Nginx reverse proxy and self-signed https (Server)
- Linux security settings Basics (Linux)
- To install Spotify in Ubuntu / Mint (Linux)
- Ubuntu clean up unnecessary disk space usage (Linux)
- MySQL 5.6 use GTIDs build the master database (Database)
- How to install PlayOnLinux 4.2.5 under Ubuntu 14.04 / 12.04 (Linux)
- Java string concatenation techniques (StringBuilder tips) (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.