I am creating a job for adding article to a publication. the second step (e.g. for adding article) gives me error. I pass the name of the table as follow:
EXEC sp_addarticle
@publication = 'TTB', --THE NAME OF MY PUBLICATION
'select top (1)' @article = 'Name from TableAdded Order by create_date Desc',
'select top (1)' @source_object = 'Name from TableAdded Order by create_date Desc',
@force_invalidate_snapshot = 1;
TableAdded is a table I have in my publisher which contains the name of the newly added table.
I believe it fails because the way I pass the name of the article to the store procedure is not correct. Can anyone please help me on that?
Kind regards
Amin