sys.sp_detach_db

general
#stored-procedure

Description

Detaches a database that is currently not in use from a server instance and, optionally, runs on all tables before detaching. For a replicated database to be detached, it must be unpublished. For more information, see section later in this article.

Syntax

sp_detach_db
[ [ @dbname = ]
N
'dbname'
]
[ , [ @skipchecks = ]
N
'skipchecks'
]
[ , [ @keepfulltextindexfile = ]
N
'keepfulltextindexfile'
]
[ ; ]