Data operations performed by common users in the readonly and readwrite statuses of databases in Oracle

Source: Internet
Author: User
To prevent user processes from modifying data in the Oracle database, you can set the database status to read-only. The SQL statement is as follows: startupmountalterdatabaseopen

To prevent user processes from modifying data in the Oracle database, you can set the database status to read-only. The SQL statement is as follows: startup mountalter database open

To prevent user processes from modifying data in the Oracle database, you can set the database status to read-only. The SQL statement is as follows:

Startup mount
Alter database open read only;

[Note: The alter database *** command must be executed when the database is in the mount State. If the database has been started, shutdown is required first]

Then, perform the following operations to log on to the scott/tiger User:

Run sqlplus/nolog -- cmd
Conn scott/tiger; -- connect to the scott account

When executing the delete operation, the following results will be displayed. [dept table is used as an example here. It serves the same purpose as executing the following emp table. Please explain it to yourself ]:

When the database status is changed to read write

Execute the delete operation again. The result is as follows:

[PS: Because the database instance is restarted, the previous session ends. You need to disconnect and log on to the scott account again ..

After I delete the data, the database should not be written without the commit operation, but the data in the data buffer zone has been deleted. This is dirty data]

Quick Response after Oracle accidentally deletes table data

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.