Environment: Oracle10g, Red Hat 4, Oracle running in archive mode.
Simulation Scenario: The user01.dbf data file is corrupted, and the database recovery is disabled.
Procedure:
1. perform a full-database cold backup to back up control files, data
Environment: Oracle10g, Red Hat 4, Oracle running in archive mode.
Scenario: the data file user01.dbf is damaged and can be recovered when the database is opened.
Procedure:1. Delete the user01.dbf file to simulate that the data file is corrupted.
1. Create a directory to save the backupMkdir/u01/oracle/oradata/archiveChown-R oracle/u01/oracle/oradata/archive2. Switch to an oracle userSqlplus/nologConnect/as sysdba3. Set the target address of the archived log
Check whether the database is in
Package name
Baotou File
Description
Dbms_aleri
Dbmsalrt. SQL
Asynchronous processing of database events
Dbms_application_info
Dbmsutil. SQL
Register the name of the currently running application (for
ORACLE was originally designed to be transaction-based, so it won't be authentic in terms of processing analyticdb. Recent developments in ORACLE related technologies have gradually adapted to OLAP needs.1 partition technology 2 compression
Using oracle control files to store large amounts of data into the database is much more efficient than SQL script files.A m data file, the ctl file is stored in about 20 mins, and the SQL script file takes about 2 hours. To use the ctl control file,
SQL> connect user name/Password
02 (successful, the connection is displayed .)
03
04/****** modify the http service port ******/
05 SQL> call dbms_xdb.cfg_update (updateXML (dbms_xdb.get _get (),
The user status changes to the resignation status, the system configuration table is triggered, and the configuration table status is modified.Create or replace trigger BASEDB_USERLEFTBefore update or delete on basedb_usersFor each rowDeclare--
Four features of transactions: ACID· Atomicity: all actions in a transaction either occur or do not.· Consistency: A transaction changes a database from a consistent state to one of the following.· Isolation: the impact of a transaction is invisible
Two concepts are explained first:· Consistent read: the row to be modified is the Consistent read.· Current read: Get the block to actually update the row to be modified. The obtained result is the Current read.The tkprof report shows the
Output query content to text
Set echo off pagesize 0 heading off feedback off termout off
Spool test. SQL
Select count (*) from user_tables;
Spool off
After the preceding script is executed, the query content is output to test. SQL.
The set
ORACLE cursor Traversal
-- Created on 2011-10-9 by HUCHANGKUN declare -- Local variables here CURSOR C_EVENT is select t. eventname from T_Event t; temp T_Event.EVENTNAME % TYPE; begin -- for traversal cursor for temp in C_EVENT Loop dbms_output.put_
Oracle table common query Experiment (2) Common query experiment of Oracle table (1) http://www.bkjia.com/database/201309/242198.html
1. query the total names of all employees, SAL and COMM. Select ename, sal + nvl (comm, 0) "sal-and-comm" from emp;
Note: SID-Database ID HOME_NAME-oracle Home Name, such as OraHome92 and OraHome81 (1) OracleServiceSID Database Service, this service automatically starts and stops the database. If a database is installed, its default start type is automatic. The
Solve the paging error caused by inconsistent sorting fields using rownum in oracle. Recently, when I wrote a list component ulynlist, I detected a problem and recorded it here. Today, when I called the list component, I tried to lower the number of
After flashback drop, if the tablespace is insufficient, you can directly Delete the table occupied by the table in the recycle bin. After the demo DROP table, you can also find the table from the recycle bin, however, in DBA_FREESPACE, the space of
In this example, we will shorten the downtime during Oracle database migration and use the export/import method to perform the steps for fast application database migration, we do not focus much on the detailed steps of export/import or database
When dbms_stats Imports and Exports table statistics in SQL tuning, incorrect or outdated statistics result in incorrect execution plans being used. Of course, in this case, we can collect the latest statistics to achieve the goal of optimization.
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:
info-contact@alibabacloud.com
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