Dblink materialized view solves the lob large field problem

Source: Internet
Author: User
When writing a report, you need a table in another database to operate (table_name). However, during the operation, this table has a large field (clob. Use s

When writing a report, you need a table in another database to operate (table_name). However, during the operation, this table has a large field (clob. Use s

When writing a report today, you need a table in another database to operate (table_name). However, during the operation, this table has a large field (clob. No query is available using select * from table_name @ dblink. Always reports errors. Then I found some data on the Internet to say materialized.
When writing a report today, you need a table in another database to operate (table_name). However, during the operation, this table has a large field (clob. No query is available using select * from table_name @ dblink. Always reports errors. Later, I found some data on the Internet and said materialized view is good. Finally solve the problem

Step 1: Create the Statement on the peer database as follows (the prerequisite is that sys must be used to log on to the Peer System)

Grant create materialized view to database;

Part 2: run the table_name table command to issue the command

Create materialized view log on table_name with primary key;

Part 3: establish a connection in our own database (the following command)

Create materialized view table_name

Refresh fast start with sysdate next sysdate + 1/48
As select * from table_name @ dblink

Finally, we can see that a table named table_name already exists in the database. This table is the table for remote connection. Sysdate + 1/48 indicates refreshing every half an hour.

The sysdate + 1/1440 identifier is refreshed every minute.

If sysdate + 1 is Refresh once every day;
Sysdate + 1/24 indicates refreshing every hour
Sysdate + 1/48 indicates refreshing every half hour
Sysdate + 2 indicates refresh every two days

,

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.