Some useful Oracle SQL Script constantly improve ...

zhaozj2021-02-16  91

/ / View all database objects in the Oracle database Select * from dba_objects / / View Database Objects in Committed Specific Conditions Select * from DBA_Objects Where Owner = 'user1' // View Database Version Information Select * from Product_component_version, such as output information is as follows: Product Version Statusnlsrtl 9.0.1.1.1 PRODUCLE9I Enterprise Edition 9.0.1.1.1.1.1.1.1 ProductionTns for 32-Bit Windows: 9.0.1.1.0 production // View the current database, where V $ instance is a database system one example select * from V $ iNSTANCE such as the following output: INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS PARALLEL THREAD # ARCHIVER LOG_SWITCH_WAIT LOGINS SHUTDOWN_PENDING DATABASE_STATUS INSTANCE_ROLE ACTIVE_STATE1 USP WANGPENGPC 9.0.1.1.1 07/29/2004 09:19:47 OPEN NO 1 STOPPED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL // check the database version information select * from v $ version such as the output information is as follows: BANNEROracle9i Enterprise Edition release 9.0.1.1.1 - ProductionPL / SQL release 9.0.1.1.1 - ProductionCORE 9.0.1.1.1 ProductionTNS For 32-Bit Windows: Version 9.0.1.1.0 - Productionnlsrtl Version 9.0.1.1.1 - Production // View client connection database information, such as which of which users are connected to SELECT * FROM V $ SESS Ion // Provides information about the scheduler process, such as name, URL, State, Various Statistics Tables and Index Number Select * from V $ Dispatcher

// Provide a rate of scheduler processes SELECT * FROM V $ dispatcher_rate

// Message containing the shared server message Queu Select * from v $ queue / / contains information about the shared server process SELECT * FROM V $ Shared_Server

/ / Display the current database initialization parameter information Select * from v $ parameter

// List the current database control file information Select * from V $ ControlFile, such as: status name d: /oracle9.11/oradata/usp/control01.ctl d: /oacle9.11/oradata/usp/control02.ctl D: / Oracle9.11 / oradata / usp / control03.ctl // Show current database SELECT * FROM V $ DATABASE

// Display the history archive log information in the control file Select * from V $ Archived_log

// Describe the current instance, all archive destination, and the current value, mode, and status of these goals, SELECT * FROM V $ Archive_Dest

转载请注明原文地址:https://www.9cbs.com/read-12173.html

New Post(0)