In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Modify the password
Alter user DBUSER identified by 123456
Query the specific location of the data file in the tablespace
Select name from v$datafile
Query the specific location and file name of the data file in the table space, the name of the table space, etc.
Select * FROM DBA_DATA_FILES; is better than the previous one
Connection command
Conn [ect]
Usage: conn username / password @ network service name [as sysdba/sysoper]
Note: when connecting as a privileged user, you must bring as sysdba or as sysoper with you
SQL > show user
USER is "SCOTT"
SQL > conn system/oracle
Start and @
Description: run the sql script
Case: sql > @ d:\ a.sql or sql > start d:\ a.sql
Edit
Description: this command can edit the specified sql script
Case: sql > edit d:\ a.sql, which opens the file d:\ a.sql
Spool
Description: this command can output the contents of the sql*plus screen to the specified file.
Case: sql > spool d:\ b.sql and enter sql > spool off
Eg.
Sql > spool d:\ b.sql
Sql > select * from emp
Sql > spool off
Sets the width of the display line, which defaults to 80 characters
Linesize
Show linesize
Set linesize 90
Set lin 9999
Sets the number of rows displayed per page. The default is 14.
Pagesize
Use the same as linesize
Spfile parameter query:
Show parameter sga
Select name,type,value from v$parameter where name like'% sga%'
Archive log list / / View archive mode. DG must be in archive mode.
Select name from vault data; / / View the location of the data file
Select member from vault log file; / / View the log location
View the location of the control file:
Select name from v$controlfile
View the oracle version command:
Select * from v$version
1. Query all user information in oracle
Select * from dba_users
two。 Only query users and passwords
Select username,password from dba_users
3. Query current user information
Select * from dba_ustats
4. Query the view text that the user can access
Select * from dba_varrays
5. Query the text of all views in the database
Select * from dba_views
Select distinct tablespace_name from SYS.DBA_FREE_SPACE where tablespace_name like'% RB%'
Select * from dba_objects where object_name='JDE900_F0005'
Select * from rbods.jde900_f0005
Select * from rbodm.dim_company
View the current user's default tablespace
Select username,default_tablespace from user_users
View the role of the current user
Select * from user_role_privs
View the system permissions and table-level permissions of the current user
Select * from user_sys_privs
Select * from user_tab_privs
View all the tables under the user
Select * from user_tables
Display user information (tablespace)
Select default_tablespace,temporary_tablespace from dba_users
Displays the permissions for the current session
Select * from session_privs
Displays the system permissions of the specified user
Select * from dba_sys_privs
Show privileged users
Select * from v$pwfile_users
View a table whose name contains log characters
Select object_name,object_id from user_objects where instr (object_name,'log') > 0
View the creation time of a table
Select object_name,created from user_objects where object_name='ZW_YINGYEZ'
View the size of a table
Select sum (bytes) / (1024024) tablesize from user_segments where segment_name='ZW_YINGYEZ'
View the table in the memory area of ORACLE
Select table_name,cache from user_tables where instr (cache,'Y') > 0
View the number of indexes and categories
Select index_name,index_type,table_name from user_indexes order by table_name
View the fields indexed by the index
Select * from user_ind_columns where table_name='CB_CHAOBIAOSJ201004'
View the size of the index
Select sum (bytes) / (1024024) as indexsize from user_segments
Where segment_name=upper ('AS_MENUINFO')
View view information
Select * from user_views
View the name of the synonym
Select * from user_synonyms
View the status of functions and procedures
Select object_name,status from user_objects where object_type='FUNCTION'
Select object_name,status from user_objects where object_type='PROCEDURE'
View the source code of functions and procedures
Select text from all_source where owner=user and name='SF_SPLIT_STRING'
View table fields
Select cname from col where tname='ZW_YINGYEZ'
Select column_name from user_tab_columns where table_name='ZW_YINGYEZ'
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.