/build/static/layout/Breadcrumb_cap_w.png

Add current user as SQLSYSADMINACCOUNTS while unattended installation of sql server 2008 R2


I am trying to install SQL server 2008 Standard and developer edition on windows 7 64 bit machine using configurationfile.ini where I have assigned the following value to SQLSYSADMINACCOUNTS:

SQLSYSADMINACCOUNTS="Builtin\Administrators"

I can not access the database and get "access denied" error. I narrowed down the issue and it seems that by default it adds the local administrator (i.e. adminstrator) to sysadmins. How can I add the current logged in user as sysadmin? I have also tried using following values:-

SQLSYSADMINACCOUNTS="%USERDOMAIN%\Users"
SQLSYSADMINACCOUNTS="%USERDOMAIN%\%USERNAME%"

But, none of the above worked. Note:- I don't want to hard-code this value as <hostname>\<UserName>, I need this installation to run by any logged-in admin credentials.


0 Comments   [ + ] Show comments

Answers (1)

Posted by: anonymous_9363 4 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ