Home > database >  Oracle and commonly used Linux command
Oracle and commonly used Linux command

Time:09-17

1. Create a table space
The CREATE in TABLESPACE DBCMS LOGGING DATAFILE '/u01/app/oracle/oradata/former/DBCMS. DBF' SIZE 32 m AUTOEXTEND ON NEXT m MAXSIZE UNLIMITED among MANAGEMENT, LOCAL;
2. Create a user, the password corresponding table space
The create user DBCMS identified by oracle default in tablespace DBCMS;
3. The user authorization
Grant dba to DBCMS;
Grant the create view to dbservice;
Grant all privileges to DBCMS; (refer to each other, each other authorization)
4. Delete table space and user
Drop the user DBCMS cascade;
The DROP in TABLESPACE DBCMS o CONTENTS AND DATAFILES.
5.
query table spaceThe select tablespace_name from dba_tablespaces;
6. The query the user
Select the username from dba_users;
7. Switching between CDB and PDB
Alter session set container=ORCLPDB;
Alter session set container=last $root;

If you need to stop the archive mode, used here:
The alter database noarchivelog command

8. Enter the PDB process:
Up sqlplus/as sysdba.
Show PDBS;
Alter session set container=ORCLPDB;
8.12 c trial wmconcat need to unlock the user
Grant create session to wmsys;

#. DBCMS
#. Db_resource (table structure)
#. Dbservice (table space, user, authorization)
#. Dbcenter (table structure)
#. Dboperation (table space, user, authorization)

Check the character set:
Select * from nls_database_parameters where parameter='NLS_CHARACTERSET';

To the authorization of the virtual path and backup:
Grant read, write on directory DATA_PUMP_DIR DBCMS),
The backup site
/oracle/app/oracle/admin/former/dpdump/5 c47ff7cd869d57ae055000000000001
DIRECTORY management steps:
1, CREATE, CREATE (OR REPLACE) DIRECTORY DIRECTORY AS 'the pathname;
For example: CREATE OR REPLACE the DIRECTORY DIR AS 'F: \ expbak';
2, empowerment: GRANT the READ/WRITE] ON the DIRECTORY DIRECTORY TO username;
For example: grant the read and write on the directory exp_dir to John;
3, the method of query directory
Select * from dba_directories;

The original ruby:
Ruby 1.8.7
Redis cluster node configuration:
/home/redis/redis - 3.2.9/SRC/redis - trib. Rb create -- replicas 10.35.10.2:1 7001 10.35.10.2:7002 10.35.10.2:7003 10.35.10.2:7004 10.35.10.2:7005 10.35.10.2:7006 10.35.10.2:7007 10.35.10.2:7008

Look at the listener status: LSNRCTL status
Start the listener: LSNRCTL start
Close the listener: LSNRCTL stop
Close the firewall: sudo service iptables stop
Editor: firewall vi/etc/sysconfig/iptables
Restart the firewall: sudo service iptables restart
Save the configuration: sudo service iptables save
Check the firewall rules: sudo iptables - L - n


See table of coding:
Select * from nls_database_parameters where parameter='NLS_CHARACTERSET';

/u01/app/oracle/product/11.2.0/db_1/bin/expdp dbcenter/cjc1234 DUMPFILE=dbcenternew $now. The DMP CONTENT=METADATA_ONLY DIRECTORY=DPDATA1 schemas=dbcenter

/oracle/app/oracle/product/12.2.0.1.0/db_1/bin/impdp dbcenter/oracle DUMPFILE=dbcenter $now. The DMP schemas=dbcenter

/u01/app/oracle/product/12.2.0.1.0/db_1/bin/impdp dbcenter/oracle DUMPFILE=dbcenter $now. The DMP schemas=dbcenter

/oracle/app/oracle/product/12.2.0.1.0/db_1/bin/impdp dbcenter/oracle @ ORCLPDB DUMPFILE=dbcenter1. DMP schemas=dbcenter

Query oracle virtual path
Select * from dba_directories;

Set the DNS
Vi/etc/resolv. Conf

View the logs: enter Tomcat logs directory: CD Tomcat/logs,
Look at the journal: tail -f catalina. Out


Check the CPU number:
# cat/proc/cpuinfo | grep "physical id" | uniq | wc -l
Check the number of CPU cores:
# cat/proc/cpuinfo | grep "CPU cores" | uniq
Check the CPU type:
Model # cat/proc/cpuinfo | grep 'name' | uniq

View the total number of memory:
# cat/proc/meminfo | grep MemTotal

Check the hard disk size:
# fdisk -l | grep Disk

Set the static IP:
Vi/etc/sysconfig/network - scripts/ifcfg - an ethx

Xc1! 2 @

Change the hostname:
Vi/etc/sysconfig/network


Table update:
The update zsjlsglsy_xmgxyjzgjbxx t set t.g h=(select al-qeada h from zsjlsglsy_xmgxyjzgjbxx0516 where a a.x m not in (' Chen li ', 'hensing m. production) and t.x m=a.x m)
Where the exists (select 1 from zsjlsglsy_xmgxyjzgjbxx0516 b where b.x m not in (' Chen li ', 'hensing m. production) and t.x m=b.x m)

CodePudding user response:


Thanks for sharing, it is suggested that in the blog,
  • Related