I am in the brain stroming position. I thought, explain geeks, then they can help me solve this problem.
I have a table named Sharepoint_Users in Oracle (see format and data below). I have access to Oracle DB from the link server. Do not worry about this. Just consider this is the SQL table.
SharePoint_Users ID status is called 1 active-passive 3 active 4 passive 2 Another two tables aspnet_user and aspnet_UsersInRoles SQL Server.
aspnet_users user ID username A7DFDDAE-4DB8-476D-9C29-677763406F71 1 D9910E14-9206-4460-88 CA -4 C39DE620192 2 F 188 B1 DF -03 A 6-4332-BA89- 3B 3C 6682 e 9 BA 3728 e 77 e 7-693 A -40l5-9 2 ca. -02F0A403C29A 4 asnet_usersInRoles UserID RoleId A7DFDDAE-4DB8-476D-9C29-677763406F71 1E36A840-2EBB-44EC-8861-0E3D262AC676 ---- & gt; Inactive D9910E14-9206-4460-88CA-4C39DE620192 0B54F223-E0D4-4CFC-84C3-7C98C1BFC6DA --- & gt; Active Now here's the challenge
* "actively" in SharePoint_Users table when the user's status to "inactive" or "inactive" to "active" Changes. We need to update the RoleID to the same user in the asnet_usersInRoles table. * And I did not find the need to insert the new records that do not exist in those asnet_usersInRoles table but in aspnet_users table if aspnet_users user should not include them in asnet_usersInRoles. (Always users will have the same SharePoint_Users and aspnet_users) Please help me to write a sp to this. I will run the job for this SP every 1 hour to update.
In order to be able to update the SharePoint_Users I think that you need a trigger but You also write that you will run SP every 1 hour ...
Anyway there is an assembly statement for the second part and an updated statement for the first part. Since you do not know the updates have been changed to updates in all rows.
Choose userID in the asnet_usersInRoles (User ID, RollID), Case S [Position] when 'active' and '0B54F223 -E0D4-4CFC-84C3-7C98C1BFC6DA' balance '1E36A840-2EBB-44EC-8861-0E3D262AC676' t as internally as end s of aspnet_users (ID based on [ status] ID, minutes ([status]) Choose from SharePoint_Users group) is joining au.UserName = s.ID where no update asnet_usersInRoles set RoleId = s case (as where au.UserID = uir.UserID UIR Select * from asnet_usersInRoles). [Position] when 'active' and '0B54F223-E0D4-4CFC- 84C3-7C98C1BFC6DA' balance '1E36A840-2EBB-44EC-8861-0E3D262AC676' UIR join aspnet_users internally as U at the end of asnet_usersInRoles uir.UserID = U.UserID is included in the Indoor (ID, minute ([status]) selection as [status] from the SharePoint_Users group ID) as the user name = s.ID
Comments
Post a Comment