microsoft / microsoft/sqlmanagementobjects

SMO Scripting - Missing regular property NotForReplication property bag state Lazy for type Trigger

Open
#198 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
143
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Not doing anything fancy, just scripting out tables with ScriptingOptions.Triggers enabled.

Prefetch grabs nearly everything, except for the NotForReplication field it seems. When trying to script out a table with triggers enabled, it still reaches out to the database to grab this field.

No idea if it's relevant as I have no clue how these files are structured/used (other than for generating the prefetch query), but maybe it has something to do with how it's configured in this file?

https://github.com/microsoft/sqlmanagementobjects/blob/17b6e3235f4a7267c920a79685ae1e8941961e92/src/Microsoft/SqlServer/Management/SqlEnum/xml/trigger.xml#L66-L68

I noticed for some reason its mode is set to deploy instead of design like the other fields. Might have nothing to do with it, but figured I would point it out in case it's helpful.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect src/Microsoft/SqlServer/Management/SqlEnum/xml/trigger.xml at lines 66-68 and compare the NotForReplication field with the surrounding fields. Trace how its mode affects prefetching when ScriptingOptions.Triggers is enabled; done means scripting the table no longer queries the database for this field.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.