1. Introduction to Basic table space
A. system table space
Main storage data dictionary and Internal system table base table
To view the SQL of the Data data dictionary
SELECT * FROM Dict
To view the SQL for an internal system table
SELECT * FROM V$fixed_view_definitio
Label:PowerDesigner Version Information1. File-->newmodel ...2. Select modelNew ModelModel Types-->physical Data Model--Physical Diagram-->ok4. Configure the data source connectionDatabase-->configure Connections ...5. Added database Add data source--User data sources (for current machine only) (U)Next6. Create a new
Tags: Oracle user DynamicsIii. Introduction to data dictionaries and dynamic performance views1. Data Dictionary of the database(1) Dba_ data dictionary for all objects of a whole libraryOnly system users have permission queries(2
;select constraint_name, Constraint_type,search_condition, R_constraint_nameFrom user_constraints WHERE table_name = UPPER (' table_name ');Vi. stored procedures and functionsView the status of functions and stored proceduresSql>select object_name,status from user_objects where object_type= ' FUNCTION ';Sql>select object_name,status from user_objects where object_type= ' PROCEDURE ';View source code for functions and proceduresSql>select text from All_source where Owner=user and Name=upper (' pl
In Oracle, the source code of an object can be in the user_source data dictionary.
Name type nullable default comments---- -------------- -------- ------- Begin ----------------------------------------------------------------------------------------------------------------------------------------------Name varchar2 (30) y name of the objectType varchar2 (12) Y ty
;
End loop;
CLOSE c_temp;
END;
Method 2: insert into hr. job_history
Copy codeThe Code is as follows:Select * from hr. job_history as of timestamp to_timestamp ('2017-07-23 10:20:00 ', 'yyyy-mm-dd hh24: mi: ss ');
This method is simple and easy to grasp. The function is the same as the above time as the time before your misoperation, preferably close to the misoperation, because the time limit for oracle data
Label: --table backups in the Oracle database:
--BACKUP statement: After the backup, you can delete all the data sources for this table, but then someone will manipulate the table's data, but remember to restore the data table after the operation is complete.
CREATE TABLEDzhyukkt_backup as SELECT * fromDzhyukkt;--quer
First, Oracle's dictionary and Dynamic Data dictionary views can basically be divided into three levels.
1.x$ table
This section of the table is the basis for the operation of the Oracle database, which is dynamically created by the Oracle application when the database is
1.Query all tables under a user
Select table_name from all_tables where owner = 'Scott '; query all tables belonging to the Scott user
2.QueryEMPAll fields (columns) in the table)
Select * From all_tab_columns where table_name = 'emp ';
3.List the index columns of a table
Select * From SYS. all_ind_columns where table_name = 'emp ';
4.List table Constraints
Select * From all_constraints where t
Oracle uses a cursor to delete all record scripts in all user data tables. oracle cursor
Application Scenario: because the data in the database involves confidential information, we hope to delete all the data at a time and only k
Tables store information about associated databases. Only Oracle databases can read and write these tables. Most users cannot access these tables because most of the data is stored in encrypted format. The following query returns all objects in USER mode: [SQL] SQL> SELECT o
Label:Extract the contents of the tables and LOB fields in the database files in the damaged disk by using the Oracle Dul tool In a 8i library recovery, as hard disk damage caused a number of tables to have a lot of paradoxical bad blocks, trying to use Dul to mine data, when using Dul 9 encountered a problem: when a t
usersDba_sources stored procedure information for all usersDba_segments use space information for all users ' segmentsDba_extents extended information for all segments of a userDba_objects basic information for all user objectsAll base tables that the cat current user can accesstab but all base tables, views, synonyms, etc. created by the previous userDict information for all
Large data tables in the Oracle database are partitioned to improve data reading efficiency:
In PLSQL, directly add the Code:
-- Purpose: to partition and convert large table data. In this example, only 5000 pieces of data are use
// In Oracle, we can view the object definition code from the data dictionary user_source (View;// Let's first look at the structure of the user_source View:Desc user_source;Name Type Nullable Default Comments-----------------------------------------------------------------------------------------------------NAME VARCHAR2 (30) Y Name of the objectTYPE VARCHAR2 (1
The following describes how to use common data dictionaries for Oracle users by category.
I. Users
View the current user's default tablespace SQL> SELECT username, default_tablespace FROM user_users;
View the role SQL of the current user> SELECT * FROM user_role_privs;
View the system and table-level permissions of the current user. SQL> SELECT * FROM user_sys_privs; SQL> SELECT * FROM user_tab_privs;
Ii. T
Oracle Creates table partitions based on existing tables and data and imports data. Assume that the existing System. Test Table has over 10 million data records and is in the ts_Test tablespace. The table contains column A, which partitions
SQL code used to query the names and data of tables with IDs greater than 10000 in Oracle -- query the data with IDs greater than 10000 in all tables and the corresponding table name select 'select id, ''' | table_name | ''' as tablename from '| table_name | 'where id> = 100
1. Two Ways to delete table data
A. Delete * From my_table;
B. truncate table my_table;
2. Delete the entire tableDrop table my_table;
How can we recover tables accidentally dropped? In fact, Oracle also has a similar "recycle bin"
For example, you accidentally deleted the my_table table.Drop table my_table;When you use the SELECT statement to query this
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.