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. sp_change_users_login 'problems'

sp_change_users_login 'problems'

Scheduled Pinned Locked Moved Database
helpsharepointdatabasesql-serversysadmin
2 Posts 1 Posters 0 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.
  • A Offline
    A Offline
    AlterD
    wrote on last edited by
    #1

    Hi there, Hope someone can help me, I'm trying to resolve orphaned users in SQL server. I created a procedure that works very nice in SQL server 2005, but it's having problems in SQL server 2000. Here is the problem part of my code: create table #Users( username varchar(20), userId varchar(250)) insert into #Users exec sp_change_users_login 'Report' select * from #Users Then I get this error: Server: Msg 15289, Level 16, State 1, Procedure sp_change_users_login, Line 27 Terminating this procedure. Cannot have an open transaction when this is run. Hope you can help. Thank you :)

    A 1 Reply Last reply
    0
    • A AlterD

      Hi there, Hope someone can help me, I'm trying to resolve orphaned users in SQL server. I created a procedure that works very nice in SQL server 2005, but it's having problems in SQL server 2000. Here is the problem part of my code: create table #Users( username varchar(20), userId varchar(250)) insert into #Users exec sp_change_users_login 'Report' select * from #Users Then I get this error: Server: Msg 15289, Level 16, State 1, Procedure sp_change_users_login, Line 27 Terminating this procedure. Cannot have an open transaction when this is run. Hope you can help. Thank you :)

      A Offline
      A Offline
      AlterD
      wrote on last edited by
      #2

      Hi again, Ok, I'm going to post my own fix on this :P But would still like ideas on the original problem, if someone has. I basically just did what the SP did in a short query: select name AS UserName, sid AS UserSID from sysusers where issqluser = 1 and (sid is not null and sid <> 0x0) and suser_sname(sid) is null order by name Kind regards

      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