Home > other >  Basic knowledge of dream 8 of database
Basic knowledge of dream 8 of database

Time:01-14

The preparation before installation and the matters needing attention
Version 1. Check the system, the kernel, memory, disk space, if check glibc 2.3 or more RPM - qa | grep glibc
2. Suggest to stop using root database installation
CD/etc/security/
Vi limits. Conf

XXX soft nofiles 65536
XXX hard nofiles 65536

//save, see whether success
Ulimit -a

4. Set the graphical interface
Check if you can open the graphical interface: input ` suspending `; Under the root input ` the xhost + ` and then switch to the user operation
Newspaper suspending it without this command, the execution ` yum install xorg - x11 - apps `


Graphical install

Enter the file installation directory, execute./DMInstall. Bin, start step by step, process will be prompted to perform root_install. Sh, start the AP service,

Graphical instantiation database
? Directory/tool (no configuration environment variable)./dbca. Sh, open the database configuration assistant interface, want to in the process of implementation of root/script/root/dm_service_installer. Sh for database of registered (/bin/DMServiceDMSERVER to/etc/rc. The d/init. D/DMServiceDMSERVER), fill in the database name, port, user name, password, the information such as file directory, note: cluster size, cannot be modified after the page size, do not set the environment variable, you need to enter/tool, the following commands are written is to configure the environment variables,

Command line install
? If the existing database, can be installed in the root directory of the execution./uninstall. To uninstall, sh will retain after unloading before creating a database instance,
? Enter the installation file directory./DMInstall. Bin -i step by step according to the process selection,
? After the installation is complete, if you want to use the previously created database services, can be executed in CD/script/root./dm_service_installer sh dmserver - p - t dmserver - I/xx/data/DAMENG/dm. Ini - p: before you create the database service name; -i: before the service configuration file path, executable dm_service_installer. Sh - h view command description

Command line way to instantiate the database
? Check the usage dminit. Sh help
? Install dminit path=/dm7/data db_name=DMMENG01 instance_name=DMSERVER01 port=5237
? Registration service CD/script/root./dm_service_installer sh dmserver - p - t DMSERVER01 - I/dm7/data/DAMENG01/dm. Ini
? Start the service can be manually start the manager interface, can be in the/etc/rc. D/init. D/service DmServiceDMSERVER01 start

Start the service method
? DM server viewer (CD tool./dmservice. Sh under open interface), manual
? Linux services/etc/rc. D/init. D/service DmServiceDMSERVER01 start
? Command way/bin./dmserver path=/xx/xx/DAMENG/dm. Ini closes the window service will close

Directory description
? Command line tools such as/bin: disql, dminit
?/tool: the client tools
Open the DM service viewer:./dmservice. Sh
Open the DM console:/console
To build libraries:./dbca. Sh
Data migration: DTS
Open the management end:/manager
?/script/root:
Root_install. Sh: start the AP service, generally performs a while installing,
Dm_service_install. Sh registration database service
Dm_service_uninstaller. Sh uninstall database service

Connect to the database:
? The default port 5236/bin disql
? Connect other port disql sysdba (user name)/(password) @ localhost: 5237
? You can configure the connection string/etc/dm_svc. Conf DMSERVER01=(127.0.0.1:5237) disql sysdba (user name)/(password) @ DMSERVER01
? The client tools CD tool manager

Set the environment variable

User's directory. The following files export PATH="$PATH: $DM_HOME/bin: $DM_HOME/tool"
Saved to the source. The following to work

SQL query command simple data dictionary
? Query service configuration select * from V $DM_INI
? The query service configuration parameter type select DISTINCT PARA_TYPE FROM V $DM_INI
? The select * from V $query table space in TABLESPACE
? Query data file select * from DBA_DATA_FILES
? Query block information select * from USER_SEGMENTS
? Query the user select * from DBA_USERS
? Set up the service parameter sp_set_paravalue (scope int, paraname varchar (256), the value int64)

DM thread
? Consult the process PID ps - ef | grep dmserver
? Method 1: according to the process PID query threads ps -t -p PID
? Method 2: select * from V $THREADS

Table space management
? Data dictionary query? Select * from dba_tablespaces;
? Select * from v $in tablespace;
? Select * from DBA_DATA_FILES;
? Select * from V $DATAFILE "";

? Table space management
On-line condition can't table space data file renaming, data file can't drop, offline, table space can be offline, table space file size can only change is big, can't change,? MD management tools graphical interface, table space is created, modify the file name, table space name, modify the file name don't need to do a tablespace offline operation, should be the tool will automatically,
? The command line mode? Create the create in tablespace tbs02 datafile '/xx/data/DAMENG/tbs02. DBF' size 200;
? Modify the tablespace data of the alter in tablespace tbs02 rename datafile '/xx/data/DAMENG/tbs02. DBF' to '/xx/data/DAMENG/tbs02 TTT'; If the table space in the online state, will prompt error message, you need to alter table space in tablespace tbs02 offine, then modified, after the success of the modified alter in tablespace online
? Modify the tablespace file size, the only change is big, can't change a little, the alter in tablespace tbs02 resize datafile '/xx/data/DAMENG/tbs02. DBF' to 400;
? Modify automatically expand the alter in tablespace tbs02 datafile '/xx/data/DAMENG/tbs02. DBF' autoextend off;
? Modify the maximum file size alter in tablespace tbs02 datafile '/xx/data/DAMENG/tbs02. DBF' autoextend on NEXT 4 MAXSIZE 500



Redo log

Redo log can rename, cannot delete, modify the file name needs to be in the condition of the alter database mount, after the success of the modified the alter database open
Redo LOG by default, there are two in/data/DAMENG (database instance name)/DAMENG01. LOG and DAMENG02 LOG
? Data dictionary query? Select * from V $" RLOG "
? Select * from V $RLOGFILE "

? Graphical interface? DM management tool in the management server - & gt; Management server - & gt; Log file

? The command line mode? Added to do log the alter database add logfile '/xx/data/DAMENG/DAMENG03 log' size 500;
? Modify the size of the alter database RESIZE logfile '/xx/data/DAMENG/DAMENG01 log' to 500;
? Modify the file name: alert the database RENAME logfile '/xx/data/DAMENG/DAMENG03 log' to '/xx/data/DAMENG/DAMENG04 log'


Temporary table space (TEMP. DBF)

Temporary table space can increase the data file, but cannot be modified autoextend attribute
? Query the temporary table space information select para_name para_value, para_type from v $dm_init where para_name like '% TEMP %'
? Add a temporary tablespace file alter in tablespace temp add datafile '/xx/data/DAMENG/TEMP01. DBF' size 200;
? Modify the file size of the alter in tablespace temp resize datafile '/xx/data/DAMENG/TEMP01. DBF' to 300;

UNDO (ROLL. DBF) table space

DML (insert, update, delete) a rollback operation, can operate and ordinary table space,
UNDO_RETENTION appropriately retention time 90 seconds 90
? Query the temporary table space information select para_name para_value, para_type from v $dm_init where para_name like '% UNDO %'
? Add files alter in tablespace ROLL add datafile '/xx/data/DAMEMG/ROLL02. DBF'
? nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related