Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Getting error in SQL 2012 working fine in 2016

Getting error in SQL 2012 working fine in 2016

Scheduled Pinned Locked Moved Database
databasesharepointsql-serversysadmintesting
2 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GaneshVidiyala
    wrote on last edited by
    #1

    Hi when I execute the code in 2012 SQL Server we are getting following error: Could not find stored procedure 'sp_set_session_context'. Automation Exception: Could not find stored procedure 'sp_set_session_context' We tested in 2016 server it is working fine but when we moved to 2012 this is failing. when I searched online I come to know that 'sp_set_session_context' it is new future introduced in 2016, I need relevant commands to implement same in 2012 server..

    J 1 Reply Last reply
    0
    • G GaneshVidiyala

      Hi when I execute the code in 2012 SQL Server we are getting following error: Could not find stored procedure 'sp_set_session_context'. Automation Exception: Could not find stored procedure 'sp_set_session_context' We tested in 2016 server it is working fine but when we moved to 2012 this is failing. when I searched online I come to know that 'sp_set_session_context' it is new future introduced in 2016, I need relevant commands to implement same in 2012 server..

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      GaneshVidiyala wrote:

      I need relevant commands to implement same in 2012 server..

      The stored procedure itself uses something that doesn't exist in the older version. So that isn't going to help you. You are not going to easily replace that. 1. It is just a name/value store HOWEVER it is tied to the transaction. 2. So each transaction you would need to 'create' a corresponding store 3. For each transaction you would need to destroy the corresponding store. If you fail to do this you will eventually have a data problem. 4. Then you can use the store, maybe. I suspect it is easier to just re-write the functionality. I suspect someone just used it so they wouldn't need to pass data around. So pass the data. And/or untie it from the transaction - just tie it to the processes that use it.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups