Comments
3 comments
-
Hello,
It is possible to customize one of the generic generators and specify a minimum and maximum size for the data. In my tests, however, taking it up to 1GB tended to run SQL Data Generator out of memory, so it may not be practical to do. But if you want to try...- Open program files\Red Gate\sql data generator 1\userexample\config\XmlGenerator.xml in Notepad.
- Modify it to add the "MinLength" and "MaxLength" properties as below.
- Save it as Program Files\Red Gate\SQL Data Generator 1\Config\BigXmlGenerator.xml
- When you re-launch SDG, your XML columns will have an "Example" category with BigXmlGenerator in it.
<?xml version="1.0" encoding="iso-8859-1"?> <generators> <generator type="RedGate.SQLDataGenerator.Generators.Others.XMLGenerator" name="BigXMLGenerator" description="XMLGenerator up to 1GB" category="Example" > <property name="Unique">true</property> <property name="MinLength">500000000</property> <property name="MaxLength">1000000000</property> <matches field="Col_1" score="1" minlen="5"/> <type sqlType="xml"/> </generator> </generators>
-
Thanks for the tips.
Yes, you were right , in that it didn't work (got the oom ) .
I tried 500MB and 100MB and that still seemed to fail.
Oh well -
The only thing I can think of would be to create a custom generator in C#, but I don't know how you'd get more capacity for more XML data. The built-in generator above uses a StringBuilder that tries to allocate the 1GB up-front, which is usually as much memory as a 32-bit .NET application can expect to use.
Here is the page regarding custom generators: http://www.red-gate.com/supportcenter/C ... c52077.htm
Add comment
Please sign in to leave a comment.
Any tips greatly appreciated.