How do I view the ORACLE alert log? 1th/2 page _oracle

Source: Internet
Author: User
Tags create directory table definition
1. Understanding Oracle External Tables
External table Definition: The structure is stored in the data dictionary, and the table data is placed in the OS file in the table
Role: Querying the database for OS file data and loading OS file data into the database
Differences from other tables: DML operations cannot be performed on external tables and indexes on external tables can only be performed with the Select exercise
2. Build a simple external table 1. Build a file on the OS
Because the external table is primarily to view files on the OS, first build a file on the OS
Mkdir-p/oracle/ext
Vi/oracle/ext/ext.dat
10,20,30
40,50,60
70,80,90

2. Grant user permissions and create directory objects

Here we first build a new user


Create user test identified by ' 123 ' default tablespace test quota unlimited on test;

User authorization


Sql> Grant Create any directory to test;

Create a directory Object


Sql> Conn test/123
Connected.
Sql> Create directory ext as '/oracle/ext ';
Directory created.

3. Create an external table
sql> Create table exttable (
ID number,name varchar2 (a), I number
) Organization External
(Type Oracle_loader
Default directory Ext
  Access Parameters
(Records delimited by newline
Fields terminated by ', '
) Location (' Ext.dat ')
);

4. Test


Sql> select * from Exttable;
ID NAME I
---------- ---------- ----------
10 20 30
40 50 60
90

Test is successful, visible in the database can query the OS file data

Current 1/2 page 12 Next read the full text
Related Article

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.