SQL Server/T-SQL/System/sp dboption — различия между версиями

Материал из SQL эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 13:46, 26 мая 2010

sp_dboption "Northwind", "autoclose", "TRUE"

 

3> sp_dboption "Northwind", "autoclose", "FALSE"
4> GO
Msg 15010, Level 16, State 1, Server J\SQLEXPRESS, Procedure sp_dboption, Line 64
The database "Northwind" does not exist. Use sp_helpdb to show available databases.
Available databases:
--------------------------------------------------------------------------------------------------------------------------------
master
tempdb
model
msdb
ClubRoster
1> SELECT name, is_auto_close_on
2> FROM sys.databases
3> WHERE name = "Northwind"
4> GO
name                                                                                                                             is_auto_close_on
-------------------------------------------------------------------------------------------------------------------------------- ----------------
(0 rows affected)
1> sp_dboption "Northwind", "autoclose", "TRUE"
2> GO
Msg 15010, Level 16, State 1, Server J\SQLEXPRESS, Procedure sp_dboption, Line 64
The database "Northwind" does not exist. Use sp_helpdb to show available databases.
Available databases:
--------------------------------------------------------------------------------------------------------------------------------
master
tempdb
model
msdb
ClubRoster
1> SELECT name, is_auto_close_on
2> FROM sys.databases
3> WHERE name = "Northwind"
4> GO
name                                                                                                                             is_auto_close_on
-------------------------------------------------------------------------------------------------------------------------------- ----------------
(0 rows affected)