Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3288098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:34:07+00:00 2026-05-17T20:34:07+00:00

I’ve got a database from SQL Server 2005 that I am programmatically attaching to

  • 0

I’ve got a database from SQL Server 2005 that I am programmatically attaching to an instance of SQL Server 2008 R2, then re-establishing replication on some tables (via some pre-baked scripts that have worked for a small lifetime) with another server still running SQL Server 2005.

Suffice it to say it’s just a particularly convoluted business requirement.

Interestingly enough, the replication fails on a particular SQL Server Agent job with an error “Invalid column name ‘originator id'”. From what I can understand from this link: http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_24145417.html – the older database needs to have various bits and pieces upgraded to work correctly with SQL Server 2008 R2’s replication. That upgrade process is as simple as running the stored procedure sp_vupgrade_replication: http://technet.microsoft.com/en-us/library/ms188741.aspx

Question 1: Why is there ANY information about replication baked into the database I am attaching?! My understanding was that the distribution database contained the entirety of replication information. I have deleted and re-attached a non-upgraded copy of the database to make sure it still didn’t work to make sure I wasn’t going insane.

Question 2: I know there are some procedures that get executed to upgrade the database to a certain compatibility level when you attach a DB to a newer version of SQL Server. Why isn’t this stored procedure run?

Question 3: What exactly is this stored procedure changing? Is there any way I can find out any more than the MSDN article is offering me? I haven’t tried it, but I’m pretty sure SQL Profiler will just tell me that it is executing sp_vupgrade_replication and not give me any details of the queries it is running.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T20:34:07+00:00Added an answer on May 17, 2026 at 8:34 pm

    Question 1: It is the responsibility of the Publisher database to mark transactions for replication in its transaction log. The Log Reader Agent then monitors the Publisher’s transaction log, looking for marked transactions, and copies those to the Distribution database. See: sp_replcmds and sp_repldone for some additional details.

    Question 2: My guess (and it’s only a guess) would be that since the procedure upgrades both system and user databases, it is not automatically run during an attach operation.

    Question 3: You can view the details of the procedure yourself.

    use msdb
    go
    sp_helptext 'sys.sp_vupgrade_replication'
    go
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.