In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
First, connect to the database
1. Start SQL*PLUS but do not log in
Sqlplus / nolog
2. Connect with Oracle in SYSDBA role
Connect username/password as sysdba (provided the user has sysdba privileges)
3. Directly use SYS user l to connect to the database
Sqlplus / as sysdba
2. Start the instance
1 > start an instance, assemble and open a database
STARTUP; or STARTUP PFILE='d:/oracle/admin/mydb/scripts/initMYDB.ora'
2 >. Start an instance without assembling the database-- typical applications create a database
STARTUP NOMOUNT
3 > start an instance, assemble the database but do not open it
This mode allows you to perform specific maintenance operations, including renaming the database, adding, deleting or renaming log files, enabling and disabling the option to redo archive log files, and performing a full database recovery
STARTUP MOUNT
4 > restrict the access of a database at startup
-- this mode makes the database available to administrators, but not to general operators. It is used to perform import and export, perform data loading of SQL*loader, and temporarily prevent typical users from using data upgrade or upgrade. In normal mode, users with CREATE SESSION system privileges can connect to the database restricted mode, while users with both CREATE SESSION and RESTRICTED SESSION system privileges can access data.
STARTUP RESTRICT
-- change the running normal mode to restricted mode
ALTER SYSTEM DISABLE RESTRICTED SESSION
-- turn off the restricted mode
ALTER SYSTEM ENABLE RESTRICTED SESSION
5 >. Force an instance to start (for problems during startup, use less, use with caution! )
STARTUP FORCE
6 >, start the instance, assemble the database and start the full media recovery
STARTUP OPEN RECOVER
Change the availability of the database
1 >, assembly database
ALTER DATABASE MOUNT
2 >. Open the database
ALTER DATABASE OPEN
3 >, open the database as read-only or write-only or read-write
ALTER DATABASE OPEN READ ONLY
ALTER DATABASE WRITE READ ONLY
ALTER DATABASE OPEN READ WRITE
IV. ORACLE database shutdown
1. Close normally
SHUTDOWN NORMAL
2. Transactional shutdown
New connections are not allowed, but wait for the execution of the existing transaction to finish
SHUTDOWN TRANSACTIONAL
3. Close immediately
SHUTDOWN IMMEDIATE
4. Forced shutdown
-- this mode is disabled and the instance recovery process will be performed the next time it is started.
SHUTDOWN ABORT
5. Pause the database
-- usually used for 24-hour business without interrupting user operations or database operation, which is less expensive than shutting down the database. In this state, only DBA sessions are allowed and no new non-DBA connections are allowed.
ALTER SYSTEM UNQUIESCE
-- cancel the pause
ALTER SYSTEM QUIESCE RESTRICTED
-- View the pause status of the instance
SELECT ACTIVE_STATE FROM V$INSTANCE
The status of the query:
NORMAL did not pause
QUIESCING is halting, but there are still non-DBA sessions
QUIESCED has stopped
6. Suspend the database (generally not used)
-- suspend all IO for data files and control files. Backup can be performed without IO interference. Suspend command suspends the database without specifying an instance.
ALTER SYSTEM SUSPEND
-- return to a non-pending state
ALTER SYSTEM RESUME
-- View pending status
SELECT DATABASE_STATUS FROM V$INSTANCE
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.