Error trying to use .sqlgen file with Test step

MckMurrayMckMurray Posts: 37 Bronze 4
edited October 4, 2016 11:28AM in DLM Automation
I just installed DLM Automation 2, and I'm running into some trouble with the Test step.

For the purpose of my tests, I have to populate the test DB with some reference data which I am trying to do using SQL Data Generator and a predefined project file that I have checked into source control. I am getting the following error:

2016-09-30T20:36:27.8643303Z ##[error]System.Management.Automation.CmdletInvocationException: SQLDataGenerator.exe terminated with the exit code 200: Fatal execution error.
2016-09-30T20:36:27.8653365Z ##[error]SQLDataGenerator.exe produced this error output:
2016-09-30T20:36:27.8653365Z ##[error]Error: There was a problem creating/loading the project. This may indicate that
2016-09-30T20:36:27.8663293Z ##[error]SQL Data Generator was unable to connect to the specified database.

I don't think it is a permissions thing, since the build agent is creating the test DB to begin with. Any ideas?
Tagged:

Comments

  • MckMurrayMckMurray Posts: 37 Bronze 4
    Update: digging in a bit more, it looks like DLM Automation's SDG can't load the project file because the file was created in a newer version of SDG.
    Additionally, the version used by DLM doesn't seem to support copying IDENTITY column values when using an existing data source, which is what I'm trying to do.

    Is it possible to update the version of SDG being used by DLM Automation?
  • Hi,

    You'll notice that in your DLM Automation installation directory, there is a SDG subdirectory. In there are the SQL Data Generator files that DLM Automation uses. You can manually update the version of SQL Data Generator by copying the files across from your standalone SQL Data Generator installation. I'd recommend backing up the existing files beforehand just in case.
    Software Engineer
    Redgate Software
  • MckMurrayMckMurray Posts: 37 Bronze 4
    Thanks Rob, yep I can now use the data gen project file, although now I am getting another error which is somewhat unhelpful (see call stack below).
    If I run the equivalent SQLDataGenerator call in powershell on the Build machine, it runs successfully.

    Excerpt of logs:

    2016-10-04T14:55:50.2029072Z ##[debug]Calling: C:Program Files (x86)Red GateDLM Automation 2SDGSQLDataGenerator.exe /server:XXXX /database:dlmautomation_a82480c2-ce1e-434b-a45f-b4e261b06426 "/project:C:BuildAgent_work1sData Generator FilesFinQA_Reference_Data_For_Test.sqlgen" /out:"C:UsersmurraymckernanAppDataLocalTempDLM Automation
    k45hpze.log"
    2016-10-04T14:55:51.5850338Z ##[debug]C:Program Files (x86)Red GateDLM Automation 2SDGSQLDataGenerator.exe ended with exit code 1
    2016-10-04T14:55:52.0650796Z ##[warning]Failed to send Smart Assembly error report.
    2016-10-04T14:55:52.0660861Z ##[warning]System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
    2016-10-04T14:55:52.0670801Z ##[warning] at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
    2016-10-04T14:55:52.0670801Z ##[warning] at System.Windows.Forms.MessageBox.Show(String text, String caption)
    2016-10-04T14:55:52.0680782Z ##[warning] at SmartAssembly.ReportException.ExceptionReporting.Report(Exception exception)
    2016-10-04T14:55:52.0680782Z ##[warning] at RedGate.DLMAutomation.Shared.Errors.Reporting.SmartAssemblyErrorReporter.Report(Exception exception)
    2016-10-04T14:55:52.0940848Z ##[error]System.Management.Automation.CmdletInvocationException: SQLDataGenerator.exe terminated with the exit code 1: General error.
    2016-10-04T14:55:52.0950833Z ##[error]See the log information above for more details. ---> RedGate.DLMAutomation.Shared.Errors.TerminatingException: SQLDataGenerator.exe terminated with the exit code 1: General error.
    2016-10-04T14:55:52.0950833Z ##[error]See the log information above for more details.
    2016-10-04T14:55:52.0960813Z ##[error] at RedGate.DLMAutomation.Compare.RedgateTools.CompareResultExtensions.HandleDataGeneratorResult(RedgateToolResult redgateToolResult, ILog log, Object targetObject)
    2016-10-04T14:55:52.0960813Z ##[error] at RedGate.DLMAutomation.Compare.SchemaTesting.TestDataGenerator.PopulateWithDataUsingProject(IDatabase database, String dataGeneratorProjectFile)
    2016-10-04T14:55:52.0970817Z ##[error] at RedGate.DLMAutomation.Compare.SchemaTesting.SchemaSourceTester.SetupDatabase(String scriptsFolderPath, String compareOptions, String filterFilePath, Boolean includeTestData, String sqlDataGeneratorProjectFilePath, DatabaseServerConnection temporaryServerConnection, DatabaseConnection temporaryDatabaseConnection, Int32 commandTimeout)
    2016-10-04T14:55:52.0970817Z ##[error] at RedGate.DLMAutomation.Compare.SchemaTesting.SchemaSourceTester.SetupDatabase(ScriptsFolder scriptsFolder, String compareOptions, Boolean includeTestData, String sqlDataGeneratorProjectFilePath, DatabaseServerConnection temporaryServerConnection, DatabaseConnection temporaryDatabaseConnection, Int32 commandTimeout, String filterFilePath)
    2016-10-04T14:55:52.0980827Z ##[error] at RedGate.DLMAutomation.Compare.SchemaTesting.SchemaSourceTester.<>c__DisplayClass12_0.<RunTests>b__1(ScriptsFolder scriptsFolder)
    2016-10-04T14:55:52.0980827Z ##[error] at RedGate.DLMAutomation.Compare.Packaging.DatabasePackage.AcceptToProxy[T](SchemaSourceVisitor`1 visitor)
    2016-10-04T14:55:52.0990829Z ##[error] at RedGate.DLMAutomation.Compare.SchemaTesting.SchemaSourceTester.RunTests(ISchemaSource schemaToTest, DatabaseConnection tempDatabaseConnection, DatabaseServerConnection tempServerConnection, String testToRun, String compareOptions, String filterFilePath, Boolean includeTestData, String sqlDataGeneratorProjectFilePath, Int32 commandTimeout)
    2016-10-04T14:55:52.0990829Z ##[error] at RedGate.DLMAutomation.PowerShell.Commands.InvokeDlmDatabaseTestsCommandImpl.Process()
    2016-10-04T14:55:52.1000828Z ##[error] at RedGate.DLMAutomation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord()
    2016-10-04T14:55:52.1000828Z ##[error] at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation)
    2016-10-04T14:55:52.1010829Z ##[error] --- End of inner exception stack trace ---
    2016-10-04T14:55:52.1010829Z ##[error] at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
    2016-10-04T14:55:52.1020820Z ##[error] at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
    2016-10-04T14:55:52.1020820Z ##[error] at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
    2016-10-04T14:55:52.1030837Z ##[error] at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
    2016-10-04T14:55:52.1030837Z ##[error] at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
    2016-10-04T14:55:52.1040822Z ##[error] at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken, Int32 timeoutInMinutes)
    2016-10-04T14:55:52.1040822Z ##[error] at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource)
  • I'm going to create a support ticket for you so that I can continue troubleshooting there. You'll receive an email shortly.
    Software Engineer
    Redgate Software
  • GiorgiGiorgi Posts: 18 Bronze 3
    Hello, I have the same issue, can I also get the link for support ticket?
  • Hi @Giorgi, if you have a support and upgrades contract with us you can submit a ticket here. One of the team will be in touch shortly after you do that. Please try to give us as much information as possible as it will help us help you!
    Customer Support Agent
  • GiorgiGiorgi Posts: 18 Bronze 3
    Hi @Giorgi, if you have a support and upgrades contract with us you can submit a ticket here. One of the team will be in touch shortly after you do that. Please try to give us as much information as possible as it will help us help you!

    Hello @michaelwhittaker ,
    I've already added the ticket three days ago ...
    Ticket ID: 96358
  • Hi Giorgi,

    That's great. I can see one of the team is already in contact with you.

    All the best,

    Michael
    Customer Support Agent
  • GiorgiGiorgi Posts: 18 Bronze 3
    Thank you Michael,
    Giorgi
Sign In or Register to comment.