SQLEXPRESS: Unterschied zwischen den Versionen

Aus Doku-Wiki
Zur Navigation springenZur Suche springen
Zeile 26: Zeile 26:
 
=Microsoft SQL Management Studio installieren=
 
=Microsoft SQL Management Studio installieren=
 
* [https://docs.microsoft.com/de-de/sql/ssms/download-sql-server-management-studio-ssms Download SQL Management Studio]
 
* [https://docs.microsoft.com/de-de/sql/ssms/download-sql-server-management-studio-ssms Download SQL Management Studio]
 +
Die Software mit Administratoren Berechtigung ausführen.

Version vom 16. April 2020, 11:02 Uhr

Benutzer mit der Berechtigung "sysadmin" einrichten

1. Shut down the SQL Server (SQLEXPRESS) windows service
2.  Open a command window (as admin) and run single-user mode as local admin with this command:

 "c:\Program Files\Microsoft SQL Server\MSSQL[XX].SQLEXPRESS\MSSQL\Binn\sqlservr.exe" -m -s SQLEXPRESS
3.  Open another cmd window (as admin)
4.  open sqlcmd:

    sqlcmd -S .\SQLEXPRESS

    Now add the sysadmin user ( Substitute your own domain and user name in the example below ):

      a.  sp_addsrvrolemember 'YourDomainName\YourUserName', 'sysadmin'

      b.  GO
5.  Now Ctrl+C the single-user mode from the first cmd window to kill SQL Server. 

Now restart it from services the normal way. Log into Management Studio and the user you created should be listed under logins with the credential of "sysadmin."

Microsoft SQL Management Studio installieren

Die Software mit Administratoren Berechtigung ausführen.