Following commands will provide you admin access for SQL Server instance.
Step 1: Run > Services.msc
Step 2: Stop SQL Server (Express)
Step 3: sc start mssql$sqlexpress -m -T3659 -T4010 -T4022
Step 4: sqlcmd -S [SQLInstanceName] -E
Example: sqlcmd -S ComputerName\sqlexpress -E
Step 5:
exec SP_ADDSRVROLEMEMBER 'domainname\username', 'sysadmin'
go
exit
Example:
exec SP_ADDSRVROLEMEMBER 'domainname\vxp1122', 'sysadmin'
go
exit
Step 6: sc start mssql$sqlexpress
FYI:
We also have admin access for (localdb)\v11.0
No comments:
Post a Comment