![]() ![]() :: If omitted, the script will request elevation and add the current user (pre-elevation) to the sysadmin role. :: %2 specifies the principal identity to be added (in the form "\"). :: Input: %1 specifies the instance name to be modified. ![]() :: CMD script to add a user to the SQL Server sysadmin role :: PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. :: IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR :: ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY :: THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ![]() :: This code is licensed under the Microsoft Public License. I saved it after confirming it worked it worked-so I'm sharing it with others here. I got this from GitHub "Script to add the current user to the sysadmin role in SQL Server" a few years back and used it for an SQL Express install to grant the sysadmin access to a local admin account on a server. bat file by renaming a text document and then it needs executed as a batch script. Try this script and see if it adds the user account that you execute it as the sysadmin access to the SQL Server instance on your Windows machine. SQL Express Batch Script: Add Account to SQL Server SysAdmin Role ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |