SQL Script to attach a database
note: this script detaches it first
EXEC sp_detach_db @dbname = 'dbnametoattach'
EXEC sp_attach_single_file_db @dbname = 'dbnametoattach', @physname = 'c:\yourdirectory\dbnametoattach.mdf'
- Dan Lewis
Este browser já não é suportado.
Atualize para o Microsoft Edge para tirar partido das mais recentes funcionalidades, atualizações de segurança e de suporte técnico.
note: this script detaches it first
EXEC sp_detach_db @dbname = 'dbnametoattach'
EXEC sp_attach_single_file_db @dbname = 'dbnametoattach', @physname = 'c:\yourdirectory\dbnametoattach.mdf'
- Dan Lewis