O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The sys User

The sys account gives users access to system objects such as system tables, system views, extended stored procedures, and other objects that are part of the system catalog. The sys user owns these objects. Like the INFORMATION_SCHEMA user, it cannot be dropped from the database.

Tip

If you are interested in viewing the specific objects owned by any of the special users discussed in these sections, you can use a SELECT statement like the following:

Click here to view code image

--Find all objects owned by a given userSELECT name, object_id, schema_id, type_descFROM sys.all_objectsWHERE OBJECTPROPERTYEX(object_id, N'OwnerId') =USER_ID(N'sys')ORDER BY 1

The SELECT in this example shows all the objects owned by the sys user. To change ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required