(1) CREATE TABLE spaceCreate Tablespace space NameDataFile ' e:\ filename. dat 'Size 1MAutoextend on(2) Create a user--No, No.--create user username identified by password;--grant connect,resource to user name;--grant create any view to user
Dbms_metadata.get_ddl1. Get DDL statements for a table or indexSELECT Dbms_metadata. GET_DDL (' TABLE ', ' DEPT ', ' SCOTT ') from DUAL;Select Dbms_metadata.get_ddl (' INDEX ', ' pk_dept ', ' SCOTT ') from dual;2. Get the DDL for all tables, indexes,
UNIONThe purpose of the directive is to have twoSQLThe result of the statement is merged together,You can view the results of the query you want.For example:SELECT Date from Store_informationUNIONSELECT Date from Internet_salesNote: Unionin use,two
--Standby Library StandbyFour Redolog of the main library were previously 50M sizesSql>ALTER DATABASE recover managed standby database cancel;Database altered.sql> ALTER DATABASE Add standby logfile Group One (' +data/orcldg/onlinelog/standby_group_1
Four ways Oracle increases and decreases table spaceMeathod1: Adding Data files to table spacesALTER tablespace app_data ADD datafile' D:\ORACLE\PRODUCT\10.2.0\ORADATA\EDWTEST\APP03. DBF ' SIZE 50M; Meathod2: Add data file and allow data file to
Oracle query Chinese old appeared garbled, but not all garbled, the data access layer is used by others and can not see the code, write their own C #. OracleClient is normal again.On the internet to find a plan, did not expect it!Here are the steps
To start Oracle snooping:Su-oracle>lsnrctl Status View state>lsnrctl startOracle Startup EM:Emctl start Dbconsole Launch the EM console service, you need to set the ORACLE_SID environment variable before useEmctl Stop Dbconsole stops the EM console
CREATE TABLE T (student_id number,course VARCHAR2 (Ten), score number);INSERT into t values (1, ' language ', 80);INSERT into t values (1, ' math ', 85);INSERT into t values (2, ' language ', 90);INSERT into t values (2, ' math ', 88);INSERT into t
1. Distinct usage:SELECT distiNCT a.name, a.student_id, a.sex from TABLE STUDENTThis SQL statement is from the Student table query name, school number, gender, but distinct query rule is as long as there is a difference, is eligible.Example: source
Oracle Performance Analysis 12: Object statistics
Object statistics describe how data is stored in the database. The query optimizer uses these statistics to make the correct decision. Oracle has three types of object statistics: Table statistics,
TRUNC () function usage in Oracle
TRUNC () function usage in Oracle
1. Processing date
TRUNC (date [, fmt]): truncates a date based on the fmt Format.
Select trunc (SYSDATE, 'D') from dual; -- select trunc (SYSDATE, 'mm') from dual on the first day
Script sharing for viewing slow query progress in Oracle, oracle progress
The SQL statement of a large Oracle transaction often does not know where it runs. You can use the following SQL statement to view the execution progress.
Copy codeThe Code is
Oracle displays the SQL statements in which logical and physical read resources are ranked
View the SQL statements before the first 10 logical reads:
Copy codeThe Code is as follows:Set linesize 300;Set pagesize 300;Set long 50000;SELECT *FROM
MySQL show index from table command SQL script sharing in Oracle, oraclemysql
Experiment Data initialization:
Copy codeThe Code is as follows:Create table t as select * from hr. employees;Create index inx_t1 on t (employee_id, first_name desc,
Oracle wait event DFSlockhandle
When performing a performance stress test, the test results cannot pass. The AWR Report of an hour on site is obtained and a large number of waiting events are found. The database is RAC and the version is 11.2.0.4.0.
Oracle installation and configuration process
I had to install oracle myself for the first time. I had no idea about oracle installation and configuration before, and finally finished it.
1. Install the oracle10g Server
2. Install the oracle10g
Rejected-ORA-01017 of tragedy: invalidusername/password; logondenied Error
Oracle is not installed locally. oracle client and PL/SQL Developer are installed. To visualize the oracle database.
Failed to log on when using PL/SQL login, error: ORA-01017
How to retrieve the Oracle Password
I believe most people will encounter such problems. I have also encountered such problems.First, he will ask you to enter the User name: you only need to enter connect/as sysdba, note that there is a space between
Install Oracle11gR2 in RedhatLinux
Official documents: http://docs.oracle.com/cd/E11882_01/nav/portal_11.htm
1: Basic Environment
Redhat Enterprise Linux 6.132bit
Memory: 1 GB
Disk Space: 30 GB
2: Check the packages required for Oracle 11G. If the
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