1

I am looking at the data kept in the various SQL Replication tables. I am trying to understand what information is available and what it means.

In this example I have push replication on the database AdventureWorks2014 in a SQL 2017 Enterprise edition instance. The subscription is on the same instance.

The table sysarticles has the column status and it is showing a value of 57, I don't understand how that is possible, nor what it might mean

status tinyint

The bitmask of the article options and status, which can be the bitwise logical OR result of one or more of these values:

1 = Article is active.

8 = Include the column name in INSERT statements.

16 = Use parameterized statements.

24 = Both include the column name in INSERT statements and use parameterized statements.

64 = Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.

For example, an active article using parameterized statements would have a value of 17 in this column. A value of 0 means that the article is inactive and no additional properties are defined.

This query

SELECT TOP (1000) [artid]
      ,[del_cmd]
      ,[dest_table]
      ,[filter]
      ,[ins_cmd]
      ,[name]
      ,[pubid]
      ,[status]
      ,[type]
      ,[upd_cmd]
      ,[schema_option]
  FROM [AdventureWorks2014].[dbo].[sysarticles]

Gives these results

sysarticles

There is one clue (emphases mine)

The bitmask of the article options and status, which can be the bitwise logical OR result of one or more of these values:

Which leads to sp_addarticle Additionally I have included the value of schema_option in the results the value in my example is 0x000000000803509F I am not sure how/if this could create the 57

schema_option binary(8)

A bitmask of the schema generation options for the article, which control what parts of the article schema are scripted out for delivery to the Subscriber. For more information about schema options, see sp_addarticle (Transact-SQL).

I can understand 17, but how do you get 57? 1+8+16+24=49

If you subtract one (57-1=56) Fifty Six is a factor of Eight, (7*8=56) but it is hard to imagine where any potential values could be reported twice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.