Generate random data for MaxDB

Hello everybody,
we are doing some tests on our MaxDB installation
We would like to generate some activity on the database in order to test performance and generate some log files in order to do a complete restore/recovery
I think it's possible to use some sql statement to create and populate a table using sqlcli, but I don't know how to enter many rows in one time, anyone know how do do this?
Thanks,
Valerio

Valerio Cicchiello wrote:>
> Hello everybody,
>
> we are doing some tests on our MaxDB installation
> We would like to generate some activity on the database in order to test performance and generate some log files in order to do a complete restore/recovery
>
> I think it's possible to use some sql statement to create and populate a table using sqlcli, but I don't know how to enter many rows in one time, anyone know how do do this?
There are several options:
1. Option (super cheap and easy):
Open an SQL Session
Create a dummy table e.g.
create table dummy (col1 char(1000), col2 char(1000), col3 char(1000))
Load data into the dummy table, e.g.
insert into dummy (select lpad('x', 1000, 'x'), lpad('x', 1000, 'x'), lpad('x', 1000, 'x') from tables a, tables b where rownum <10000)
Then truncate the table
truncate table dummy
and insert the data again.
2. Option (less cheap, but still easy):
Use the delivered dummy-data test tool SDBFILL, e.g. like this:
C:\sapdb\db760\db\bin\sdbfill DB760 init 0 10 100 0 a SUPERDBA ADMIN
checking the command help gives us this:
usage: sdbfill <DBName> (init|create|append|check|delete) [<From> <To>
               [<TransactionLength> [<SleepBeforeCommit> [ (q|a|b)
               [<DBAUser> <DBAPassword>]]]]] [<node>]
The q|a|b section refers to the output mode (q= quiet, a=ascii, b=binary).
In order to use it you've to make sure that the provided DBA user is setup as NOT EXCLUSIVE user.
The program will create a dummy table called 'sdbfill' with this command:
C:\sapdb\db760\db\bin\sdbfill DB760 create 1 10 100 0 a SUPERDBA ADMIN
Dropped table 'sdbfill'.
Created table 'sdbfill'.
10, final commit at 9
9 rows inserted successfully.
Afterwards you can just pump in data like this:
C:\sapdb\db760\db\bin\sdbfill DB760 append 0 100000 100 0 a SUPERDBA ADMIN
100000, final commit at 99999
You may want to play a bit around with this tool to lean how it works.
It's the same tool used by the backup tool vendors to create data in MaxDB.
Hope you get along with any of the two options.
regards,
Lars

Similar Messages

  • Generate Posting Date for Payroll Periods"

    Hi all,
    What is the relevance of "Generate Posting Date for Payroll Periods" ?
    table T549S
    Rx

    Posting Date is required after payroll run and exited then we have to post payroll results to accounts.After payroll run which date we have to post to accounts. Source is 01 payday...target 04 posting date....for ex If payday is 30th every month.....then posting date is after X days .....like you have to generate postinfg dates.
    Mohan

  • How to generate test data for all the tables in oracle

    I am planning to use plsql to generate the test data in all the tables in schema, schema name is given as input parameters, min records in master table, min records in child table. data should be consistent in the columns which are used for constraints i.e. using same column value..
    planning to implement something like
    execute sp_schema_data_gen (schemaname, minrecinmstrtbl, minrecsforchildtable);
    schemaname = owner,
    minrecinmstrtbl= minimum records to insert into each parent table,
    minrecsforchildtable = minimum records to enter into each child table of a each master table;
    all_tables where owner= schemaname;
    all_tab_columns and all_constrains - where owner =schemaname;
    using dbms_random pkg.
    is anyone have better idea to do this.. is this functionality already there in oracle db?

    Ah, damorgan, data, test data, metadata and table-driven processes. Love the stuff!
    There are two approaches you can take with this. I'll mention both and then ask which
    one you think you would find most useful for your requirements.
    One approach I would call the generic bottom-up approach which is the one I think you
    are referring to.
    This system is a generic test data generator. It isn't designed to generate data for any
    particular existing table or application but is the general case solution.
    Building on damorgan's advice define the basic hierarchy: table collection, tables, data; so start at the data level.
    1. Identify/document the data types that you need to support. Start small (NUMBER, VARCHAR2, DATE) and add as you go along
    2. For each data type identify the functionality and attributes that you need. For instance for VARCHAR2
    a. min length - the minimum length to generate
    b. max length - the maximum length
    c. prefix - a prefix for the generated data; e.g. for an address field you might want a 'add1' prefix
    d. suffix - a suffix for the generated data; see prefix
    e. whether to generate NULLs
    3. For NUMBER you will probably want at least precision and scale but might want minimum and maximum values or even min/max precision,
    min/max scale.
    4. store the attribute combinations in Oracle tables
    5. build functionality for each data type that can create the range and type of data that you need. These functions should take parameters that can be used to control the attributes and the amount of data generated.
    6. At the table level you will need business rules that control how the different columns of the table relate to each other. For example, for ADDRESS information your business rule might be that ADDRESS1, CITY, STATE, ZIP are required and ADDRESS2 is optional.
    7. Add table-level processes, driven by the saved metadata, that can generate data at the record level by leveraging the data type functionality you have built previously.
    8. Then add the metadata, business rules and functionality to control the TABLE-TO-TABLE relationships; that is, the data model. You need the same DETPNO values in the SCOTT.EMP table that exist in the SCOTT.DEPT table.
    The second approach I have used more often. I would it call the top-down approach and I use
    it when test data is needed for an existing system. The main use case here is to avoid
    having to copy production data to QA, TEST or DEV environments.
    QA people want to test with data that they are familiar with: names, companies, code values.
    I've found they aren't often fond of random character strings for names of things.
    The second approach I use for mature systems where there is already plenty of data to choose from.
    It involves selecting subsets of data from each of the existing tables and saving that data in a
    set of test tables. This data can then be used for regression testing and for automated unit testing of
    existing functionality and functionality that is being developed.
    QA can use data they are already familiar with and can test the application (GUI?) interface on that
    data to see if they get the expected changes.
    For each table to be tested (e.g. DEPT) I create two test system tables. A BEFORE table and an EXPECTED table.
    1. DEPT_TEST_BEFORE
         This table has all EMP table columns and a TEST_CASE column.
         It holds EMP-image rows for each test case that show the row as it should look BEFORE the
         test for that test case is performed.
         CREATE TABLE DEPT_TEST_BEFORE
         TESTCASE NUMBER,
         DEPTNO NUMBER(2),
         DNAME VARCHAR2(14 BYTE),
         LOC VARCHAR2(13 BYTE)
    2. DEPT_TEST_EXPECTED
         This table also has all EMP table columns and a TEST_CASE column.
         It holds EMP-image rows for each test case that show the row as it should look AFTER the
         test for that test case is performed.
    Each of these tables are a mirror image of the actual application table with one new column
    added that contains a value representing the TESTCASE_NUMBER.
    To create test case #3 identify or create the DEPT records you want to use for test case #3.
    Insert these records into DEPT_TEST_BEFORE:
         INSERT INTO DEPT_TEST_BEFORE
         SELECT 3, D.* FROM DEPT D where DEPNO = 20
    Insert records for test case #3 into DEPT_TEST_EXPECTED that show the rows as they should
    look after test #3 is run. For example, if test #3 creates one new record add all the
    records fro the BEFORE data set and add a new one for the new record.
    When you want to run TESTCASE_ONE the process is basically (ignore for this illustration that
    there is a foreign key betwee DEPT and EMP):
    1. delete the records from SCOTT.DEPT that correspond to test case #3 DEPT records.
              DELETE FROM DEPT
              WHERE DEPTNO IN (SELECT DEPTNO FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3);
    2. insert the test data set records for SCOTT.DEPT for test case #3.
              INSERT INTO DEPT
              SELECT DEPTNO, DNAME, LOC FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3;
    3 perform the test.
    4. compare the actual results with the expected results.
         This is done by a function that compares the records in DEPT with the records
         in DEPT_TEST_EXPECTED for test #3.
         I usually store these results in yet another table or just report them out.
    5. Report out the differences.
    This second approach uses data the users (QA) are already familiar with, is scaleable and
    is easy to add new data that meets business requirements.
    It is also easy to automatically generate the necessary tables and test setup/breakdown
    using a table-driven metadata approach. Adding a new test table is as easy as calling
    a stored procedure; the procedure can generate the DDL or create the actual tables needed
    for the BEFORE and AFTER snapshots.
    The main disadvantage is that existing data will almost never cover the corner cases.
    But you can add data for these. By corner cases I mean data that defines the limits
    for a data type: a VARCHAR2(30) name field should have at least one test record that
    has a name that is 30 characters long.
    Which of these approaches makes the most sense for you?

  • How do you generate random data info using json and spry?

    I have a mobile applicaton that uses spry datasets that dynamically populate a jquery mobile listview by using a json file. Everything is operating as it should.
    However, I would like to understand how to pull random objects from the json file to have them displayed on a different page.
    My json file is standard and not complicated. It has several levels. Each is represented as below:
                                  { "Level1":
                                                                {"imageurl":"images/_myimage.png",
                                                                "someData":"S,A,P,R",
                                                                "levelLongDesc":"further description",
                                                                "name": "John Doe",
                                                                "page": "referencepage",
                                                                "description":"The description of the image"
    {"imageurl":"images/_myimage.png",
      "someData":"S,A,P,R",
      "levelLongDesc":"further description",
      "name": "John Doe",
      "page": "referencepage",
      "description":"The description of the image"
    Json file Level1 has about 70 objects
    What I would like to do is randomly load one of the Level1 object arrays into the page when the user selects a Level 1 radio button that is on the screen. I know how to create the page, radio buttons and basics, but just don't know how to pull in the random data.
    I've found one code sample on this site that speaks to spry and xml, but I haven't been able to apply it in any way that works for me with the json file:
    http://forums.adobe.com/message/662551
    I've also googled. There isn't much on spry datasets with json and generating random info. There was a little bit on sorting, but that didn't help either.
    Does anyone have a good example/tutorial of how to use the random function with spry/json?
    TIA
    -Rachel

    I've done similar things before.  A few thoughts for you:
    1. I'm assuming you're doing a buffered period or frequency measurement on the incoming encoder pulses, right?  First key point is that you'll have data that is spaced equally in position, but not equally in time.  If you are looking for a time-based FFT such that increasing speed will shift your spectrum, you're going to need to go through an interpolation process to resample your data as though equally-spaced in in time. 
    2. Your 149 pulse per rev encoder may be a significant source of error unless its 149 pulses are placed with extreme accuracy.  Any error in pulse placement violates your underlying assumption of data that is equally-spaced in position.  It'll be very helpful to send your data through a software lowpass filter to attenuate those artifacts. 
    3. I am not sure what you mean by "decompose the buffered data (array) into a single datastream."  You'll get an array of periods / frequencies from the call to DAQmx Read.  If you want to use it in a LabVIEW waveform datatype, you'll first need to do the resampling to create equally-spaced-in-time data.  The LabVIEW waveform datatype (and all the analysis functions like FFT that use it) depend on receiving data with a fixed constant time interval between samples.
    -Kevin P.

  • Generating random text for placeholders in Pages

    In the templates that come with Pages the text placeholders are all in Latin, which I think looks quite professional. My question is: how can I generate random Latin text, like in the templates?
    Thanks
      Mac OS X (10.4.7)  

    You can also use the nifty freeware MacLorem, which will generate random Latin text with various specifiable qualities (and can produce mock text for various other "languages").

  • GR55 - report generates no data for some of the cost elements

    Hi
    When executing GR55 for Monthly cost center analysis (target currency), the report generated has values for all the cost elements in the report. However, few cost elements do not show amounts. The amount columns show a ××××.
    Please suggest on why the system is not displaying the values only for few cost elements when running GR55 for report group CCPA (Cost center Actual vs Plan).
    Thanks
    Neetar

    Dear Neeta,
    Every customized report generated in Report painter will have a base as Form, were you do your customizing to get the report.
    So might be in some places the value key figure would have not properly customized.
    Check the report in T.Code GRR3 and see the places where you get XXXX.
    Hope it clarifies your doubt.
    Thanks and regards
    Praveen.J

  • Generating EDI data for #SegmentCount# and #ControlNumber#

    Hi all,
    When I read EDI cookbook, I found that control numbers can be generated by B2B server.
    If you want B2B to generate these kind of data, you need to follow certain rules
    1. back end application should send payload with certain keywords
    example-
    <edix12855:Element-329>
    <xsl:value-of select="#ControlNumber#"/> <!-- This line commands B2B to generate unique number-->
    </edix12855:Element-329>
    When I tried this, I am getting InternalXPathExpressionException
    1. Can anybody knows list of keywords supported in EDI doc generation ?
    2. How to use them ?
    Thanks,
    Praveen

    Hi Praveen,
    Not very sure, but below links may be helpful for you -
    Envelope Segments of EDI
    Internal properties of X12 850
    Re: General questions on EDIFACT
    I hope you have seen in the cookbook that it's not a preferred approach.
    Regards,
    Anuj

  • Will Lenovo Yoga 10+HD generate random MAC for WIFI

    Note what Apple iOS 8 will do
    Quote:
    Beginning with iOS 8, Apple's handheld devices will generate and use random Media Acccess Control, or MAC, addresses — rather than their real MAC address — when scanning for Wi-Fi access points. The change was announced in a closed session at the company's Worldwide Developers Conference and first called out by security researcher Frederic Jacobs.
    Source

    I'm not aware of any Android devices that do this... yet.  Maybe Google will follow suit in a future version of Android.

  • How to use the program "Generate test data for BAI bank statement" ?

    Hi all,
    I use the program RFEBKAT5 to create an Electronic Bank Statement file in BAI format ,but it doesn't generate the file .
    I don't know how to generate the file.
    Please help me !
    Thanks all !

    You need to suitably adjust your GL accounts for "Posting Offset Account" (Whisch is defaulted as ++++++++19" and Checkout/Funds Out/Funds IN GL accounts to your configuration.
    Once you do this try generating the file again.

  • Generating Random number for requisition number

    hai all,
    Am having a requirement of generating a random number based on the type of Process.
    Say if it is medical means I want it to be MEDxxxxx .
    Is thr any FM Please send some suggestions...
    Thanks in advance,
    Nalla.B

    Hi Nalla,
    First this is not WDABAP related question.
    To Do this you need to contact Functional guys, they will generate number ranges.
    Based on that object we can generate numbers. using NUMBER_RANGE_ENQUEUE and
    NUMBER_GET_NEXT  function module.
    Cheers,
    Kris.

  • Generate test data for BAI bank statement

    Hi all,
    I use the program RFEBKAT5 to create an Electronic Bank Statement file in BAI format ,but it doesn't generate the file .
    I don't know how to generate the file.
    Please help me !
    Thanks all !

    Hello,
    Did you click in PC Download checkbox?
    Regards
    Waza

  • Generate Sample data for the cube .- I don't want to use the flat file

    Hello BI Gurus,
    I know there is a sap sap standard program where you write records to the cube. I think first you change the cube from basisc to real time cube and then another program which displays a ALV layout- you can create,delete or change ther records.
    I don't want to create a flat file load for this. I want to create 5 records to check the layout.
    I forgot the program name.
    Can you please let me know the program name.
    Thanks
    Senthil

    A long time for a simple question, so here it is: the program name is CUBE_SAMPLE_CREATE.
    Please, mark this question as anweared.
    Regards,
    André

  • I am unable to to publish to BC i keep getting a type error:  Don't know how to generate rendered data for type.  Can someone help me fix this?

    Been having this problem all day now. i just installed the new version

    Can you please send an email to us at [email protected] along with a link to this thread and the .muse file? You can upload it to Adobe Send or Dropbox and include a download link. Thanks!

  • How to create or generate sample / test data (mass data for tables) ?

    Hello,
    I'm playing around a little with some SQL-functions, but actually I have only a small number of rows in my sample table and I would like to have "big, filled tables". :-)
    Is there an easy way to generate mass data for tables, e.g. for testing the performance of SQL-statements when a table is full of data.
    For example:
    How can I generate lets say 50.000 or 100.000 rows into a table with two columns? Is there a ready-to-use command to generate this mass of data?
    How do you create random data for testing?
    Thanks a lot in advance for your help!
    Best regards
    FireFighter

    First, thanks for the quick and great answer! It looks exactly what I'm looking for. How could I forget to look at Tom's site for such a script. ;-)
    But.....
    ...unfortunately, it doesn't seem to work. :-( And since I'm not so experienced in PL/SQL until now (looking forward to a course end of year...) I don't know what the error is. Is it not meant to use within 10g ??
    So, here is what i do:
    1. Log in to SQL*plus and generate the procedure with "@gen_data.sql"
    2. Then I try to execute the procedure by using "exec gen_data('mytesttable',500);"
    Then I get the following error output:
    SQL*plus> exec gen_data( 'mytable', 50 );
    BEGIN gen_data( 'mytable', 50 ); END;
    ERROR at line 1:
    ORA-00936: missing expression
    ORA-06512: at "SYS.GEN_DATA", line 34
    ORA-06512: at line 1
    And here is the code that I have used:
    01 create or replace procedure gen_data( p_tname in varchar2, p_records in number )
    02 authid current_user
    03 as
    04 l_insert long;
    05 l_rows number default 0;
    06 begin
    07
    08 dbms_application_info.set_client_info( 'gen_data ' || p_tname );
    09 l_insert := 'insert /*+ append */ into ' || p_tname ||
    10 ' select ';
    11
    12 for x in ( select data_type, data_length,
    13 nvl(rpad( '9',data_precision,'9')/power(10,data_scale),9999999999) maxval
    14 from user_tab_columns
    15 where table_name = upper(p_tname)
    16 order by column_id )
    17 loop
    18 if ( x.data_type in ('NUMBER', 'FLOAT' ))
    19 then
    20 l_insert := l_insert || 'dbms_random.value(1,' || x.maxval || '),';
    21 elsif ( x.data_type = 'DATE' )
    22 then
    23 l_insert := l_insert ||
    24 'sysdate+dbms_random.value+dbms_random.value(1,1000),';
    25 else
    26 l_insert := l_insert || 'dbms_random.string(''A'',' ||
    27 x.data_length || '),';
    28 end if;
    29 end loop;
    30 l_insert := rtrim(l_insert,',') ||
    31 ' from all_objects where rownum <= :n';
    32
    33 loop
    34 execute immediate l_insert using p_records - l_rows;
    35 l_rows := l_rows + sql%rowcount;
    36 commit;
    37 dbms_application_info.set_module
    38 ( l_rows || ' rows of ' || p_records, '' );
    39 exit when ( l_rows >= p_records );
    40 end loop;
    41 end;
    42 /
    Does anybody know what my error i have in here?
    Thanks again for you help in advance!
    Rgds
    FF
    Message was edited by:
    FireFighter

  • How to generate n random dates

    Can anyone help me in generating Random dates, i want to generate 100 random dates in yyyy-mm-dd format.

    I've tried this, but will appreciate any neat solutions...
    public static void main(String arg[]) {
        int no = 0;
        while (no < 100) {
          // Year
          int yylower = 1970; // your lower integer value
          int yyupper = 2000; // the larger one of your two integers
          double rand = Math.random();
          int yyresult = yylower + (int) ( (yyupper - yylower) * rand);
          // Month
          int mmlower = 1; // your lower integer value
          int mmupper = 12; // the larger one of your two integers
          rand = Math.random();
          int mmresult = mmlower + (int) ( (mmupper - mmlower) * rand);
          // Month
          int ddlower = 1; // your lower integer value
          int ddupper = 29; // the larger one of your two integers
          rand = Math.random();
          int ddresult = ddlower + (int) ( (ddupper - ddlower) * rand);
          System.out.println(yyresult  + "-" + mmresult + "-" + ddresult);
          no++;
      }

Maybe you are looking for

  • PS CS5 Image Display Differs From Used ICC Profile In Win 7

    Hi, on my Windows 7 Ultimate x64 machine, I just calibrated my Dell SP2309W monitor using an i1DisplayPro and basICColor 5, creating a ICC v2 profile (I am aware of the problems under Windows with ICC v4 profiles). It created the ICC profile and appl

  • All elements flow (remotely) when you update a page. What shall I do?

    I will try to document exactly what I am trying to complete in Muse. I have a single master upon which all pages have been built and until now without any problems. I am running v1.1, Build 960, CL768344 - AIR Runtime 3.2.0.2060. On my fron page I ha

  • Where is the 'tools' menu in Firefox 18?

    I can't open .pdf files (like IRS forms) and I'm directed to the tools menu to allow this, but I can't find the 'tools menu.

  • Boot Camp, Mac Drive and Gaming

    I recently got a mac book pro, I am looking at installing boot camp for gaming. I want to keep the windows partition as small as possible i.e. have only the OS on there to allow for maximum flexibility. So i was thinking that i could simply install W

  • Modem problems with dial-up connection

    Hello, I just bought a used G4 12 inch Powerbook a few days ago. I have been trying to get on the internet and checked all connections and gone through as much as I know of System Preferences and just can not get a dial tone, can not get the modem wo