Lyphtesttest SQL of System session

Source: Internet
Author: User

--Stop Session Select A.object, B.sid, b.serial# from SYS. V_$access A, SYS. V_$session b where a.type = ' PROCEDURE ' and (A.object like Upper ('%e_hoshitori% ') or a.object like lower ('%e_hoshito ri% ') and A.sid = B.sid and b.status = ' ACTIVE ';

--Stop session--alter system kill session ' 539,13863 ';

--All TABLE COL SELECT TAB. TABLE_NAME table physical name, tab_c.comments table name, COL. column_nameコラム physical name, col_c.commentsコラム name, COL.   column_id from User_tables TAB, user_tab_comments Tab_c, User_tab_columns COL, user_col_comments COL_C WHERE TAB. table_name = Tab_c.table_name and TAB. table_name = COL. TABLE_NAME and COL. table_name = Col_c.table_name and COL. COLUMN_NAME = Col_c.column_name and TAB. table_name not LIKE '%bak% '--bak TABLE and TAB. table_name not LIKE '%_20% '--bak TABLE and TAB. table_name ' view% '--view ORDER by Tab_c.comments, COL. column_id;

--? See all the use?

SELECT * from All_users; -------? See all the use?

SELECT * from User_users; --------? look at the current use?

--2.? What do you think of the role system? Limit:

SELECT * from User_sys_privs; --------? look at the current limit of use?

--3.? Look at the limits of what the character contains.

SELECT * from Role_sys_privs; -------

--4.? Look at the use?? Elephant limit

SELECT * from All_tab_privs; --------? See the operational table for use? SELECT * from User_tab_privs; --------? See the current table can be operated?

--5.? Look at the role or role

SELECT * from User_role_privs; ------? see the role of current use?

--? look at the table? Bundle conditions include: main? Outside? and index

SELECT * from user_constraints where table_name= '?    ‘; -----? See the bundle of a table?

Select Constraint_type,constraint_name,search_condition from all_constraints where Table_name= '? ‘;

SELECT * from User_cons_columns where table_name= '?   ‘; -----One of the bundles?

Select Index_name,index_type,status,blevel from user_indexes where table_name = '?   ‘; -----? See all indexes on a table

SELECT table_name, index_name, COLUMN_NAME, column_position from User_ind_columns WHERE table_name= '?    ‘; ----? look at the index?

Lyphtesttest SQL of System session

Contact Us

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: 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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.