In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what Oracle DBA commands are commonly used for reference, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.
1) View dba users
Select * from V$PWFILE_USERS
2) View oracle version and system version
Select * from v$version
3) View the permission value DBA of the current user
Select * from session_privs
4) query the current user role
Select * from user_role_privs
5) query the current user's system permissions
Select * from user_sys_privs
6) View all user passwords hash
Select username,password from dba_users
7) check system permissions
Select * from dba_sys_privs where grantee='SYSTEM'
8) this permission is required when you cannot log in to OEM
Grant select any dictionary to system with admin option
9) View single user password in lower version
Select name,password FROM user$ Where name='SCOTT'
10) View user hash
Select username,decode (password,NULL,'NULL',password) password FROM dba_users
11) create user bob password iloveyou
Create user bob identified by iloveyou
12) Grant bob DBA permission
Grant dba to bob
13) assign execute to the user
Grant execute on xmldom to bob
14) when prompted to use role 'JAVASYSPRIV' does not exist
Create ROLE "javasyspriv" NOT IDENTIFIED
15) check which users have DBA privileges
Select grantee from dba_role_privs where granted_role='DBA'
16) View the directory where the path is located
Select * from dba_directories
17) create tablespaces
Create tablespace risenet
2 datafile'C:\ ORACLE\ ORADATA\ TEST\ risenet.dbf'
3 * size 400m
18) change the user's default tablespace
Alter user risenet default tablespace risenet
19) check whether the table is in the default tablespace
Select table_name,tablespace_name from user_tables
20) View the session of the user's connection
Select sid,serial#,username from v$session
21) the database is open and in a read-only state. It can only be queried, but cannot be added, deleted or changed. It is generally used in maintenance.
Alter database open read only
22) change to archiving mode
Alter database archivelog
SQL > archive log list
SELECT DBMS_METADATA.GET_DDL ('TABLESPACE', TS.tablespace_name)
FROM DBA_TABLESPACES TS
Thank you for reading this article carefully. I hope the article "what are the common commands of Oracle DBA" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.