From the course: Database Foundations: Administration

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

View permissions on SQL Server

View permissions on SQL Server

From the course: Database Foundations: Administration

Start my 1-month free trial

View permissions on SQL Server

- [Instructor] Like in PostgreSQL, finding information about your user accounts in SQL Server requires a couple of queries to the system catalog views. I'm going to go into the Two Trees database, up here in the SQL Server instance, and right-click on it and choose New Query. Then I'm going to paste in the contents from the exercise file called Permissions.SQLServer.txt. Now, the first thing we need to do here, is create a user account that we can look at. We're going to create a user named Hiroshi, and I'm using the WITH LOGIN keywords here, after the CREATE USER statement. The WITHOUT LOGIN keywords, allows us to create a user within the database that's not connected to a SQL Server login account. This is kind of a shortcut here, since we won't actually be trying to gain access to the database with Hiroshi's account. In this exercise, we don't technically need a server login and a database user. So this will allow us to…

Contents