Install Oracle in Linux X window, the pop-up Oracle interface is garbled (square) Reason: Oracle installation default no Chinese language pack, only in English.
Solve:
1. Temporary Solution:
The code is as follows
Copy Code
Using the callback interface in the Ibatis framework can also achieve bulk operation of the data, reduce the number of accesses to the database and improve performance. Here is an example of using the Ibatis framework to bulk INSERT data into an
System permissions (Database system privilege) allows users to perform a specific set of commands. For example, the CREATE TABLE permission allows a user to create a table, and grant any privilege permission allows the user to grant any system
Usage
1.TRUNC (for dates) Date action
The date value that the Trunc function truncates for the specified element.Its specific syntax format is as follows:TRUNC (Date[,fmt])
which
Date valueFMT the date format, which is truncated by the specified
The most commonly used is the method one:
The code is as follows
Copy Code
SELECT * FROM (select RowNum as RN, src.* from tab SRC) DataSet Where rn> and rnMethod Two:SELECT * FROM (select RowNum as RN, src.* from tab
Format as year, accurate to-----years
For months, accurate to------year, month (no matter which year, as long as the same month and which day)For the day, accurate to------year, month, day (no matter which month, only care about the day)
1.TRUNC
Sometimes using Oracle's database, you need to judge when inserting data. For example, each person can only write one article per day.In the insertion of the time to make a judgment, check whether there is a person on the day of the operation of the
To query for a short period of time can be from v$sql or V$sqlarea if you want to query a week or one months then there may be in the V$sqlarea can not find! The following is obtained through the historical Dba_hist_sqlstat, which is retained by
I. Use the ntpdate command
1. When the server is linked to the extranet
# CRONTAB-E
Join a line:
*/1 * * * * ntpdate 210.72.145.44
210.72.145.44 for China National Time Service Center server address, so that the machine every 1 points can be
We know that executing a SELECT statement directly does not open a transaction, so how do I open a read-only transaction?
The code is as follows
Copy Code
--Demo read-only transaction --Creates a table CREATE TABLE t_
ALTER table: Add, modify, delete table columns, constraints, and other table definitions.
View column: Desc table name;
Modify table name: ALTER TABLE T_book Rename to BBB;
Add column: ALTER TABLE name add column name varchar (30);
Delete column:
To switch the physical library to the read only state, you can use the following steps
The code is as follows
Copy Code
Sql> select status from V$instance;STATUS------------MountedSql> select Database_role from
The main contents of this article include: Implement the self-amplification ID in Oracle, delete the duplicate record in the data tableI. Self-Amplification ID
1. Create sequence firstCreate sequence Seqmax increment by 12. Get an IDSelect
1. How to start Oracle Listening and instance automatically when Linux starts
Modify the/etc/oratab file with the following command:
[oracle@oracle11g ~]$ Vi/etc/oratab
Found: Accp:/u01/oracle:n modified to: accp:/u01/oracle:y
Step Two: add
Example: delete user abc,First, log on to the database as a sysdba user.$ Sqlplus/as sysdbaDelete User abcSQL> drop user abc cascadeNote: If the user abc is deleted, the schema objects under the user is deleted, and the corresponding tablespace is
For Oracle DBAs, network configuration may be short. If Oracle databases are deployed in the public cloud, a DBA is almost required to become a full-stack engineer, because you do not need to install the network infrastructure, simple network
1. Stored Procedure1. Basic structureCREATE OR REPLACE PROCEDURE(Parameter 1 in number,Parameter 2 IN NUMBER) ISVariable 1 INTEGER: = 0;Variable 2 DATE;BEGINEND stored procedure name2. SELECT INTO STATEMENTSave the result of the select query to a
The customer has a tablespace with a lob object and wants to move the tablespace. However, after moving, the tablespace of the lob object found in dba_lobs is still in the original place.Create table SCES1INPUTS(CODREQUEST VARCHAR2 (9 BYTE) not null,
A simple table is used. mysql and oracle use the same table structure and have only three Fields. The structure is as follows:Mysql table structure:Create table board (Board_id smallint (6) not null auto_increment,Board_name char (16) not null,Board_
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