Execute "DataGenerator.sqlgen" file Issue-Urgent help needed

HardikHardik Posts: 5
Hi All,
I want to execute "DataGenerator.sqlgen" from my Visual Studio - Database project. We are using Visual Studio 2008 Database edition for our project work. I want to run this data generation file in my postbuild section, so it will populate testing data.

File is successfully executed with the use of SQL Data Generator 1 when I build the application. I have added following line of code in my PostBuild section:
SQLDataGenerator.exe /project:"C:\Development\DB\SQLDataGenerator\DataGenerator.sqlgen"

But, it is not executing ("DataGenerator.sqlgen" file) when I am trying to deploy the project with the use of "Deploy Project". It doesnt give me any error but it is not executing.

Please guide me. Its urgent issue.

With regards,
Hardik

Comments

  • Hello,

    In order to troubleshoot your problem could you please provide some more information

    1) Does it work if you include the pull path to SQLDataGenerator.exe ("C:\Program Files\Red Gate\SQL Data Generator 1\SQLDataGenerator.exe")?

    2) Can you execute the project using the UI?

    3) Can you execute the project using the command line without using the deploy file?

    4) Are you still under trail mode, if you are you will get the licensing dialog pop-up.

    5) Can you add anything tracing or anything to see if anything is being wrote to the console? Any information in your build output?

    If you could answer those questions that would be great.

    Thanks

    Ben
  • Thanks for your reply Ben.

    1) I have already added path ("C:\Program Files\Red Gate\SQL Data Generator 1\SQLDataGenerator.exe") in the environment variable $PATH. It automatically calls exe when I write SQLDataGenerator.exe in the command prompt. It also works with build section.

    2) I can execute the project using the UI.

    3) I can execute the project using the command line without using the deploy file.

    4) Yes, I am still under trail mode, and it is asking licensing dialog pop-up when it executes.

    5) When I build the application, it automatically executes the RedGate Data Generation tool. But, it is not executing when I try to deploy it.
    May be I have to add one more file (may be bat file) that will execute the DataGeneration file.

    I am thinking about that only. If you have any clue then please let me know.

    With regards,
    Hardik
  • It sounds like data generator is working perfectly. 2 suggestions.

    1) Execute a batch file which will write out logging information to a write, execute data generator (redirecting output), write some data. End log file should tell you more about whats going on. for example:

    echo 'Starting Generation' >> SDG.txt
    "C:\Program Files\Red Gate\SQL Data Generator 1\SQLDataGenerator.exe" /project:"C:\Northwind.sqlgen" >> SDG.txt
    echo 'Finish Generation' >> SDG.txt

    You can then see if it is being called, what Data Generator is outputting, finally if it doesnt ever finish. Of course, if SDG.txt is never created, the batch file isn't being called and thats your problem.

    2) The problem might be around using a trail and executing the command line. The command line will wait until you press OK on the licensing screen. Under the covers, MSBuild might be executing it but it's sitting there waiting for someone to press OK for the license trail. Running the batch file should indicate if this is the problem.

    Let me know how you get on and if you have any more problems.

    Thanks

    Ben
Sign In or Register to comment.