two ways to connect Oracle databases: Dedicated server connections and shared server connectionsOne, the Oracle database consists of:Oracle server is comprised of: instances and databases;Oracle database consists of: Data file redo log file
Oracle Flash back query and flash back databaseDifference:For data flashback queries, you only need to enable the Undo table space to automatically manage rollback information.Using the flashback removal technology and the Flashback database
Conclusion: Using the Imp tool is unable to implement the existing data in the Overwrite table, it is said that using Impdb's table_exists_action=truncate option canWhen importing data with Imp, without special parameters, if the table already
Creating and managing Table spaces1. Create a table Space exampleSelect name from V$datafile;Sql> select name from V$datafile;NAME--------------------------------------------------------------------------------/u02/oracle/oradata/orcl/system01.dbf/u0
Typically,the ORACLE_SID environment variable is the full name of the ORACLE System Identifier, which is used to identify different instances on a single server, by default the instance name is Oracle_ The value of the SID (that is, Instance_name=
People who work with Oracle use a variety of tools to connect to Oracle databases on a daily basis, such as sql*plus, PL/sql, TOAD, Sqldeveloper, and so on, listing several ways to connect to Oracle, in this case sql* Plus, for example.1. Easy
201705251537Trcsess.awk tool, use similar to the following:Awk-f Trcsess.awk xxx.trc > Xxx.more1615Tvdztat-i .... trc-o xxx.html201705261604Select T1.pname,t1.pval1,t1.pval2 from sys.aux_stats$ t1where t1.sname= ' Sysstats_main ';Select sum (t1.
1. Run Sqlplus toolC:\users\wd-pc>sqlplus2. Go directly to the Sqlplus command promptC:\users\wd-pc>sqlplus/nolog3. Connect as OS IdentityC:\users\wd-pc>sqlplus/as SYSDBA orSql>connect/as SYSDBA4, Normal User loginC:\users\wd-pc>sqlplus scott/123456
Oracle database, data increment, delete, change, check, through SQL statement implementationSQL: Structured Query language;Features: Case-insensitive, string enclosed in single quotation marks, end of statement end with semicolon;Line comment, add "-
/*The grouping function can no longer have normal columns in the SELECT clause, unless the column gives all the null values in group by to be grouped into a group filter SELECT from WHERE GROUPBY having an by-clause*/--find out the average salary
If the character encoding of Oracle is GBK, then a Chinese character takes up two bytes, but if you use UTF-8, then a Chinese character occupies three bytes. The VARCHAR2 type is used in most cases to ensure better compatibility.GBK Character Set:
Oracle Create user and permissions settingsPermissions:Create sessionCREATE tableUnlimited tablespaceConnectResourceDbaCases:#sqlplus/nologSql> Conn/as sysdba;Sql>create user username
Display partition table informationDisplay information for all partitioned tables in the database: Dba_part_tablesDisplays all partition table information that the current user can access: all_part_tablesDisplays information about all partitioned
Stored Procedure creation Syntax:Create or Replace procedure stored procedure name (param1 in type,param2 out type)AsVariable 1 type (value range);Variable 2 type (value range);BeginSelect COUNT (*) into variable 1 from table A where column name
--1, the following are related tablesSELECT * from V$lock;SELECT * from V$sqlarea;SELECT * from V$session;SELECT * from V$process;SELECT * from V$locked_object;SELECT * from All_objects;SELECT * from v$session_wait;--2, viewing locked tablesSelect B.
Sequence: is a database object provided by Oacle to produce a series of unique numbers.
Automatically provide a unique value
Shared objects
Primarily used to provide primary key values
Loading
First, view the table in the Recycle BinSelect Object_name,original_name,partition_name,type,ts_name,createtime,droptime from RecycleBin;Second, the recovery tableSql>flashback table Test_drop to before drop; Sql>flashback table
Sequence: is a database object provided by Oacle to produce a series of unique numbers.L automatically provide a unique valueL Shared objectsL mainly used to provide primary key valueL Loading sequence values into memory improves access efficiencyTo
/*$SQL: SQL statements$pagedir: Paging Click to jump Address$page Current PageTotal $count Data$pagesize show the number of bars per page*/Function page ($sql, $pagedir, $page = 1, $count, $pagesize = 10) {$pagecode = ";$page = Intval ($page);$count
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service