Create and use Oracle DBLINK
How to create? How to use it?
Describes how to create and use Oracle database links.
A simple application scenario for Oracle DBLINK
If there are two Oracle databases, one day the business needs to make the data of one
Today, we see this RMAN backup script in the company's database:
Run {Allocate channel c1 type disk maxpiecesize = 2G;Allocate channel c2 type disk maxpiecesize = 2G;Backup incremental level 1 database format'/backup/osedb_osedb01/data/% d_DF _ % T _
There are two tables: book and book_copy. You need to delete all the records in the book table that are equal to each other according to some fields in the book_copy table.
The stored procedure is as follows:
Create or replace procedure
In fact, the main problem is to automatically start the Oracle service. There are also many examples on the Internet, but the success may not be achieved according to the example, next, let's take a look at the issues in the configuration process
In practice, you need to replace the content of a field in a table in batches. The general thinking process is as follows:
SELECT
Replace str_replace
UPDATE write
In fact, this is a waste of resources and resource consumption. MYSQL has a
Grid plug-and-play (GPnP)
Grid plug-and-play is used to help administrators maintain clusters. Some manual operation steps required to add or delete nodes can now be automatically implemented by GPnP.
GPnP is not a separate concept. It relies on the
BecauseAUD $Audit-related tables such as tables are stored inSYSTEMTherefore, to avoid affecting system performanceSYSTEMTablespace.AUD $Move to another tablespace. You can use the following statement to move:
Oracle@www.bkjia.com ~ $
Today, the developer asked me how to see which tables a table references or which tables are referenced by a table. It is best to display the tables in the form of charts (ergraphs, I started to want to open it through TOAD or other tools, but
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
First, you can use dbms_flashback.get_system_change_number to obtain the current SCN value of the system:
SQL> col scn for 9999999999999SQL> select dbms_flashback.get_system_change_number scn from dual;SCN--------------8908390522972
You can use the
Physical Reads (Physical read ):
The logical read content is in the memory and does not need to be read from the hard disk.
The formula is as follows: Physical Reads = db block gets + consistent gets;
Logical Reads (Logical read ):
Physical reading
[Root @ Oracle9i mysql] # cp support-files/mysql. server/etc/init. d/mysql[Root @ oracle9i mysql] # chmod + x/etc/init. d/mysql[Root @ oracle9i etc] # chkconfig -- list mysqlService mysql supports chkconfig, but is not referenced in any runlevel
Recently, a field value of a character type in the Oracle database was used to convert it to a number and save it to another new field. Oracle has a ToNumber function, however, it should be noted that this function can only convert the string format
Open PL/SQL Developer today and see the "ORA-12154: TNS: unable to resolve the specified connection identifier" error, which can be connected before, is to connect to my local machine.
View listener-enabled;
The configuration of the tnsnames. ora
The Oracle task here refers to the Oracle process or a series of business operations set for short,
If the task execution time is too long, you usually need to connect to the database from the system background and execute the specified Oracle task.
Problem description: another small problem today: After adding two new fields to a table, the query speed is obviously slow.
We suspect this is caused by row migration. If you try to move it, it will be OK.
Impact of row migrationIf you read this
// Create a temporary tablespace
Create TemporaryTablespace test_temp
Tempfile'E:/Oracle/product/10.2.0/oradata/testserver/test_temp01.dbf'
Size32 m
AutoextendOn
Next32 m maxsize 2048 m
Extent managementLocal;
// Create a data table
The control file is a very important file. Only when the instance reads the control file can it be mounted. One principle of DBA is multi-channel control files. Today I did an experiment and learned this.
The Code is as follows:
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