Common commands in Oracle
1. Create a userCreate user Username identified by passwordNote: The username and password should be in English.For example, create user sms identified by sms;
2. Create a tablespaceCreate tablespace name datafile 'Storage path' sizeFor example, create tablespace ts_sms datafile 'f: \ quanxianguanliruanjian \ oracle \ tablespace \ sms. d
Use the Oracle client load data and sqlldr commands in Java to execute data import to the database, oraclesqlldr
Test code in Windows:Import java. io. file; import java. io. fileNotFoundException; import java. io. fileWriter; import java. io. IOException; import java. io. inputStream; import java. io. printWriter; import java. util. role; public class testTimer {/*** @ param args */public static void main (
This article details the use of ORACLE commands to create databases and table spaces on the command line
1, the use of Super User login Sqlplus.
2, create the table space:
sql> Create tablespace Test
2 datafile ' D:\oracle\oradata\test\test.dbf '
3 size 100M autoextend on next 10M maxsize unlimited extent management local;
3. Create User and Password:
Sql>
When you are maintaining Oracle, you can use some Unix operating system commands to view system-related information under various operating systems.
Memory
-------
Aix:bootinfo-r
LSATTR-E-LMEM0
/USR/SBIN/LSATTR-E-L sys0-a Realmem
Or use a tool as "Topas" or "Nmon" (These are utilities)
Linux:cat/proc/meminfo
/USR/SBIN/DMESG | grep "Physical"
Free (the free command)
HP:/usr/sam/lbin/getmem
grep me
Method One: The version number is displayed when you log in [[email protected] ~]$ sqlplus/as sysdbasql*plus:release 11.2.0.3.0 Production on aweary Juan 7?20 17:51:14 2015CopYright (c) 1982, Oracle. All rights reserved. Method Two:sql> select * from V$version;BANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Edition release 11.2.0.3.0-64bit
Tags: nslookup host database network layer file Oracle file configuration problem oraOracle's cluster management software and databases are very dependent on the private network, and many cluster problems can be attributed to the network level at the end.It is necessary to check the network information when there is a problem with the cluster.1. Check the MTU size to verify that all nodes have the same MTU size for both public and private network card
Tags: sqlplus res load use data password rod BSP password CREATE TABLE Space Create Tablespace AchartsDataFile ' D:\oradata\orcl\ACHARTS01. DBF ' size 800mAutoextend on next 10m maxsize 3000m Delete Table spaceDrop Tablespace Acharts Create user "" is passwordCreate user Acharts identified by "Acharts"; Delete UserDrop User Tcuser2 Authorization to Acharts usersGrant Connect,resource to Acharts;Alter user acharts default Tablespace acharts; Try logging in C:\users\wd>sqlplus Sql*plus:release 1
Tags: password oracle status database terminalLog in to OracleSqlplus/as SYSDBASql> Startup---Start Oracle databasesql> shutdown Immediate--stop databaseConn Smsdb/password--Connect to SMSDB usersBack to Terminal mode, enter:$ LSNRCTL StatusCheck to see if the listener has a boot.If it does not start, you can enter:$ lsnrctl StartEmctlIn addition, it can be found that http://localhost.localdomain:1158/em is
,b.bytes used,c.bytes free, (B. bytes*100)/a.bytes "%used", (c.bytes*100)/a.bytes "% free" from SYS. Sm$ts_avail A,sys. Sm$ts_used B,sys. SM$TS_FREEC where A.tablespace_name=b.tablespace_name and A.tablespace_name=c.tablespace_ NAME; 7, view Database Library objects select owner, object_type, status, COUNT (*) Count#from all_objects GROUP by owner, object_type, status; 8, view the version of the database select version from Product_component_ Version where SUBSTR (product,1,6) = '
Log On with the user password set in step 1 during oracle Installation (for example, sqlplus "sys/zhb126 as sysdba") and run
Alter user scott account unlock;
Then execute sqlplus scott/tiger and you will be asked to modify scott's new password.Set the command line to support spaces
Set sqlblanklines onVariable Substitution-variable substitution. Only one execution plan is arranged in this process, which improves the execution efficiency.
SQL> select
Common oracle database commandsConn is used to connect to a new user. It is often used to switch the user's conn user name/password to connect to the new user show user to view the current user disc to disconnect the current connection, but do not exit the sqlplus window exit disconnect the current connection and exit the sqlplus window passwd to change the user password. If you change the password for yourself, you can leave the user name without it.
Tags: create address bar TAF session size class DMP pathTo import to a specific table space, you need to create a new tablespace, and if not, use the one you already have, just follow the steps below Enter IMP username/password in the DOS window @ip address: Port number/DB instance file= ' path of the DMP file to be imported ' full = y (may be required) Here are the steps to create a tablespace and a user:
user
build: createuser User name identifiedby "password";
Aut
Label:Oracle command-line tools basic operations and SQL commands1. Basic Concepts1.1. Data typeBasic data Type (number,varchar2,date)O Racel supports the following internal data types:VARCHAR2 variable length string with a maximum of 2000 characters.Number numeric.Long to longer character data, up to 2G bytes.Date type.RAW binary data, up to 255 bytes in length.Long RAW variable-length binary data with a maximum length of 2G bytes.ROWID 26 binary string that represents the unique address of the
1) Check the cluster status:
[Grid @ rac02 ~] $ Crsctl check ClusterCRS-4537: Cluster ready services is onlineCRS-4529: Cluster synchronization services is onlineCRS-4533: event manager is online.
2) All Oracle instances (Database status ):[Grid @ rac02 ~] $ Srvctl status database-D racdbInstance racdb1 is running on node rac01Instance racdb2 is running on node rac02
3) Check the status of a single instance:[Grid @ rac02 ~] $ Srvctl status insta
Oracle Data Import and Export imp/exp function: Oracle Data Import and Export imp/exp is equivalent to oracle data restoration and backup. In most cases, you can use Oracle data import and export to back up and restore data (without causing data loss ). Oracle has a benefit.
Importing and exporting Oracle Data imp/exp is equivalent to restoring and backing up ORACLE data. The exp command can export data from the remote database server to the local DMP file, and the IMP command can import the DMP file from the local to the distant database server. This function can be used to build two identical databases, one for testing and the other for formal use.Execution environment: it ca
The local development environment is win2003 + vs2005 + Oracle9i
Testing site environment: win2003 + IIS + Oracle10g
The password of the local development database account oracleusera orclepassworda and the database name oracledatabasenamea
Test the database account oracleuserb password orclepasswordb and database name oracledatabasenameb.
-- Create a database connection (F:/Oracle/ora92/Network/admin/tnsnames. ora) with the following content:
# Tnsn
Article from [here]
// Create a temporary tablespace
create temporary tablespace test_temp tempfile 'E:\oracle\product\10.2.0\oradata\testserver\test_temp01.dbf' size 32m autoextend on next 32m maxsize 2048mextent management local;
// Create a data table space
create tablespace test_dataloggingdatafile 'E:\oracle\product\10.2.0\oradata\testserver\test_data01.dbf' size 32m autoextend on next 32m maxsize 204
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.