February 7, 2012 at 3:17 am
Hello,
I would like to have information about the scripts before and after applying a snapshot.
When I do an initial snapshot, scripts are executed but for a "normal" snapshot, they are not!!!
why?
thank you.
February 7, 2012 at 4:09 am
If I understand correctly, you mean the before and after scripts set in a publication.
I'm not 100% on the difference between a normal and not normal snapshot!
If you mean the initialisation snapshot and any modification (additonal/change articles) snapshots then what is happening is correct. Before and after scripts are only applied for initialisation of the subscriber.
What are you trying to achieve?
February 7, 2012 at 5:46 am
It's exactly what i mean!!
I want to keep the indexes on the subscriber when I adds a table to a publication.
So I wrote a script that create all indexes (script before) and i apply it after the snapshot.
How can I do the same as initial snapshot because when I adds the table to the publication, the table is dropped and create (without the specific indexes of the subscriber)
thx
February 7, 2012 at 7:35 am
So you are adding an article to a publication where the object already exists on the subscriber?
You can change the default action on adding an article to something other than drop.
sp_addarticle @pre_creation_cmd = none|drop|delete|truncate
February 8, 2012 at 7:38 am
Yes, the object already exists.
the problem is that someone has accidentally uncheck an article and when it have been recheck we lost indexes.
So it's why I want to automize the export/import indexes before/after a snapshot to avoid those problems.
Is there a solution to apply scripts (before/after) in those cases?
thx
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply