If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Database Refresh -- Group ID Mismatch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-09-10, 20:04
ramjitu ramjitu is offline
Registered User
 
Join Date: Jan 2009
Posts: 14
Database Refresh -- Group ID Mismatch

Hi,

Doing a Database Refresh activity.

Taken backup of PROD server wanted it to restored on UAT server.

Before restoring it on UAT server taken backup of sysusers and sysalternates to retain the user info on the UAT server.

Loaded UAT and done bcp in of sysusers and sysalternates.

But now enduser is complaining about permission issue.

Checked and found that there is Group ID mismatch.

Gid from PROD and UAT have been different.


How do I deal these situation. Has anybody faced such a scenario.

Please suggest.
Reply With Quote
  #2 (permalink)  
Old 04-12-10, 09:48
MCrowley MCrowley is online now
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,899
Generate a script with the group memberships, and all the permissions assigned to these groups. Then drop the groups, and re-add them in the same order they appear in the production system. Confirm the groups have the same GIDs. This should only have to be done once, as the bcp out of the sysusers table should cover any future refreshes.
Reply With Quote
  #3 (permalink)  
Old 05-23-10, 08:34
ramjitu ramjitu is offline
Registered User
 
Join Date: Jan 2009
Posts: 14
Thanks Mcrowley .... But I find generating the script for group permission is tedious (if tools are not used)

How about updating the gid directly in the sysusers .... is it ok ... has anybody tried this out ...
Reply With Quote
  #4 (permalink)  
Old 05-25-10, 04:48
Martijnvs Martijnvs is offline
Registered User
 
Join Date: Jan 2004
Location: The Hague/Utrecht, NL
Posts: 415
Updating the systables is possible, but be careful. Only do this kind of stuff if you're sure what you're doing.
My experience is limited to Adaptive Server Enterprise, and in ASE groups are special entries in sysusers.
What is the exact problem? Are users not part of the group with permissions? Or does the group not have the proper permissions in the database?
__________________
I'm not crazy, I'm an aeroplane!
Reply With Quote
  #5 (permalink)  
Old 06-02-10, 07:02
sudarao sudarao is offline
Registered User
 
Join Date: Mar 2007
Posts: 72
use <dbname>
go
sp_configure 'allow updates', 1
go
update sysusers set a.suid = b.suid from sysusers a, master..syslogins b
where a.name = b.name
go
sp_configure 'allow updates', 0
go

the above should reset the suid in the sysusers table in the database

suda
Reply With Quote
  #6 (permalink)  
Old 06-07-10, 05:37
jannovak jannovak is offline
Registered User
 
Join Date: Feb 2009
Location: Prague
Posts: 17
From my practice, I would suggest to put "begin tran" before the update statement :-) And commit it only after checking that sysusers contains what is expected...

For the first time, do it manually, record the actions in the script for particular database and next time refreshing UAT you can run this "fix" from script.

Last edited by jannovak; 06-07-10 at 06:03.
Reply With Quote
Reply

Tags
gid mismatch, groupid mismatch

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On