Hi All,
I need to transfer all users from LIVE to another Server.
Export part was done using query: exec sp_help_revlogin which will provide a lists of login id's and password. i copied this to a text file.
CREATE LOGIN [BruceLee] WITH PASSWORD = 0x01002A52EF6D9FBDB5DC11780391626B2DD9E3E2511F46138952 HASHED, SID = 0x0056703E08AE099D999453A4382428AA, CHECK_POLICY = ON, CHECK_EXPIRATION = OFF;
1.When I execute this query of create login it give me error:
Msg 15433, Level 16, State 1, Line 1
Supplied parameter sid is in use.
2. Also how or where can I get a script to grant all users that is created in the above lists to view State?
PS: I am a newbie in SQL
0
Comments
USE [master]
GO
GRANT VIEW SERVER STATE TO [public]
2
If you want go grant VIEW SERVER STATE permission ONLY to the users created by your script (and personally I can't see any good reason why not to grant VIEW SERVER STATE to public role) copy a list of users taken from Windows Login table to some Excel speadsheet and prepare a list of GRANT VIEW SERVER STATE TO [user 1], GRANT VIEW SERVER STATE TO [user 2] and so on statements. Copy and paste it into SSMS and you are done.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
thanks for advising, I'll be granting ALL users with GRANT VIEW SERVER STATE.
is the syntax exactly >> USE [master] GO GRANT VIEW SERVER STATE TO [public]
by the way, how do I create user based on the users lists (text format) generated ?
It is enought if you create SQL Server LOGINs corresponding to users found in Database User and or Windows Login tables. NAV will create users in the database for you when you re-validate entries or synchronize security,
For LOGINS using database authentication (entries found in Database User table)
For LOGINS using Windows Authentication (entries found Windows Logins table)
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
PS: I click on Database Server> Query> Paste the code
USE [master]
GO
GRANT VIEW SERVER STATE TO [public]
LOGIN