sql-serverschemaconnection-string

Possible to set default schema from connection string?


With SQL Server 2005 and 2008 is it possible to set the default schema from the connection string? It'd be a lot easier if we didn't have to manually set the schema with SQL code.


Solution

  • No, this is done at the database User level, not in the connection string.

    For reference, here are all of the properties which can be set in a connection string: https://www.connectionstrings.com/all-sql-server-connection-string-keywords/