I have removed some articles of my publication in transactional replication. I use the script below, and contrary to what I have found in documentation, it does not invalidate the snapshot of that publication.
I normally test this by running the snapshot agent, which, after about 12 seconds, tells me that there is no need to run a full snapshot.
How can I test whether the snapshot is good, without running it?
I don't want to run it, because if it is not good, I don't want to stop it in the middle, and I don't want to run it during the office hours.
thanks and regards
Marcelo
-- the script to remove an article from the replication is: (1) and (2) below:-- to be run at the publisher (in this case SERVER MYSERVER - DATABASE MYDATABASE
-- (1)
--use [MYDATABASE]
--exec sp_dropsubscription @publication = N'MYPUBLICATION', @article = N'tblTaxTransaction', @subscriber = N'all', @destination_db = N'all'
--GO
-- (2)
--use [MYDATABASE]
--exec sp_droparticle @publication = N'MYPUBLICATION', @article = N'tblTaxTransaction', @force_invalidate_snapshot = 1
--GO
--[ @force_invalidate_snapshot = ] force_invalidate_snapshot
--Acknowledges that the action taken by this stored procedure may invalidate an existing snapshot.
--force_invalidate_snapshot is a bit, with a default of 0.
--0 specifies that changes to the article do not cause the snapshot to be invalid.
--If the stored procedure detects that the change does require a new snapshot, an error occurs
--and no changes are made.
--1 specifies that changes to the article may cause the snapshot to be invalid,
--and if there are existing subscriptions that would require a new snapshot,
--gives permission for the existing snapshot to be marked as obsolete and a new snapshot generated.