Oracle FAQ (7)

Source: Internet
Author: User

Oracle FAQ (7)

61. Oracle cannot be detached under Windows 7 and XP. What should I do?
If it cannot be uninstalled, delete it manually. First, make sure that you have logged on to the account with the Administrator permission, go to the Registry (regedit), and delete all keys under HKEY_LOCAL_MACHINE \ SOFTWARE \ ORACLE. HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services, HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Eventlog \ Application Delete All oracle-related items, delete the C drive \ Program Files \ Oracle directory and all the Files and folders under the oracle installation directory, delete the oracle directory under the program file under the C drive, and delete the oracle Home Directory, finally, restart the machine to complete the uninstallation.

62. What does ACID in Oracle mean?

ACID refers to the abbreviation of four basic elements for correct execution of database transactions. Includes: Atomicity, Consistency, Isolation, and Durability ). A database system that supports transactions must have these four features. Otherwise, data correctness cannot be ensured in the Transaction process (Transaction processing, the transaction process cannot meet the requirements of the transaction party.
A (Atomicity): All the operations in the entire transaction are either completely completed or not completed, and it is impossible to stop at A stage in the middle. When a transaction encounters an error during execution, it will be rolled back to the state before the start of the transaction, just as this transaction has never been executed.
C (consistency): The integrity constraints of the database are not damaged before and after the transaction starts.
I (isolation): The isolation status executes transactions, making them seem to be the only operations performed by the system within a given period of time. If two transactions run at the same time and perform the same functions, the isolation of the transaction will ensure that each transaction is considered to be only the transaction in the system. This type of attribute is sometimes called serialization. To prevent confusion between transaction operations, requests must be serialized or serialized so that only one request at a time can be used for the same data.
D (persistence): after the transaction is completed, the changes made by the firm to the database will be permanently stored in the database and will not be rolled back.

63. What is Oracle listening?
When a user logs on to the database, the user process sends a request. The server listening program listens to the user process request and uses listener. ora checks the user connection information. If yes, it starts a server process and delivers the user process directly or indirectly to the server process.

64. Under what circumstances do indexes need to be created?

When you need to create an index:

(1) columns that are frequently queried.

(2) columns used as primary keys.

(3) columns frequently used for connection, mainly foreign keys.

(4) columns frequently searched by range.

(5) columns that need to be sorted frequently.

(6) columns in the where clause are often used.

Note:

(1) Pay attention to order when creating a composite index. That is, the order of the index should be consistent with that of the field after the where clause.

(2) The sorting order of fields after the Where clause. The first column must be the most frequently used column.

(3) If the three fields col1, col2, and col3 are indexed, use select... where col1 = *; select .... Where col1 = col2 = col3 is highly efficient. However, if you reverse the order or use a non-starting column, the efficiency is significantly reduced.

65. What are the naming rules for indexes?

Index naming rules:

Primary key Index: pk_table name_column name

Unique key index: UK _ TABLE name_column name

Normal index: IND _ TABLE name_column name

Note: The name of an index cannot exceed 30 characters (the name of the column in the index can be abbreviated. Generally, the name of the table in the index is not abbreviated)

66. to intercept A field A, the value in A is the name of many banks, such as the Agricultural Bank of China ***** Shanghai Sub-branch, now, we only need to extract the "Agricultural Bank of China". We cannot use digits to intercept it because some banks do not have 6 Characters in name. How can we intercept it?
Select substr ('agricultural Bank of China Shanghai Subbranch ', 1, INSTR ('agricultural Bank of China Shanghai Subbranch', 'bank') + length ('bank')-1) FROM TAB_NAME;

67. Run the following SQL statement: select round (0.456, 2) from dual; the result is. 46 instead of 0.46. How can this problem be solved?
Use select to_char (round (0.456, 2), '0. 00') from dual to convert the format.

68. Can the Data Pump be used on the client?

EXPDP/IMPDP is a server-side tool that can only be used on the Oracle server, but not on the Oracle client.

69. What are the differences and relationships between stored procedures and triggers?

A trigger is a special stored procedure. The difference is that the stored procedure needs to be called manually, and the trigger does not need to be called. It will automatically execute some operations during execution. Another point is that the trigger creation does not contain parameters. The second is that the stored procedure can contain parameters or not.

70. How to check which character set is used by the database?

Select * from sys. props $ where name = 'nls _ CHARACTERSET ';

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.