Code error automating replication script

  • Hi there!

    I am trying to test the code below and receiving an error. I've used this code for other things and it seems to work on those.

    exec sp_grant_publication_access @publication = 'Application', @login = @Domain + '\Username'

    GO

    Error.

    Msg 102, Level 15, State 1, Line 24

    Incorrect syntax near '+'.

    Any assistance would be greatly appreciated!

    Happy Friday!

    ¤ §unshine ¤

  • Try this...

    SET @DomainUser=@Domain + '\Username' -- New Variable & concat operation

    exec sp_grant_publication_access @publication = 'Application', @login = @DomainUser

    GO

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply