Posts

Showing posts from May, 2019

Biml metadata connection snippet

var metadataConnection = SchemaManager.CreateConnectionNode( "db_metadata" , RootNode.Connections[ "db" ].RenderedConnectionString); List< string > includedSchemas = new List< string >{ "schema1" }; List< string > includedTables = null ; var metadataSchema = metadataConnection.GetDatabaseSchema( includedSchemas, includedTables, ImportOptions.None); foreach ( var t in metadataSchema.TableNodes) { //perform biml magic }

Decrypted @on_success_action and @on_failure_action snippet for sp_add_jobstep

declare    @quitWithSuccess tinyint = 1,   @quitWithFailure tinyint = 2,   @gotoNextStep tinyint = 3,   @gotoStep tinyint = 4