Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Error prompt when DYNSA given with DYNGRP role membership

(0) ShareShare
ReportReport
Posted on by 3,795

After the databases is restored into a new SQL instance, and then DNYSA cannot logon oto GP.

So, logon with sa and reset DYNSA password, then grant it with database ownership for all the company databases & DYNAMICS. Then ensure DYNSA is the db_creator SQL server role.

Then this DYNSA user will be granted with database role membership named "DYNGRP', but it prompted error message.

http://img511.imageshack.us/img511/4586/20100502000231.png  (screenshot of the error)

Please advise me and many thanks in advance.

 

*This post is locked for comments

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: Re: Re: Re: Re: Re: Re: Error prompt when DYNSA given with DYNGRP role membership

    DYNSA is the database owner, I don't think you need to add it to the DYNGRP role.

  • William Kow Profile Picture
    William Kow 3,795 on at
    Re: Re: Re: Re: Re: Re: Error prompt when DYNSA given with DYNGRP role membership

    Many thanks to Mariono reply.

    Referring to your SQL scripts:

    if exists(select * from sys.sysusers where name = 'DYNSA')

    drop user DYNSA;

    go

    exec sp_changedbowner 'DYNSA';

    I should use this script whenever I need to change database ownership to DYNSA ??

    Anyway, I have executed for all databases, but sorry to say that I still having the problem to grant DYNSA to DYNGRP in User Mapping.

    You advices is most appreciated. Thank you.

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: Re: Re: Re: Re: Error prompt when DYNSA given with DYNGRP role membership

    I guess this explains it. You can then run the following:

     

    use DYNAMICS;   -- you will change here for your company database too

    go

    if exists(select * from sys.sysusers where name = 'DYNSA')

    drop user DYNSA;

    go

    exec sp_changedbowner 'DYNSA';

     

  • William Kow Profile Picture
    William Kow 3,795 on at
    Re: Re: Re: Re: Error prompt when DYNSA given with DYNGRP role membership

    Many thanks to Mariano reply.

    BTW, the DYNSA is not even exist in DYNAMICS and no in each of the company databases.

    DYNSA was removed from each databases (but exist is SQL instance Security Logins) -- reason because the sp_changedboner 'DYNSA' command cannot be executed -- error related to alias exist in the databases.

    Thus, your suggest commands will also given error message (see below) -- DYNSA is not exist in databases.

    Msg 15410, Level 11, State 1, Procedure sp_addrolemember, Line 80
    User or role 'DYNSA' does not exist in this database.

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: Re: Re: Error prompt when DYNSA given with DYNGRP role membership

    Try running the following script against your company database:

     

    exec sp_droprolemember 'DYNGRP', 'DYNSA';

    exec sp_addrolemember 'DYNGRP', 'DYNSA';

     

    Once you have ran these two, run the GRANT.SQL script

  • William Kow Profile Picture
    William Kow 3,795 on at
    Re: Re: Error prompt when DYNSA given with DYNGRP role membership
    Dear Richard, Many thanks for your reply. Appreciate if you can still assist me as I have run the Grant.sql for DYNAMICS and each company databases. BTW, DYNSA has ownership of DYNAMICS and all company databases, and DYNSA has db_creator, public and serveradmin and securityadmin server roles. But when I try to granted DYNSA with DYNGRP database role membership, but it prompted the same error message. http://img511.imageshack.us/img511/4586/20100502000231.png Please advice. Many thanks in advance.
  • Richard Whaley Profile Picture
    Richard Whaley 25,195 on at
    Re: Error prompt when DYNSA given with DYNGRP role membership

    did you run Grant.SQL from the GP sql folder?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,375 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans