Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of sqlldr

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Import the txt text method in the oracle database, such as now you need to import the data from t_user_mobile_list.txt into the oracle database tweak username mobile _ list table.

1. First, you need a ctl file.

The ctl file format is as follows:

Load data

Infile *

Append into table t_user_mobile_list-the name of the inserted table

FIELDS TERMINATED BY','- files are separated by', 'split FIELDS TERMINATED BY WHITESPACE spaces

TRAILING NULLCOLS-null is allowed if the field of the table does not have a corresponding value

(subid

Smbms

Productcat

Sub_type

Create_time date "YYYY-MM-DD HH24:MI:SS"-data type fields need to be formatted

Part

Submit_flag

Name)

If the corresponding field is empty, it may not appear in the corresponding column!

two。 Execute the Sqlldr command

Sqlldr userid= "smb/czty_smb@zsms"-specify the database

Control= "t_user_mobile_list.ctl"-ctl files produced in the first step

Data= "t_user_mobile_list.txt"-the txt file to be imported

Log= "t_user_mobile-list.log"-write information to the log

Note:

1. When you execute this command, put the imported file and the crl file in the same directory

2. Sqlldr can only import 500w lines at a time. If the imported file exceeds 500w lines, split the file into multiple files before execution. Split command: split file name-l 3000000 fee (prefix)-divides the file into N files on 300w lines

Shell script execution

Ctl file

File

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report