499
Chapter 19: Confi guring SQL Server
19
cross database chaining is used. If the source object in the source database and the target
object in the target database are owned by the same login, SQL Server does not check per-
missions on the target objects.
The cross db ownership chaining option enables control of the cross database owner-
ship chaining for all databases. By default, the cross db ownership chaining option
is turned off (0). This is good because it ensures maximum security. If you turn this option
on (1), database owners and members of the db_ddladmin or the db_owners database
roles can create objects owned by other users. These objects can potentially target objects
in other databases. This means you must fully trust these users with data in all databases.
In Management Studio, you can turn on cross database ownership chaining by checking the Cross Database
Ownership Chaining option on the Server Properties Security tab (refer to Figure 19-8).
In code, to turn on cross database ownership chaining, do the following:
EXEC sp_configure 'cross db ownership chaining', 1;
RECONFIGURE;
When you turn off (0) the cross db ownership chaining option , you can control cross database ownership
chaining at the database level with the SET DB_CHAINING option of the ALTER DATABASE command.
For more information about locking down SQL Server’s security, refer to the chapters in Part 6,
“Securing Your SQL Server.”
Connection-Confi guration Properties
The connection-confi guration properties, as shown in Table 19-5, can set connection
options in SQL Server.
TABLE 19-5 Connection-Confi guration Properties
Property Level* Graphic Control Code Option
Max
Concurrent
User
Connections
S Management
Studio
EXEC sp_configure 'user
connections'
Query Cost
Governor
CS Management
Studio
EXEC sp_configure 'query
governor cost limit'
SET QUERY_GOVERNOR_COST_LIMIT 15
Permit Remote
Server
Connections
S Management
Studio
EXEC sp_configure 'remote
access'
Continues
c19.indd 499c19.indd 499 7/30/2012 5:43:00 PM7/30/2012 5:43:00 PM
http://www.it-ebooks.info