PCM600 requires access to the PCMSERVER2019ABB instance of SQL Server. The PCM user is added to PCMSERVER2014 Users Group in Windows to provide access.
During installation, the user logged in is automatically added to PCMSERVER2014 Users Group. If additional users are required, they have to be added to PCMSERVER2014 Users Group. This can be done by using lusrmgr.msc – Local Users and Groups (Local). The local Users and Groups function provides a possibility to add both local and network user accounts to PCMSERVER2014 Users Group.
Note: If the operating system and PCM600 installation is cloned to a different computer, the following message appears: “Access Denied. Current Windows user (“computer name/username”) has no privileges to access the SQL Server databases used by PCM600.” as only users from the original operating system and PCM600 installation image are authorized to access the cloned SQL Server.
Using administrator rights, run the following commands in command prompt to fix the issue. Replace the SOURCE_COMPUTER_NAME with the name of the computer used originally to create the image.
| net stop MSSQL$PCMSERVER2019ABB |
| net start MSSQL$PCMSERVER2019ABB /m |
| osql -E -S%computername%\PCMSERVER2019ABB -Q "drop login |
| [SOURCE_COMPUTER_NAME\PCMSERVER2014 Users]" |
| osql -E -S%computername%\PCMSERVER2019ABB -Q "drop user |
| [SOURCE_COMPUTER_NAME\PCMSERVER2014 Users]" |
| osql -E -S%computername%\PCMSERVER2019ABB -Q "create login [%computername% |
| \PCMSERVER2014 Users] from windows" |
| osql -E -S%computername%\PCMSERVER2019ABB -Q "alter server role sysadmin add |
| member[%computername%\PCMSERVER2014 Users]" |
| osql -E -S%computername%\PCMSERVER2019ABB -Q "create user [%computername% |
| \PCMSERVER2014 Users] FOR LOGIN [%computername%\PCMSERVER2014 Users]" |
| net stop MSSQL$PCMSERVER2019ABB |
| net start MSSQL$PCMSERVER2019ABB |