Search notes:

SQL Server: Schemas

A schema is a named set (a container) of database objects. It allows to group objects into namespaces.
A schema can be assigned security rules which will be inhertied to objects as they are created within the schema.
A schema has an owner which can be any database principal. (The same principal can own multiple schemas).

Default schema name

The default schema name for a newly created database is dbo.

Query objects in a schema

The following query finds all objects (tables, views etc.) in a schema:
select
  sch.name       schema_name,
  obj.name       object_name,
  obj.type_desc  object_type
from
  sys.schemas sch      join
  sys.objects obj on sch.schema_id = obj.schema_id
where
  sch.name = 'sys'
;
Github repository about-MSSQL, path: /administration/schemas/sql/find-objects.sql
See also find tables by column name.
The stored procedure sp_tables can be used to find tables and views in a given schema.

Default schemas

SQL Server comes with 10 (?) predefined schemas:
All of these schemas except dbo, guest, sys and INFORMATION_SCHEMA can be dropped.

See also

The available schemas can be queried in

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1737519113, '18.225.98.190', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/administration/schemas/index(90): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78