How can I close an Oracle database? The following describes the three most common methods for shutting down an Oracle database.
1. Close normally
The option used to close the database normally is normal. Before the database is closed, all
1. view the tablespace size and maximum value of undo.Select t. file_name, t. tablespace_name,T. bytes/1024/1024/1024 "GB", t. maxbytes/1024/1024/1024 "Max GB"From dba_data_files t where t. tablespace_name = 'undotbs1'Data
Problem description: an error is reported when the client connects to the database.
ORA-12516: TNS: Listeners cannot find available handles matching protocol stacks
Solution Process:
1. Check the current session count, processes, and sessions values,
1. Transaction concept:Concept: transactions in databases are logical units of work. A transaction is composed of one or more SQL statements that complete a group of related behaviors, the transaction mechanism is used to ensure that the operations
Due to accidental deletion of Oracle table data, the data may be very important. How to quickly restore the data so that the supervisor does not discover it can write a stored procedure to restore the data at the previous time of data
// Let's take a look at the authorized binary tree below. The actual point is a diagram (complex diagram ):Sys/\Test001 (dba) test002 (dba)/\\T1 t2 t3--// As shown in the preceding Binary Tree, assume that both test001 and test002 are granted dba
1. First install a Library:
Sudo apt-cache search libaioSudo apt-get install libaio-dev
2. Add users and user groups after installation:
Sudo groupadd mysqlSudo useradd-r-g mysql
3. decompress the mysql package:
Cd localSudo tar zvfx service1/mysql-5
When testing Oracle, I would like to test the performance of using asynchronous IO. But asynchronous IO requires special configuration, otherwise, it is easy to encounter a very famous "ORA-01578: ORACLE data block parallel upted (file #202, block #2
Checking Network Configuration Requirements...
Check complete. The overall result of this check is: not executed
I checked it on the Internet and many of my friends encountered this problem, but it was easy to solve it.
You only need to install
In JUnit, foreign keys are generally not required. However, the foreign key has been created during the database generation process, which is troublesome for adding, deleting, and modifying data. Follow these steps to invalidate or take effect of
Use an Oracle user to access the database
Sqlplus/nologConn/as sysdba1. Create a userCreate User orcldba Identified by zcs001;
2. Create a roleCreate role orclrole;
3. Authorize a roleGrant create session to orclrole;Grant select on v _ $ sysstat to
1. SQL statement 1:
-- 1. view the table space name and size.
SELECT t. tablespace_name, round (SUM (bytes/(1024*1024), 0) ts_size
FROM dba_tablespaces t, dba_data_files d
WHERE t. tablespace_name = d. tablespace_name
Group by t.
1. Automatic Backup
You can use the exp method (provided that you have the export permission) and write a script for the operating system. If you have a windows system, you can write a bat file and use exp to export it, then, add BAT to the
[DDL]
Create table
Alter table
Drop table delete table
Truncate table delete all rows in the table
Create index
Drop index Delete index
When a DDL statement is executed, Oracle submits the current transaction before and after each statement.
1. Install the instantclient package:
Instantclient-basic-linux-x86-64-11.2.0.2.0.zip Basic Package
The instantclient-sdk-linux-x86-64-11.2.0.2.0.zip connects to the db using c or perl
Instantclient-sqlplus-linux-x86-64-11.2.0.2.0.zip sqlplus
2.
Oracle does not have a hexadecimal to binary function. For ease of work, I wrote
Create or replace function hex_to_bin (hex varchar2) return varchar2 isV_hex varchar2 (10000 );V_len number;V_var varchar2 (10000 );V_result varchar2 (10000): =
SQL>Select*FromT;
IDNAMESCORE
------------------------------
3. smith 100
4. smith 100
5 jerry 80
6 tom 80
1. evan 100
2 evan 100
Seven evan 100
You have selected 7 rows.
SQL> ed tmp. buf
SQL>-- Obtain all records, but names and
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