All of our introductions here are based on dream 7 Database

One , Installation and uninstallation of daydream database

   Dayun database supports domestic Kirin OS, Install and uninstall provides command line mode , as well as GUI mode .

   Refer to the document of daydream database , Skip here .

Two , Instance management of Dayun database

       2.1 Database mode of daydream :

   Common mode (normal): Users can access the database normally , No restrictions on operation

   Master library mode (primary): Users can access the database normally , Forced generation of modifications to database objects redo Journal , When the archive is valid , Send out redo Log to standby .

   Reserve library mode (standby): Receiving the business data sent by the main database redo Log and redo , Database is read-only to users .

  2.2 Status of the database

   Configuration state (mount): Objects that are not allowed to access the database , Control file only , Maintenance of parameter file , Archive configuration , Database schema modification and other operations .

   Open state (open): Unable to maintain control documents , Archive configuration and other operations , Can access database objects , Provide normal point database service .

   Suspend state (suspend): And open The only difference between states : Restrict disk write , Once the data page is modified , trigger redo Journal , Swipe the data page , Current user is suspended

   Closed state :shutdown.

Three ,DM Use of database tools

   Here we introduce some common tools :

  3.1 Database management tools

  

  3.2 Console tools

  COMPATIBLE_MODE  Compatibility with other database modes . 0: Incompatible ,1: compatible SQL92 standard ,2: compatible ORACLE,3: compatible MS SQL
SERVER,4: compatible MYSQL

  PWD_POLICY:

   

  3.2 Database migration tools

  

  3.4 Performance testing tools

  

 

Four ,DM7  Architecture of

  4.1 Dream logical storage structure

        The storage structure is composed of : page , cluster , paragraph , data file , Tablespace , Database composition .

    Page is the smallest logical unit , Is the smallest allocation unit in the database .

    A database is made up of one or more tablespaces

    Each tablespace consists of one or more data files

    Each database file consists of one or more clusters

    Segment is the parent logical unit of the cluster , One segment can span multiple data files

    A cluster is made up of connected pages on a disk , A cluster is always in a data file .

  

  4.1 Physical storage structure of daydream   

    The profile is *.ini Ending ;

    Control documents are *.ctl Ending ;

    Data files are *.dbf Ending ;

    The log file is *.log Ending ;

    with bak File with extension , One more .meta metadata files .

Five , Tablespace management

   A tablespace is made up of one or more data files , A tablespace is a container for a database , A container is a data object in a database ( surface , Index, etc. ) Default tablespace and function of daydream database .

* System: Data dictionary and global system data .
* Roll: It stores the rollback records generated during the operation of the database .
* Temp: Temporary tablespace
* Main: Database default tablespace , When creating data objects , If the storage location is not specified , Store in this table space by default .
* HMAIN:huge Tablespace
  5.1 Query tablespace

     Related views :v$tablespace  dba_tablespaces v$huge_tablespace dba_data_files;

   5.2 Planning table space

           Create a tablespace , initial size 500M, Maximum 100M

         SQL> create tablespace tbs2 datafile '/dm7/data/DAMENG/tbs2_01.dbf'
size 50 autoextend on maxsize 100;

   5.3 Maintain tablespace

    Insufficient table space , How to expand table space

   SQL> alter tablespace tbs1 add datafile '/dm7/data/DAMENG/tbs1_02.dbf' size
32;

     5.4 Delete tablespace

    SQL> drop tablespace tbs2;

Six , user management

   stay DM User management in database mainly involves three parts : user , Jurisdiction , role .

* Jurisdiction : Execute specific types sql Or access to other schema objects .
*    System permissions : Creation of database objects , delete , Modification, etc .
*    Object permission : Operation permission on data of database object .
* role : Is to organize users with the same permissions together , This group of users with the same permissions are called roles , A role is a collection of permissions , One permission can be given to different roles .
Three predefined roles of database :DBA  PUBLIC  RESOURCE.
   Separation of three powers and four powers

* General version ( Standard Edition , Enterprise Edition , Development Edition ): Separation of three powers
* Secure version : Separation of four powers .
* Separation of three powers : Database Administrator (sysdba), Database security officer (syssso), Database auditor (sysauditor)
* Separation of four powers : Database Administrator (sysdba), Database security officer (syssso), Database auditor (sysauditor), Database object operator (sysdbo).
   Remarks : The default password of all accounts is the same as the user name in uppercase

Seven , Pattern object management

   A pattern is a collection of all objects ( surface , view , Indexes , column , Synonym , Self adding column ),DM When creating users , A pattern with the same name will be created by default . If you create a user , Schema name already exists , User cannot create

Eight , Backup and restore  

      Backup function ?

* Prevent misoperation
* Hardware and software failure , Restore
* Prevention of natural disasters .
      Backup method , Physical and logical backup

      Backed up media : disk , Magnetic tape , Compact disc

   colony : Data Guardian ,dsc (rac)

   Third party backup software is also supported : Love numbers in Shanghai , three top candidates in an imperial examination

Nine , task

   Regular backup case explanation

   First step : Create agent environment ( Will automatically create a sysjob Pattern )

  

   The second step : Create jobs

  

  

  

Ten , Dream development

* Daydream supports the development of those languages
  C ,C++ ,JAVA PYTHON, PHP ,PERL

* Development and configuration
   a. Define a DM jdbc Drive string :

    String jdbcstring=”dm.jdbc.driver.DmDriver”

     b. DM URL Connection string

    String urlstring=”jdbc:dm://ip:5236”

  10.1 To configure ODBC

* Linux Configuration in environment ODBC Environmental Science
    inspect :rpm -aq|grep gcc Do you have it or not? gcc package , Without , To configure yum Source to install

* Unzip the installation package
   [root@dca01 installdoc]# tar -xzvf unixODBC-2.3.0.tar.gz

* To configure odbc
  [root@dca01 unixODBC-2.3.0]# cd unixODBC-2.3.0 

  [root@dca01 unixODBC-2.3.0]# ./configure --enable-gui=no

* Compile ODBC
  [root@dca01 unixODBC-2.3.0]# make

* See odbc Version
  [root@dca01 unixODBC-2.3.0]# odbc_config --version

* See ODBC Path to profile
  [root@dca01 unixODBC-2.3.0]# odbc_config --odbcini

  [root@dca01 unixODBC-2.3.0]# odbcinst -j

* To configure ODBC.INI and odbcinst.ini
   

 

 

 

 

Technology
©2019-2020 Toolsou All rights reserved,
SQL Server Database Glossary CSS Animation effect dedecms Website is hacked How to solve hijacking to other websites Count the number of letters (java Language implementation )Java Basics ( Three ) String In depth analysis The difference between static method and non static method And storage location Django Personal blog building tutorial --- Time classified archiving Keras Save and load model (JSON+HDF5)hive Summary of processing methods for a large number of small files Website mobile phone number capture method