Re: I need to insert test data into my database. HOW???
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Platform-Specific Issues
Umm:
o write a small "C" program to generate a pipe delimited sample data file
and LOAD it in dbaccess or dbload.
o Write a small ESQL/C program to generate sample data rows and insert them
into the table(s).
o Write a small 4GL program ....
o Buy a sample data generating program for a small fortune and ...
You get the idea. Unless that's not what you are asking?
Art S. Kagel
News reader wrote:
>
> Hi,
> We are at the testing phase of a project and want to enter some test
> data. Ideally, we'd like about 5 million rows in our main tables. Is
> there an easy way to do this.
>
> We are using Informix 7.3 on Solaris
>
> John P.
Simplest way:
If you have ODBC for Informix, set up an ACCESS linkage to both dbs and
do an append to query.
Next Simplest (maybe):
Generate a flat file from Informix for the data, then use BCP to load
the data to SQL Server
After this, what language are you comfortable programming in? :}
In article <39BE8B31.56DB01A1@bloomberg.net>,
kagel@bloomberg.net wrote:
> Umm:
>
> o write a small "C" program to generate a pipe delimited sample data
file
> and LOAD it in dbaccess or dbload.
>
> o Write a small ESQL/C program to generate sample data rows and
insert them
> into the table(s).
>
> o Write a small 4GL program ....
>
> o Buy a sample data generating program for a small fortune and ...
>
> You get the idea. Unless that's not what you are asking?
>
> Art S. Kagel
>
> News reader wrote:
> >
> > Hi,
> > We are at the testing phase of a project and want to enter some test
> > data. Ideally, we'd like about 5 million rows in our main tables. Is
> > there an easy way to do this.
> >
> > We are using Informix 7.3 on Solaris
> >
> > John P.
>
--
Joseph R.P. Maloney, CCP,CSP,CDP
MPiR, Inc.
502-451-7404
some witty phrase goes here, I think.
Sent via Deja.com http://www.deja.com/
Before you buy.
Thanks for the reply. However, writing a program will take long. Besides, we need to input lots of rows. We also need to maintain the relationships among the tables, that is foreign keys should not be violated. We don't mind spending a couple of hundred dollars if we can get an off the shelf program to do this. Thanks about the suggestion of using winsql. I will give that a try. John
News reader wrote in message <39BEA55C.71829710@NOSPAM.com>... >Thanks for the reply. However, writing a program will take long. Besides, >we need to input lots of rows. We also need to maintain the relationships >among the tables, that is foreign keys should not be violated. > >We don't mind spending a couple of hundred dollars if we can get an off the >shelf program to do this. Thanks about the suggestion of using winsql. I >will give that a try. > The other option you have is to insert existing data from your production databases into your test tables. That's the way most people do it; surely you don't want to *invent* several millions rows of data? Of course your existing databases may be a different format than your test database - for example, your production database may be Oracle while your test database is DB2 - but all of the serious relational databases should have some way to export their data to a flat file format and then you can use the target database's import utilities to read them in from the flat files and store them. Also, I don't know anything about your project but if you are planning to put millions of rows in the test database, I assume it is to do a volume/performance test and that testing of the other functionality of the database has already been successful. In that case, why not just clone the test data from the earlier phases of testing, changing a little bit of data each time. For example, if your existing test data has primary keys 1 to 100, clone those rows while adding 100 to each key so that you have keys 101 to 200, and repeat the pattern until you have all the data you need. This approach has the advantage that you don't have to import any data, just write SQL to clone the data within the database.