How to use SQL * loader?

Source: Internet
Author: User
Tags how to use sql

This article is worth noting. I will try again tomorrow. Today is so tired!

How to use SQL * loader?

Dragon2> sqlldr userid = C/C control = lc2.ctl log = lc2.log bad = lc2.bad

SQL * Loader: Release 9.2.0.1.0-production on Wed Jun 4 18:03:53 2003

Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.

Commit point reached-logical record count 50

Dragon2>

The content of lc2.ctl is:

#--------------------------------------------
Load data
Infile *
Replace
Into Table LC2
Fields terminated ","
(Lcsh, lczt, lcrq, lcsj, lcgh)
Begindata
672.16,1, 20010205, 174948, 0000
672.16,3, 20010205, 174709, 0000
...
#--------------------------------------------

[06.05]: How do I know which Oracle options are installed?

Col parameter for A35

Col value for A35

Select * from V $ option;

[06.04]: How to Increase the tablespace size?

1. Increase the data file size in the tablespace:

Alter database datafile 'filename' resize NN m;

2. Add a new data file to the tablespace:

Alter tablespace tablespacename

Add datafile 'filename' size NN m;

If you do not use OMF, filename must contain detailed paths.

[06.03]: How to create an empty table?

Create Table new_table_name

Select * From old_table_name where 1 = 2;

[06.02]: 9i exp blob ORA-01555 error?

Cause 9i exp blob to appear

ORA-01555: Snapshot too old: rollback segment number with name "" too small

The error is caused by the 9i blob bug.

In general, exp ORA-01555 can be solved through the following method:

1) increase all rollback segments and do not allow automatic contraction (because we cannot control which rollback segments exp will use );

2) exp uses the consistent = N (only ensure that the data in a table is at the same time) and the direct = y parameter;

3) execute exp at the minimum number of database tasks;

4) for a super large table, you can use the query clause to batch exp the table.

[05.30]: ORA-02049 via db_link?

Hawk1:/Oracle/oracle9 $ oerr ora 2049

02049,000 00, "Timeout: Distributed Transaction waiting for Lock"

// * Cause: exceeded init. ora distributed_lock_timeout seconds waiting for lock.

// * Action: treat as a deadlock

In many cases, the distributed_lock_timeout parameter is not set. This error is often caused by a program. Of course, it is recommended that you use dbms_deffr.call and dbms_deffr_sys.push instead of direct two-stage commit.

[05.29]: Why is the connection closed?

During a test yesterday, I set nls_date_format in the local PC, but I mistakenly wrote an error and wrote hh24 as 24hh. At that time, because SQL * Plus had a ready-made connection to the database, so there is no impact. After the PC was restarted, I couldn't connect to the database no matter how it was. Every time SQL * Plus flashed, it disappeared. I couldn't see what error it prompted, I was confused. I checked the cause that I could think of, but I didn't find the problem. Then I tried tnsping (because I was always certain that the Network was okay) to tell me that the date format was incorrect, suddenly remembered.

[05.28]: 817 exp 815 error EXP-00037?

Using exp of 817 directly to export data of 815 reports a EXP-00037 error. We can use 815 exp first and then 817 imp.

[05.27]: Is Oracle9i downloaded online in the official version? If so, what does Oracle make money?

On the http://otn.oracle.com/software/content.html download is genuine, Oracle to make money in two ways:

1. selling software is no different from downloading a genuine version, but he has stated that it cannot be used for commercial purposes. If you use the downloaded software for commercial purposes, oracle reserves the right to sue you for infringement. Therefore, download is generally used for testing, or user learning. Real commercial applications will certainly be purchased.

2. selling services is the most profitable source of Oracle. Oracle companies generally consider purchasing services, because many problems can only be solved by Oracle, oracle technology experts, without the Oracle background, are hard to complete the work.

[05.26]: How to obtain the nth value in a column?

Select * from

(Select T. *, dense_rank () over (order by T2 DESC) rank from T)

Where Rank = & N;

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.