Create table test(Id int unsigned not null PrimaRY KEY AUTO_INCREMENT,Username VARCHAR (15) NOT NULL)AUTO_INCREMENT = 100;
In database applications, we often use unique numbers to identify records. In MySQL, The AUTO_INCREMENT attribute of the data
Recently, we have been porting SQL to Oracle. Since Oracle does not have the same Identity column as in SQL, we have encountered a lot of trouble, recently I encountered a stored procedure for deleting data based on the values of the
Use log mining to restore accidentally deleted tables, data, and views from incomplete Oracle recovery
/*--------------------------
Prerequisites:
1. DB works in archive mode;
2. Prepare cold data files;
---------------------------*/
Col
Background:
The PostgreSQL server runs on RedHat Linux and the IP address is 192.168.230.128.
The client is installed on Windows XP with the IP address 192.168.230.1
Configuration method:
1. Modify the/opt/postgresql/data/postgresql. conf file on
In exp and imp, there is no syntax for exporting only stored procedures. If a user's data is exported, all objects (tables, views, indexes, sequences, functions, stored procedures, triggers, etc.) of the user will be exported ).
If only all stored
Expdp and impdp can be used in Oracle 10 Gb.When impdp is used to copy remote data through db_link,If the version of the source database (such as Oracle10.2.0.1.0) is higher than that of the target database (such as Oracle10.1.0.2.0.
The following
Running Environment CentOS 5.6 Hadoop hive
Sqoop is a tool developed by clouder for hadoop technology support to import and export data between relational databases, hdfs, and hive.
Read more: Sqoop configuration and installation
1. Install sqoop
The most important task for a database administrator is to ensure that the database does not lose data. The redo and revoke mechanisms ensure that the database will never have a commit error no matter what operations the DBA has performed. However,
Copy patch filesThe patch number for Oracle11.1.0.7.3 is 9352179, and 9776431 is a problem patch Based on 11.1.0.7.3. Copy the patch file to/opt/orabak. The directory structure is as
For more information about how to modify the database name in Oracle, see step by step.
My friend asked me how to change the database name over the past two days, so I made a test and recorded it to illustrate the problem.How to modify the Database
-- Create a storage process for batch SMS dump and transfer sent SMS messages to the SMS History TableCreate or replace procedure PUB_SHORTMSG_ARCH_BAT
As
MSG_ID pub_shortmsg_td.shotmsg_id % type;
Cursor cur_msg is
Select shotmsg_id from
The Oracle version in this document is 11.2.0.1. No OEM was installed before. An error is reported when dbca is used for installation today. The error page is as follows:
I have previously reviewed an OEM reconstruction method:
Oracle OEM
When updating a table, Oracle will add a tmlock to the table before submission to ensure that the table structure will not change.At this time, if another session executes the alter or drop command on the table, the following error message is
PRAGMA is a Compilation instruction (or command ). Compilation instructions are processed during compilation. They are not executed at runtime. Compilation instructions are special commands issued to the Compilation Program. It is also called a
How to Use the sys as sysdba permission to connect to the database for Exp/Imp:
Windows:Exp 'sys/change_on_install @ instance as sysdba 'tables = scott. emp
Unix or Linux (you need to 'escape 'the single quote ):Exp/'sys/change_on_install @
A new database was created in Oracle, And it was deleted today and then logged on to SQL * PLUS won't be logged on, with the ORA-12560: TNS: protocol adapter error.
Solution to ORA-12560: TNS: protocol adapter errors
There are three reasons for the
Abstraction of Oracle's Structure System
An avid photographer-happy family of Old Wang
The first chapter of each ORACLE book generally introduces the structure and system of ORACLE. When this chapter is opened, readers will suddenly fall into an
# Set the execution encoding format to prevent garbled Characters During Chinese Export
Export NLS_LANG = "AMERICAN_AMERICA.UTF8"
# Load the Oracle client program to the environment variable. Note: This line must be added if the script is placed in
1: Generally, most of the codes used to access the database using the Hibernate Session are the same, as shown in the following two methods,
// Query the Teacher operation
Ublic Teacher getTeacher (Long id) throws DataAccessException {
1: get/load access to a single piece of data
Public Teacher getTeacherById (Long id ){
Return (Teacher) this. hibernateTemplate. get (Teacher. class, id );
}
Public Teacher getTeacherById (Long id ){
Return (Teacher) this.
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