. SQL file is called in the. SQL file.Save the file name to save the buffer command as a file. The default file extension is. SQL.Get file name refers to the SQL file stored in the diskStart file name run SQL file transferred to memoryThe spool file name stores all the subsequent operations and execution results on the disk. The default file extension is. lst.Spool displays the current "offline" statusSpool off stop outputExample:SQL> spoolSQL> spoolTo A. LSTSQL> spool offSQL> spoolNo fake offli
Oracle log mining command 1. Log Mining 1.1 supplement log command (log contains rowid)
alter databaseadd supplemental logdata;
1.2 DML-based log mining example: SCOTT updates a record. I want to mine the operation time and SCN, as shown in figure
update emp set sal=9000;
Step: 1.2.1 view the current redo log
Col member for a40 select v1.group #, v1.sequence #, v1.first _ change #, v1.status, v2.member from v $ log v1, v $ logfile v2 where v1.gro
Oracle Import utility allows you to extract data from a database and write the data to an operating system file. The basic format used by imp: imp [username [/password [@ service]. The following describes common usage of imp.
1. Get helpImp help = y2. Import a complete databaseImp system/manager file = bible_db log = dible_db full = y ignore = y3. import one or more specified tables, indexes, and other objects to which the user belongs.Imp system/man
Java code
Sqlplus/nolog
Conn/as sysdba
Java code
Shutdown immediate
Startup mount;
Alter database open;
Java code
ORA-00313 and ORA-00312: oracle initialization or shutdown in progress
Alter database clear logfile group 1;
Alter database clear logfile group 2;
Alter database clear logfile group 3;
Alter database clear unarchived logfile group 1;
Alter database clear unarchived logfile group 2;
Alter database clear unarchived logfile group 3;
A
Today is February 6,. before the Spring Festival, I will review what I learned in October. I have detailed operations on the oracle memory segment in my previous blog. Record the usage of the ipcs command here.
Http://blog.csdn.net/xiaohai20102010/article/details/9634099Ipcs command usage
Report the status of inter-process communication facilities.Syntax
Ipcs [-m] [-q] [-s] [-S] [-P] [-l] [-a |-B-c-o-p-t] [-T] [-C CoreFile] [-N Kernel]Description
The
The system user cannot perform database backup and recovery operations (the XMP Data File Import and Export function ). After creating a user in the previous article, you must specify the user permission for the Import and Export Operation. The following is a list of permission names obtained through online query. Run one row in sqlplus:
Grant connect to user name;Grant exp_full_database to user name;Grant imp_full_database to user name;Grant resource to user name;Grant create procedure to user
Use exp/imp to migrate data, especially between different versions and between different systems,Of course, we recommend that you use expdp/impdp to import and export data. The following is a brief introduction to the basic operations of exp and imp.
1. Export and Import of the entire databaseA. Before exporting and importing data, check the character set of the database and set the environment variable NLS_LANG.Export NLS_LANG = AMERICAN_AMERICA.UTF8 (this is my parameter, depending on the actu
. Oracle sqlplus statement Editing Command
First, enter the following command:
SELECT emp_id, emp_name
FROM Employees
The input command can be followed by a statement. For example, after the preceding statement is run, enter:
Input WHERE emp_age> 30
You can get the following command:
SELECT emp_id, emp_name
FROM Employees
WHERE emp_age> 30
The ln command is used to specify the nth line of the statement to be input. For example, after the preceding sta
1. Switch users and log on:
Conn system/password @ myoracle as sysdba; myoracle is the database name or service name. As sysdba logs on as an administrator. If the database name is not added, a protocol adapter error may be reported. If you have multiple databases, log on to the local machine.
2. Create a user create Xiaoming identified by password; Delete the user drop user Xiaoming;
If you have already created a table, you must include the cascade parameter;
3. Authorize a user
SQL> grant DBA
The command is at the beginning--the command that can be entered in the--cmd--dos run.
(1) command to open and close Oracle related services:
Open service
net start oracleoradb10g_home1tnslistener--This is listening, this service name may not be the same
net start oracleservice***--This * * * is the global database name
net start Oraclecsservice
net start oracledbconsole***--*** ditto
net start oracleoradb10g_home1isql*plus--, unable to use SQL statem
Document directory
· Character Functions
· Numeric Functions
· Date functions
· Conversion functions
· General Functions
I. common syntax
-- 1. drop table name cascade constraint -- 2. when the content in the parent table is deleted, the content in the child table is also deleted on delete casecade -- 3. display the table structure desc table name -- 4. create user [username] identified by [password] -- 5. grant permissions to users. 1. 2... to user ex: grant create session to [username]
row. The default value is 80.
SQL> set numwidth 12; // The length of the output number field. The default value is 10.
SQL> set termout off; // displays the execution results of commands in the script. The default value is on.
SQL> set serveroutput on; // set to allow display of output similar to dbms_output
SQL> set verify off // you can close or open the prompt to confirm the display of information old 1 and new 1.
The column command
COL [UMN] [{co
Label:SQLLDR: Generally used to import files ending with any suffix, this time I was just trying to import a file with a suffix of. 20160101. Combined with the use of input.ctl, can be used under DOS, you can import hundreds of thousands of, millions of data on a table, INPUT.CTL file Format: IMP: A DMP file that is typically used to import multiple tables, which can have process statements, SQL statements Exp: generally used to export tables @: Typically used in Sql*plus clients to import file
1. Opening and closing of CRSClose CRS/etc/init.d/init.crs stopOpen CRS/etc/init.d/init.crs start2. Start and close all cluster servicesShut downCrs_stop-allStartCrs_start-all3, manually start the sequence of cluster servicesNode Application "Nodeapps" –>asm instance –> production Instance –> serviceSrvctl Start Nodeapps-n Node1Srvctl Start Nodeapps-n Node2Srvctl Start Asm-n Node2Srvctl Start Asm-n Node1Log on to the individual node startup database using Sqlplus4, manually shut down the order o
TableDemo1 iscomments;3Querying table field commentsSELECTTable_name,column_name,comments fromUser_col_commentsWHEREtable_name= 'Table name';//Note that the table name needs to be capitalized4Add Field Comment Comment on columnTable name. Column Name is 'Notes'; Five sequences1Querying user sequencesSelectSequence_name,sequence_owner fromAll_sequenceswhereSequence_owner='User name';//Note that the user name is capitalized2Increase SequenceCreateSequence demo1_seq minvalue min. maxvalue max valu
--- Use an oracle user to go to sqlplus to delete the user and create another user and grant permissions
-- The permission must have synonym; otherwise, an error occurs when the imp dmp file is used.
Su-Oracle
Sqlplus/As sysdba
Drop user base cascade;Create user base identified by zdsoft default tablespace tbs_base;Grant connect, resource, create table, create view, execute any procedure, create any syn
Add the following command to. bashrc under the replicel User:
Install a pack rlwrap-0.37-1.el5.i386.rpm
[Root @ tyger ~] $ Rpm-ivh rlwrap-0.37-1.el5.i386.rpm
Next, modify a parameter:
[Oracle @ tyger ~] $ Cat. bashrc#. Bashrc# Source global definitionsIf [-f/etc/bashrc]; then./Etc/bashrcFi# User specific aliases and functionsTake Effect[Oracle @ tyger ~] $ Source. bashrcAlias SQL = 'maid sqlplus'Alias s
Tags: Oracle common commands1 How do I see what tables are in the database?SELECT * from Sys.user_tables;2 How to link a databaseSqlplus/nolog;conn sys/oracle as SYSDBA;3 How to start a databaseStartup4 Viewing the Oracle instance structureDesc v$instance;5 Viewing the user's default tablespace, temporary tablespace informationSelect distinct username,default_tab
1
--
-------
2
Same commands as SQL2000
3
Create tablename
4
Delete table drop
Table
Tablename
5
There is also alter
Insert
Into
Update and so on.
6
To delete a table, directly Delete tablename.
7
--
---------
8
The following is a summary of commands different from SQL2000.
9
The first SQL statement must end with the; sign. or
*
End (not sa
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.