Automate running a DDT Package

Author Message
 Posted 11/13/2008 3:42:33 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 1/10/2011 1:25:00 AM
Posts: 30, Visits: 416
I can see the command line for building a DDT package but am unable to locate any way of automatically running the package.

Are there command line options to the DDT to run the package?

Thanks,

Cory

Cory Cookson

Software Developer

Occupational Health Research

Post #20742
Add to Twitter Add to Facebook
 Posted 11/13/2008 5:07:41 AM
Strategic Support Team Member

Strategic Support Team MemberStrategic Support Team MemberStrategic Support Team MemberStrategic Support Team MemberStrategic Support Team MemberStrategic Support Team MemberStrategic Support Team MemberStrategic Support Team MemberStrategic Support Team Member

Group: StrataFrame MVPs
Last Login: 2/26/2021 10:30:31 PM
Posts: 1,920, Visits: 21,166
Hi Cory.

Do you mean to run the DDT to deploy the structures and data from the command line? Not that I know.

But you can create a deployment application very easily and use any DDT package to be deployed. Have a look at the samples, under the DatabaseInstallerSample to give you some ideas.

Post #20750
Add to Twitter Add to Facebook
 Posted 11/13/2008 7:40:28 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 1/10/2011 1:25:00 AM
Posts: 30, Visits: 416
Thanks for the Info Ivan Smile

Cory Cookson

Software Developer

Occupational Health Research

Post #20751
Add to Twitter Add to Facebook
 Posted 5/8/2014 7:28:00 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 4/6/2021 9:04:14 AM
Posts: 50, Visits: 183
Is the DatabaseInstallerSample supposed to  compile error free? The one in the StrataFrame C# samples?

Tags:
Post #32547
Add to Twitter Add to Facebook
 Posted 5/8/2014 7:46:41 AM
StrataFrame Developer

StrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame Developer

Group: StrataFrame Developers
Last Login: 5/16/2018 3:20:37 AM
Posts: 2,982, Visits: 2,482
It should.  Is it giving you a bunch of errors about "Table is not defined" and "Database is not defined?"  Stuff like that means you don't have the property SMO assemblies available on your computer.
Post #32549
Add to Twitter Add to Facebook
 Posted 5/19/2014 3:49:32 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 4/6/2021 9:04:14 AM
Posts: 50, Visits: 183
I am getting 1 error: Could not find 'Sub Main' specified for Main method.

The SampleDataInstallerClass rebuilds fine.

When rebuilding the SampleInstallerExecutable gives the error above.

The AppMain.cs has the following line in it:

[STAThread()]public static void Main()




So I am not certain what the error is about?
Post #32587
Add to Twitter Add to Facebook
 Posted 5/19/2014 7:45:48 AM
StrataFrame Developer

StrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame Developer

Group: StrataFrame Developers
Last Login: 5/16/2018 3:20:37 AM
Posts: 2,982, Visits: 2,482
Ross, you might have to change the "Startup Object" that is located on the Application tab of the project properties.  You should be able to select Program.cs in the combo box or something like that to set the entry point of the application.
Post #32592
Add to Twitter Add to Facebook
 Posted 5/20/2014 12:15:09 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 4/6/2021 9:04:14 AM
Posts: 50, Visits: 183
Perfect! That worked.
Post #32596
Add to Twitter Add to Facebook
 Posted 5/20/2014 4:07:07 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 4/6/2021 9:04:14 AM
Posts: 50, Visits: 183
That worked. Now my next issue: The DT package creates tables, views and also a UDF that 1 of the views refer to. The view and the UDF work perfect in SQL so there is no issue with Syntax of the View or UDF as far as SQL is concerned. But when I use the DT to dun the package I get an error when the View is being created:

Creating failed for view, Sql Exception: funcConvertVersionNumber is not recognized as a built in function name.

I played around with changing the "priority" of the UDF to be less than and also greater than the priority on the view with no luck.

Here is the view:

SELECT vc_int_codeid, vc_vcr_version, vc_dte_entry_date, vc_bit_mandatory, vc_vcr_ftp, funcConvertVersionNumber(vc_vcr_version) as VersionNumberValue FROM dbo.tblVersionControl




Here is the UDF as it appears in the dt:

(@VersionString varchar(30))
RETURNS decimal(20,3)
AS
BEGIN
 DECLARE @strVersionReversed varchar(30) -- holds reversed version number
 DECLARE @strVersionNumWhole varchar(30) -- holds whole number of converted version number
 DECLARE @strVersionNumDec varchar(20)   -- holds decimal number of converted version number
 DECLARE @decVersionConverted decimal(20,3)    -- holds converted version number
 
 -- reverse the version string
 SET @strVersionReversed =  REVERSE(@VersionString) 
 
 -- Separate the revision number from the major, minor, and build number
 SET @strVersionNumWhole = SUBSTRING(@strVersionReversed, CHARINDEX('.', @strVersionReversed) + 1, 30)
 SET @strVersionNumDec = SUBSTRING(@strVersionReversed, 1, CHARINDEX('.', @strVersionReversed))
 SET @strVersionNumWhole = REPLACE(REVERSE(@strVersionNumWhole), '.', '') -- reverse to proper order AND remove decimals
 SET @strVersionNumDec = REVERSE(@strVersionNumDec) -- reverse to proper order
 
 SET @decVersionConverted = CAST(@strVersionNumWhole + @strVersionNumDec as decimal(20,3)) -- build decimal value of version number


 RETURN(@decVersionConverted) -- return the number value
END


Why is this erroring?


Post #32598
Add to Twitter Add to Facebook
 Posted 5/20/2014 5:44:41 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 4/6/2021 9:04:14 AM
Posts: 50, Visits: 183
Not sure what I did but after rebuilding the package it now works.
Post #32599
Add to Twitter Add to Facebook


Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.