To: "Laurie A. Corsi"
On Sat, 10 Jul 1999, Laurie A. Corsi wrote: > Ari, > > I'm so happy to have found your web page - I cannot believe that you are
> only 27 yrs old!! Dare I ask a question of you during baseball season? Here
> goes...can you provide an outline/steps for me to follow in an effort to
> create a small database out of an existing (much) larger database? On
> Monday(7-12), I'm going to install Oracle on an NT box and then import all
> required tables (structures only), forms, reports, pl/sql scripts to create
> a small DB from a large DB. This project is a requirement for my employer,
> however, the supervisor and DBA is viewing this as a training tool for me
> as well. The purpose is for me to become "intimate" with our site DB.
> Anyway, after looking through all of the wonderful tips that this site
> has to offer, was wondering if simply making a copy of the DB and deleting
> the unnecessary applications from the copy would be the most direct route
> to accomplish this task. Please help and many thanks. > > Laurie > Laurie, ( I am blushing) thanks for your warm email. I wish you luck in your new position. Yes, the most direct way is to do a direct copy and delete unwanted records. Then export the smaller data, truncate all tables, and import the data again. Otherwise, the tables will take up the same space, with "deleted" records in your Oracle blocks. The downside to this is that you will need the same amount of space to start out with as your original database. If this is not an option, you can issue: CREATE TABLE smaller_table AS SELECT * FROM larger_table@larger_database WHERE ROWNUM < 5000; This will create in the smaller database (assuming that this is where you are connected to) a table just like the larger table, but with 4999 records (<5000). You can do this for each table. Be sure to bring in the procedures, grants, views, etc. from the larger database with an export/import. Also, you need to have either a database link or GLOBAL_NAMES in your init.ora set up properly. Best regards, -Ari Kaplan Independent Oracle DBA Consultant <-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-> <-> For 310+ Oracle tips, visit my Web Page: <-> <-> <-> <-> http://www.arikaplan.com <-> <-> <-> <-> email: email@example.com <-> <-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
Back to Ari Kaplan's Home Page
="../index.htm"> Back to Ari Kaplan's Home Page