How to add dummy data to my database of test? a novice needs help

Hi all

I'm pretty new to oracle and I would mess around with it some more, I created my database (MVF) and created a test tablespace.
Now it's what would be the best way to fill the space of storage of data? can I just insert a few lines in the tablespace? or are there ways more effective to do this?
Perhaps someone who could provide me with a pl/sql script for it? or a procedure which would make this (insert x the amount of dummy data) on a regular basis?

Thanks in advance!







(ps this is my first post so please excuse me if my post is not according to the regular lines)

Published by: 994141 on 15-mrt-2013 12:38

Hello

Welcome to the forum!

994141 wrote:
Hi all

I'm pretty new to oracle and I would mess around with it some more, I created my database (MVF) and created a test tablespace.
Now it's what would be the best way to fill the space of storage of data? can I just insert a few lines in the tablespace?

This is the usual approach. You have some situations you want to test: unique compared to duplicate values, certain combinations of values, some missing columns, the values limits extremes, even the questionable data or invalid (for example birth_date in the future). Create individual INSERT statements for these cases. Write a script to do this, you can use the features of the Editor (cut/paste, search/replace) allows you to easily create statements or re - run them if you get something wrong the first time.

or are there ways more effective to do this?

If you want a large amount of data, you may copy it to an existing table or view. Even if you created the database, you probably have hundreds of lines in views of data, such as object dictionary. For example, if you have 100 rows in an employee table, you could say:

CREATE TABLE employee
(  employee_id     NUMBER     PRIMARY KEY
,  last_name     VARCHAR2 (20)
,  first_name     VARCHAR2 (20)
,  hire_date     DATE
);

INSERT INTO employee
(       employee_id
,     last_name
,     first_name
,     hire_date
)
SELECT     ROWNUM
,     SUBSTR (object_name, 1, 20)
,     SUBSTR (owner,          1, 20)
,     created
FROM     all_objects
WHERE     ROWNUM     <= 100
;

You might find yourself with a large number of employees 'SYS '.

Here is another way to generate data. Say, you want a table with 60 lines, one line per day during the last 60 days:

CREATE TABLE     test_dates
AS
SELECT     LEVEL               AS dt_id
,     SYSDATE - LEVEL          AS dt
FROM     dual
CONNECT BY     LEVEL     <= 60
;

Perhaps someone who could provide me with a pl/sql script for it?

As you can see, a lot of things can be done without PL/SQL, just using plain old SQL.
Of course, PL/SQL is available if you really need.

Tags: Database

Similar Questions

  • How to create dummy data with 1 TB

    Hi Expert,

    May I know how to create dummy data with 1 TB to test performance. ?

    Respect of

    Liang

    what columns you want to include? Basically, you can generate as many lines as you like to connect by queries - something like:

    create the table big_t

    as

    with

    generator1 like)

    Select rownum id

    of the double

    connect by level<=>

    )

    ,

    generator2 as)

    Select lpad ('* ', 1000,' *') col1

    of the double

    connect by level<=>

    )

    Select g1.id

    g2.col1

    of generator1 g1

    generator2 g2

    ;

    Of course, it is not 1 TB, but you can change the number of levels. Who said: I think you need to find a sensitive table first structure.

  • How to add the date felxfiled in OFA

    How to add the date felxfiled in OFA

    Hi gurus,

    How to add a date in the form OFA field. I tried but no optin schedule it. I need to add the calendar options before the flexfiled.

    Concerning

    Hello

    Allocate FND_STANDARD_DATE segment value your FDF everywhere where you want to see the calendar on the page of the OFA.

    Let me know if you need more help on this.

    Kind regards

    Hemant

  • How to add the data store to a data cluster store

    Hi all

    How to add a data of a data cluster store store. He has vc:datastore opposed but not able to find the javascript for the cluster data store object.

    Any help appreciated.

    Check the workflow to the title of the DRS library, vCenter, storage, Storage, they are part of plugin vCenter.

  • How to add a data center on the virtual center via VI client server?

    How to add a data center on the virtual center via VI client server?

    I formatted ESX server & ESX Server Update installed keeping the data center on the storage (of many desktop computers)

    Now I have fresh installed a new server of virtual & added the ESX Server, but I'm unable to reattach existing data centers on storage.

    What will be the way to import of existing data on server Center virtual center?

    Help, please...

    Is ' VMware-VMimporter - 2.0.0 - 30557 "is the software through which I can solve my problem?

    You need to browse each data store, go to the folder of the virtual machine, right-click on the *.vmx file and add it to your inventory.

    Andrea

    * If you found this device or any other answer useful please consider awarding points for correct or helpful answers

  • How to add the data in asm file

    Hello


    Can someone let me know how to add the data using ASM file

    DB-ORACLE 10.2
    OS RHEL

    create tablespace tbl_name
    DATAFILE '+ DATA' SIZE 1 G REUSE
    autoextend on next maxsize of 250 M 2 G;

    where is your asm disk group + DATA

  • How to add new data and delete old data from a custom text file?

    Hi guys!

    Well, I'm in a bit of trouble.

    I need to make a request to some GPS tools. Split data in indicators, generate coordinates (google maps format), and so it goes.

    One of the functions of the systems is the calculation of oscillation of coordinates. The formula should be: latitude 1 - latitude 2 = latitude AND longitude 1 - 2 = swing longitude longitude oscillation.

    Since I'm on two values, I thought: "Oh, if I connect these data in a file, I just pick up and do all the calculations part." Yes, this idea is adapted to my needs (even if it is not the best, the computer part solved my problem).

    BUT I don't see a way to write the current value of the loop and erase the old results.

    For example, suppose that loop 1 gave me 1.00000, 2,00000 coordinates and loop 2 gave me the coordinates 3.00000 and 4.00000. Right?

    My log file is similar to: 1.00000,2.00000; 3.00000,4.00000;

    Well, it works. However, we will look forward to loop 3: coordinates 5.00000,6.00000.

    If the program connects to it, I would get the chain: 1.00000,2.00000; 5.00000,6.00000; When I really need 3.00000,4.00000; 5.00000,6.00000;.

    For this reason, when I apply the calculation of oscillation, it will always take the most recent value and do all the calculations with the first result (from loop 1).

    Well, I wonder that there is a way to add new data to a file and replace the old values, with simple code. If anyone knows how, please respond here!

    Considerations:

    (1) I want to do it as simple as possible. My code is kind of great, and it is not appropriate to insert structures or library now.

    (2) maybe the explanation is not as simple as it is for me. Really, I couldn't find a better way to say what I need.

    (3) if someone has doubts as to my doubts, please just comment and I'll try to be as specific as possible.

    Thanks in advance!

    I guess my question is why write a file just to delete.

    If you pass an array of points from one iteration to another, you will have to take extra time to open the file, read the file, delete the old data, writing the new data, save the file, and then close the file.  It would be pretty much the same thing, but without having to go through the hard drive.

    Just a thought.

  • How to add the data without loss of data store?

    Hello

    We had ESXi 3.5 installed on 1 HDD and data store was on a different HARD disk.

    Now the HDD with ESXi host got crashed and I had to replace it with another HARD drive and make new ESXi installation on the new HARD drive.

    Now after the new ESXi install on new HARD drive, it does not detect the data store on the HARD drive second.  It is, however, detect the LUN of the second HARD disk.

    Now, how can I do detect the data store on the second HARD drive?  Or y at - it anyway I can add the data store on the second HARD drive to the new host ESXi?

    Thanks in advance.

    Kind regards

    Denis

    You will need to activate lun resignaturing and snapshot LUN, mount and rename the store of data back to its original name, and then disable them.

    -Matt

    VCP, vExpert, Unix Geek

  • How to add binary data to a file existing in OSB

    Hello

    I have a project of OSB that I need to do this to add binary data by ftp.  Here's my current throughput:

    Out binary MFL-> replace $body with binary output mfl-> publish to action (business service that is configured for ftp binary data).

    However, when data are Ed the following error is thrown:

    URI = ftp://xxx:21 / opt/home/zzz/logs

    Application of metadata =.

    < xml fragment - >

    " < tran:headers xsi: type ="ftp:FtpRequestHeaders"xmlns:ftp =" http://www.BEA.com/WLI/SB/transports/FTP "xmlns:tran =" " http://www.BEA.com/WLI/SB/transports "xmlns: xsi =":

    ttp://www.w3.org/2001/XMLSchema-instance">

    < ftp:fileName >11802_insert_oh_xfrmr.eai_data< / ftp:fileName >

    < / tran:headers >

    " < tran: encoding = xmlns:tran ' http://www.BEA.com/WLI/SB/transports "> utf-8 < / tran: encoding > .

    " < = xmlns:ftp ftp:isFilePath ' http://www.BEA.com/WLI/SB/transports/FTP "> false < / ftp:isFilePath > .

    < / xml fragment >

    Payload =

    19266787 ^ CLLL ^ C711791 ^ CLLL ^ C ^ C1178213 ^ Phase fixed (1) ^ C63185066204 ^ CA ^ CConstructed ^ C358880 NW 4DR LK MONTAZA ^ C120/240 ^ C09361 ^ CN/A ^ Remove CProposed ^ CAerial ^ C45718100 ^ C

    Unknown ^ C ^ ONC ^ temperature closed ^ CClamp ^ CA ^ C1 ^ C2-cover ^ C19266796 ^ ONC ^ ONC ^ C15 ^ C ^ CYes ^ CYes ^ CYes ^ C13200Y/7620 X 22860Y/13200 ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C

    ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C19266641 ^ Coh_fuse_switch ^ C63086930001 ^ C4 ^ CN31 ^ CDD0613 ^ C22.9 ^ C63376474601 ^ C8129580 ^ wrong ^ C4 ^ Coke

    echobee ^ C43 ^ C0 ^ Cdefault ^ CYes ^ C

    >

    # < 6 November 2013 2:28:23 pm > < error > < WliSbTransports > < goxsd1604 > < osb_server1 > < ExecuteThread [ASSET]: '3' for queue: '(self-adjusting) weblogic.kernel.Default' > < <

    Anonymous > > < BEA1 4B688443B66FA09FFE75 > < d2b4601b2fffd9b7:6b9f2297:1422a857ee8: - 8000 - 000000000000171 b > < 1383766103889 > < BEA-381105 > < error occurred for the endpo of service

    int: com.bea.wli.sb.transports.TransportException: cannot open the data connection. Message is received error (553) of FTP server [mpsd1] [10.111.19.32] IP response in.

    status of RT [21] [connected] command executing [storopt/Accueil/zzz/logs/11802_insert_oh_xfrmr.eai_data.a]

    com.bea.wli.sb.transports.TransportException: failed to open the data connection. Message is received error response (553) of FTP server [mpsd1] [10.111.19.32] IP [2 port

    1] [Hardcover] status command executing [stor opt/home/icanadm/logs/11802_insert_oh_xfrmr.eai_data.a]

    at com.bea.wli.sb.transports.ftp.connector.FTPTransportProvider.sendMessage(FTPTransportProvider.java:422)

    As I understand the error code 553 represents a wrong file name.  The file name I am providing is 11802_insert_oh_xfrmr.eai_data but it seems that the name is changed to 11802_insert_oh_xfrmr.eai_data.a.  So I did what is obvious and changed the file in several different ways (without the extension .eai_data, removed the number of file name) but still no luck.

    Any suggestions?

    Thank you

    Yusuf

    You can try to use the transport of ftp of jca rather than OSB ftp transport

    See:

    http://docs.Oracle.com/CD/E23943_01/integration.1111/e10231/adptr_file.htm#BABJEFCJ

    You can activate the mode append this

  • How to display the user name for database connection using dreamweaver? [was: help]

    connect display mode database using dreamweaver user name

    LionelLionel wrote:

    OK, sorry 4 that; I use dreamweavercs6 and the script server is php.i as accurate must I set up a server (wampserver) local on my laptop for this level of competence of project.my with scripts php is very limited. and now, after you have created the database (in phpmyadmin), I want to display the user name of the user after login... I need help please.thx

    You want to display it where? On the login page of "success"?

    Add the below to each top of the page:

    Then add the following in the code where you want the ' user name to appear:

  • Need to view daq reads per second but only to record a reading every 10 minutes. I would also like to record the date and time, at the same pace. Need help

    Need to show daq reads per second, but only to record a reading every 10 minutes, need help

    You are also looking to taste to 1 Hz data acquisition?

    My approach would be to use the DAQ acquisition to time your loop display reading each acquisition, then use the loop counter to control the logic of your writing to file.  For 1 Hz and 10 minutes write I would use 'quotient and remainder' I / 600; If rest = 0, then write the data point.

    For the date and time, under Calendar palette use the time get in seconds food a DateTime Format to a string.

  • I have by mistake deleated creative cloud of my program, (creative cloud is not im over my computer) how can I reload and have access to photoshop CC. I need help.  Arlette

    I have by mistake deleated my creative program cloud the consequence is having more creative cloud in my computer. HOW can I RELOAD creative cloud.

    The best would be if Adobe would send me an e-mail to click and install again, but I can not connect with any body.    I need help.

    Arlette

    Hi Counillon,

    Please check the help below document:

    Using creative cloud | Download, install, update or uninstall applications

    Kind regards

    Sheena

  • How can I transfer data from the database in a variable (or array)?

    I made my request according to the example (http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/). Everything works fine. I changed a single function to query the database - add two parameters and get the value from the table to a string format. A test operation shows that everything is ok. If I want to display this value in the text box, I just do drag and drop off service to this element in Design view

    (< s:TextArea = "153" x = "435" id = "nameText" text = "{getDataMeanResult.lastResult [0] .name}" width = "296" height = "89" / > ").

    Also, it works fine, just a warning and encouraged to use ArrayCollection.getItemAt ().

    Now, I want to send the value to a variable or an array, but in both cases, I get an error: TypeError: Error #1010: a term is undefined and has no property..

    How can I pass a value to the database in a variable? Thank you.

    public var nameTemp:String;

    getDataMeanResult.token = authors.getDataMean (arrayOfNumber [0], dir_id);

    nameTemp = getDataMeanResult.lastResult [0] .name;

    public var nameArray:Array = new Array();

    for (var i: uint = o; i < 3; i ++) {}

    getDataMeanResult.token = authors.getDataMean (arrayOfNumber [i], dir_id);

    NomTableau [i] = getDataMeanResult.lastResult [0] .name;

    }

    And how do I use syntax highlighting in this forum?

    Astraport2012 wrote:

    Thank you.

    Then this simple question: How can I place a mySQL database data in a variable using the wizards FB4 (connect with PHP)?

    If you can show examples please.

    I couldn't find examples. Send data to a field text or DataGrid - much, but no variable.

    the use of assistants? not sure... it is generally a bad idea to rely on them, because they will never fully what you want anyway. I would recommend learning abit of PHP and manage by yourself, because it allows you to manage everything exactly as you wish.

    small example of communicating with a database using PHP + FB4:

    mount a database

    write you a small script that will access your database, get a value, for example:

    ";
    
        while($row = mysql_fetch_array($result))
        {
            if($row['messageID'] == "3")
            {
                print $row['message'];
            }
        }
        print "\n";
    ?>
    

    This will get the message with ID '3 '.

    make an HTTPService in FB4 app to call this Script, as follows:

    
    
        
            
    
            
        
    
        
            
        
        
    
    
    

    and the value must be picked up by the Script and properly stored in a variable

  • How to change the data from the database and displayed in a DG

    Hello, it's me again with a simple question:

    I received the request of SQLi that returns multiple lines.

    In this line, I have for example:

    Reward-> 1

    How, instead of show 1 in the data grid, change this value to 'YES '.

    I followed this thread:

    private void onResultStats(event:ResultEvent):void

    {

    ServerStatsArr = new ArrayCollection (event.result.source);

    for (var i: int = 0; i < ServerStatsArr.length; i ++)

    {

    If (.abonnement ServerStatsArr [i] == 304) {}

    ServerStatsArr [i] .abonnement = 'Premium ';

    } else {}

    . Subscription ServerStatsArr [i] = 'no ';

    }

    If (ServerStatsArr [i] .transparence == 1) {}

    . Transparency ServerStatsArr [i] = 'yes ';

    } else {}

    . Transparency ServerStatsArr [i] = 'no ';

    }

    }

    ServerStatsArr.refresh ();

    }

    Why this method works for the subscription when (.abonnement ServerStatsArr [i] == 304) he displays Premium, but it does NOT work for transparency ?

    I tested (.transparence ServerStatsArr [i] == 1) and (.transparence ServerStatsArr [i] == '1')

    Thank you

    Hi again,

    private void setLabel(item:Object,column:DataGridColumn):String

    {

    Switch (Column.DataField)

    {

    case 'transparency ':

    If (item.transparence is "1")

    return ('yes')

    on the other

    return ('no')

    break;

    case "subscription":

    If (item.abonnement is "304")

    return ("premium")

    on the other

    return ('none')

    break;

    by default:

    Return("");

    }

    }

    and your grid adjustments - add the labelfunction to the following topics
    I hope we get a credit of distinction for this mission...
    David.
  • How to add additional data in the result set of cfquerry?

    Hi all

    I'm new to cold fusion it please help me

    I'm using the tag cfquery for running a select query and get the name of the system and the system is the...

    But I want an id system and additional system name to add to the result of this query with to change the database ...

    Please anyone suggest me... IT is URGENT

    Thanks in advance
    Sainaba

    UH... - What is a line or two columns?

    Whatever it is, there are functions to achieve is: queryAddRow() or queryAddColumn().  Take a look @ query functions:

    http://livedocs.Adobe.com/ColdFusion/8/htmldocs/functions-pt0_16.html#1099653

    --

    Adam

Maybe you are looking for

  • Lenovo $ X 1 display and MacBook (retina)

    Today, I took delivery of a new Lenovo $ X 1 screen. Specifically, I chose this screen for my MacBook because it supports USB - C; I can finally get rid of the dongle USB Apple-C and run all of a single cable, as nature intended. However, even if the

  • Report writing file spreadsheet using Excel

    I did up a VI that writes all my 7 entries and column headers to a file of Excel csv for my report. However, most of the data values and the column headers from my Excel file is all packed together in 1 cell. How each value and header occupy only 1 c

  • error in the specification of the build in the Project Explorer (Labview 2010)

    Hello I'm having a problem with building my folder in the Project Explorer after installing Labview 2010. Error occur said that as an attachment. I already reinstall back the software especially devices or. still having the same problem.

  • Double-sided printing resizes margins - Officejet 6700

    I have a 6700 Officeject how duplex printing absolutely fine on my previous laptop Windows 7.  Since my new laptop Windows 8 (and unclassified to Windows 8. 1), printing double-sided does not work properly.  The margins are be recalibrated in Word do

  • Error in creating driver... Please help...

    I'm having problems in the creation of kernel mode driver in visual studio 2015 using KMDF. Help, please