Cara mengatasi SQL Server Error User Group or Role Already Exists in the Current Database

Cara mengatasi SQL Server Error User Group or Role Already Exists in the Current Database

Cara mengatasi SQL Server Error User Group or Role Already Exists in the Current Database


Masalah ini saya temukan ketika telah berhasil me restore sebuah database SQL Server dan login menggunakan akun user database tersebut. Error tersebut adalah:

"Error User Group or Role Already Exists in the Current Database"

Setelah dianalisa ternyata error ini terjadi karena user yang kita restore pada saat restore database telah ada sebelumnya pada database tersebut. Solusinya adalah kita harus menjalan sebuah script sql dibawah ini.
sp_change_users_login 'AUTO_FIX', 'nama_user_database';

Setelah anda melakukan eksekusi pada sintaks diatas maka akan muncul pesan seperti dibawah ini.

The row for user 'nama_user_database' will be fixed by updating its login link to a login already in existence.
The number of orphaned users fixed by updating users was 1.
The number of orphaned users fixed by adding new logins and then updating users was 0.

Setelah ini seharusnya anda sudah bisa kembali login ke database SQL Server anda menggunakan akun tersebut.
Semoga bermanfaat.

Sumber:
https://ardalis.com/sql-server-error-user-group-or-role-already-exists-in-the-current-database

COMMENTS

Name

Apache,4,Bisnis Online,1,Blog,10,Blogger,6,Cpanel,1,CSS,1,Database,1,Framework,1,Hacking,3,HTML,1,HTML and CSS,2,Info,2,Javascript,2,Javascript and AJAX,5,Keamanan Web,1,linux,2,MIGAS,1,MySQL,3,Networking,1,Open GL,1,Optimasi Website,7,Pemrograman java,1,Pemrograman web,5,Perusahaan,1,PHP,7,phpMyAdmin,1,SEO,4,SQL Injection,3,SQL Server,13,SQLMap,3,Website,1,Wordpress,4,Xampp,1,
ltr
item
Nanang Gunawan Blog: Cara mengatasi SQL Server Error User Group or Role Already Exists in the Current Database
Cara mengatasi SQL Server Error User Group or Role Already Exists in the Current Database
Cara mengatasi SQL Server Error User Group or Role Already Exists in the Current Database
https://4.bp.blogspot.com/-4VMSdgsX0Z0/XEbRcIlZ7SI/AAAAAAAAC18/A5QrRT2zTbsF6gBWu05Md66Ap4X3fMYNgCLcBGAs/s1600/Cara%2Bmengatasi%2BSQL%2BServer%2BError%2BUser%2BGroup%2Bor%2BRole%2BAlready%2BExists%2Bin%2Bthe%2BCurrent%2BDatabase.jpg
https://4.bp.blogspot.com/-4VMSdgsX0Z0/XEbRcIlZ7SI/AAAAAAAAC18/A5QrRT2zTbsF6gBWu05Md66Ap4X3fMYNgCLcBGAs/s72-c/Cara%2Bmengatasi%2BSQL%2BServer%2BError%2BUser%2BGroup%2Bor%2BRole%2BAlready%2BExists%2Bin%2Bthe%2BCurrent%2BDatabase.jpg
Nanang Gunawan Blog
http://www.nananggunawan.com/2019/01/cara-mengatasi-sql-server-error-user.html
http://www.nananggunawan.com/
http://www.nananggunawan.com/
http://www.nananggunawan.com/2019/01/cara-mengatasi-sql-server-error-user.html
true
4195327445586723627
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy