Filltabl can be used to generate rows with random data values in a table prior to testing.
From the command prompt:
filltabl /Tdbtable /Ncount [/Uloginid] [/Ppassword] [/Sservername] [/Rrandomseed]
where:
/Tdbtable
Is the fully qualified name of the table to fill with data. The name should be in the format of dbname.ownername.tablename.
/Ncount
Is the number of rows to be inserted.
/Uloginid
Is the user login ID. Login IDs are case-sensitive.
/Ppassword
Is a user-specified password for the loginid specified in the /U parameter.
/Sservername
Specifies which SQL Server to connect to. The servername is the name of the server computer on the network. This option is required if Filltabl is executed from a remote computer on the network.
/Rrandomseed
A numeric value that Filltabl will pass to the C run-time function srand to adjust the generation of the pseudo-random data values.
There should not be a blank between the command line-prompt switches and their associated parameters. For example, /N1000 is correct, while /N 1000 is not.
Filltabl will fill all columns having numeric data types with random numbers. It will fill all character, binary, text, or image columns with randomly generated characters or bit patterns. Therefore, Filltabl is a good utility for generating large amounts of data to test actions, such as timing data transfers or backup and recovery. Since the data values are so random, Filltabl is not a good tool for generating specific values for testing the logic encoded in applications, SQL commands, triggers, or stored procedures.
Filltabl uses the C run-time function rand to generate the random values it places in the rows. The rand function is called a psuedo-random generator because it does not generate completely random numbers. If you want to ensure that your applications generate unique numbers, you can call the srand function with a starting seed value before calling rand. If Filltabl is called multiple times without specifying a /R parameter, the data values generated will be reasonably random. If you want to have more random behavior from multiple runs of Filltabl, specify a different /Rrandomseed value on each run of the utility. If you want Filltabl to generate the same data values for multiple runs, specify the same /Rrandomseed parameter on each run.
To generate 1,000 rows in a user table:
filltabl /Tsadb.dbo.smalltab /N1000 /Usa /Psapwd /SMyServer
To generate 10,000 rows in a user table with a random seed:
filltabl /TMyDB.Me.MyTable /N10000 /UMyLogin /PMyPassword /SMyServer /R35960