Aracılığıyla paylaş


sp_dbremove (Transact-SQL)

Bir veritabanı ve bu veritabanıyla ilişkili tüm dosyaları kaldırır.

Important noteImportant Note:

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Birlikte kullanmanız önerilir. VERİTABANINI BIRAKMA yerine.

Topic link iconTransact-SQL sözdizimi kuralları

sp_dbremove [ @dbname = ] 'database' [ , [ @dropdev = ] 'dropdev' ] 

Bağımsız değişkenler

  • [ @dbname= ] 'database'
    Is the name of the database to be removed.database is sysname, with a default value of NULL.

  • [ @dropdev= ] 'dropdev'
    Is a flag provided for backward compatibility only and is currently ignored.dropdev has the value dropdev.

Dönüş Kodu Değerleri

0 (başarılı) veya 1 (hata)

Sonuç Kümeleri

None

İzinler

Üyelik gerektirir sysadmin sabit sunucu rolü.

Örnekler

Aşağıdaki örnek, adlı bir veritabanı kaldırır. sales ve ilişkili tüm dosyaları.

EXEC sp_dbremove sales;