• sps备份数据恢复过程中遇到的问题


    在备份出portal的数据库后,公司的域控制器重新安装,不过域的名称没有更改
    在恢复sps的数据库后出现问题,除了域管理员的账号外,其他人都无法登陆sps。
    用户能够正确通过ad集成验证,可是到sps本身的权限检查的时候却不能顺利通过

    我打开site数据库中的userinfo表,发现tp_login字段存储的域名和用户名都正确。
    在portal 中的用户管理功能,所有的用户都不能够修改,或添加提示“此用户已经存在”。
    在现在的新域上增加新用户,用户可以正常使用。在portal 上的用户管理中删除原始用户,然后
    再添加同一个用户,则还是提示用户应经存在,不能正确添加。

    再数据库userinfo表中,删除原始用户纪录,在增加同一个用户,增加的用户可以正常使用。

    看来问题出在userinfo中的数据和ad 中用户信息同步上,因为tp_login 字段的内容都相同,
    肯定还有别的字段表示用户信息,挨个检查userinfo的字段发现tp_systemID最可疑,不过它数据类型是binary类型的 ,估计应该就是这个字段对应着ad中用户的ID字段。
    问题找出来了,可是却不知道怎么去修改tp_systemID,上网搜索
    终于找到了一篇blog有这方面的介绍:(感谢dustin)
    http://www.sharepointblogs.com/dustin/archive/2004/09/10/756.aspx
    内容如下:

    Thanks to my good friend Jeremy McMahan for finding the suser_sid() function for me -- My original solution was a crazy mix of linked servers and the Directory Services provider for OLEDB!

    Ever migrate your SharePoint site to a totally new environment and discover that your efforts to re-create your Active Directory were all for nothing, since all the users got new SIDs?  Symptoms like: The administrator of the server can log in, but nobody else can, even though you're SURE their usernames and passwords are right.

    Here's a script that'll fix that up for you in a jif.  Open Query Analyzer and run it against the content database for your site, and it will update all the SIDs for your users to the SID that is reported for that user by Active Directory.

    Big fat disclaimer: Microsoft does NOT support ANY modifications to your SharePoint databases.  That's not to say they won't support your SharePoint site, but if this operation breaks your server, Microsoft won't help you.  I'm not responsible for the results, either, while we're on the subject of passing the buck.  BACK UP YOUR DATABASE.

    Okay, now that we've gotten that mumbo-jumbo out of the way, here's the code.

    DECLARE @login varchar(40), @systemid varbinary(128)
    
    DECLARE curUsers CURSOR LOCAL FOR 
    SELECT tp_login, tp_systemid FROM userinfo where tp_deleted = 0
    
    OPEN curUsers
    
    	FETCH NEXT FROM curUsers INTO @login, @systemid
    
    WHILE @@FETCH_STATUS = 0
    BEGIN
    	PRINT 'Resetting user ' + @login + ' to new SID '
    	PRINT suser_sid(@login)
    	UPDATE UserInfo
    		SET tp_systemid = suser_sid(tp_login) WHERE CURRENT OF curUsers
    	FETCH NEXT FROM curUsers INTO @login, @systemid
    END
    
    CLOSE curUsers
    DEALLOCATE curUsers
    
    GO
    按照上面说的,到userinfo数据库执行脚本


    接着重新启动服务器,发现问题已经解决了
  • 相关阅读:
    05-3. 六度空间 (PAT)
    05-2. Saving James Bond
    05-1. List Components (PAT)
    04-3. Huffman Codes (PAT)
    04-2. File Transfer (PAT)
    04-1. Root of AVL Tree (PAT)
    03-3. Tree Traversals Again (PAT)
    03-2. List Leaves (PAT)
    03-1. 二分法求多项式单根(PAT)
    CDH Namenode自动切换(active-standby)
  • 原文地址:https://www.cnblogs.com/umlchina/p/167256.html
Copyright © 2020-2023  润新知