Skip to Content

Script to fill the database for a tutorial


I'm looking for a script to fill either the data volumes or the log volumes of a MaxDB with sample data.

I tried with x_python but I got the error SQLError: sql.SQLError: [-4004] (at 30) Unknown table name: INFO_SYSDD_SERVERDBS.

Is there any new script available or does anybody know how to rig the script ?

Any comment welcome !

Thanx and regards,


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 29, 2007 at 04:58 PM

    Hi Christian,

    I'm not sure where you got the script, but to generate some log you don't need to use it.

    Just do something like this:

    create table logger (col1 char(200))

    -> now turn off autocommit in SQL Studio

    insert into logger select lpad('x',200) from tables t1, tables t2, tables t3 where rownum <=1000




    execute this statement a few times your log area should get filled quickly.

    You can also set 10000 or 100000 rows at a time, but when a LOGFULL occurs you'll have just the option to make a log backup.

    KR Lars

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Christian,

      I ran the statements in ORACLE mode - so just test this.

      When you delete the WHERE clause it's no wonder you get space problems.

      I designed the query in a way that a huge number of rather big rows is returned.

      Look at it: there is a Cartesian Product of three tables !

      And I select a string that has 200 bytes.

      Since for the INSERT INTO SELECT... the resultset of the select is first put into a temporary table in the database.

      Therefore we need 200 bytes x (no. of entries in tables)^3 to store the data.

      As you wrote all you wanted was to create REDO - so just leave the WHERE condition in place (also ROWNUM does not work in mode INTERNAL, it's named ROWNO there - so just use ORACLE mode for the sake of this example).

      The trick here is that although much data is manipulated it's always rolled back, so the permanent space usage in the database will not increase.

      Hope that helps.

      KR Lars

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 05:58 PM


    This python script sounds like it was one of the ones that came with the tutorial for one of the earlier versions of SAP DB (I seem to remember using one of this for a 7.3 setup). You might be able to poke around by editing the script but it might be just as easy to use the new DB management studio and create your own loads using the import function.

    Hope that helps.


    J. Haynes

    Denver, CO

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.