Oracle Empty table Processing

Source: Internet
Author: User
Tags create index

Oracle Empty Table Processing:
1. Dynamically generate a command to assign segment to empty tables:
Sql>select ' ALTER TABLE ' | | table_name| | ' allocate extent; ' from User_tables where num_rows=0;
2. In the command window, right-click ' Mark ', copy the generated command and execute, enter.
3. Export Data:
Exp Tfgps/[email protected] File=d:\oracletemp\tfgps. DMP Log=d:\oracletemp\tfgps. LOG
4. Create a new table space and user and set a password no period:
Select name from V$datafile;
Create tablespace Nkgps datafile ' D:\APP\K2\ORADATA\TFPARAMETER\NKGPS. DBF ' size 100m autoextend on next 50m maxsize unlimited;
Create user Tfgps identified by TF default tablespace nkgps temporary tablespace temp;
Grant Connect,resource,dba,create table,create view,create trigger,create session,create sequence,create index type, CREATE procedure to Tfgps;

ALTER profile DEFAULT LIMIT password_life_time UNLIMITED;
To modify the number of login errors that have occurred:
Alter profile default limit Failed_login_attempts unlimited;

After switching login: ALTER profile DEFAULT LIMIT password_life_time UNLIMITED;
5. Import data:
Imp tfgps/[email protected] ignore=y rows=y full=y commit=y buffer=4096000 File=d:\oracletemp\tfgps. DMP Log=d:\oracletemp\tfgpsimp. LOG
To export only empty tables:
Exp Tfgps/[email protected] File=d:\oracletemp\tfgps. DMP Log=d:\oracletemp\tfgps. LOG rows=n;
Create user tablespace, Sde,grant and Enablegeodatabase

Oracle Empty table Processing

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.