Note
Kailangan ng pahintulot para ma-access ang page na ito. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
Applies to:
SQL Server
Azure SQL Managed Instance
Removes a partition scheme from the current database. Partition schemes are created by using CREATE PARTITION SCHEME and modified by using ALTER PARTITION SCHEME.
Transact-SQL syntax conventions
Syntax
DROP PARTITION SCHEME partition_scheme_name
[ ; ]
Arguments
partition_scheme_name
The name of the partition scheme to be dropped.
Remarks
A partition scheme can be dropped only if there are no tables or indexes currently using the partition scheme. If there are tables or indexes using the partition scheme, DROP PARTITION SCHEME returns an error. DROP PARTITION SCHEME doesn't remove the filegroups themselves.
Permissions
The following permissions can be used to execute DROP PARTITION SCHEME:
ALTER ANY DATASPACEpermission. This permission defaults to members of the sysadmin fixed server role and the db_owner and db_ddladmin fixed database roles.CONTROLorALTERpermission on the database in which the partition scheme was created.CONTROL SERVERorALTER ANY DATABASEpermission on the server of the database in which the partition scheme was created.
Examples
The following example drops the partition scheme myRangePS1 from the current database:
DROP PARTITION SCHEME myRangePS1;
Related content
- CREATE PARTITION SCHEME (Transact-SQL)
- ALTER PARTITION SCHEME (Transact-SQL)
- sys.partition_schemes (Transact-SQL)
- EVENTDATA (Transact-SQL)
- sys.data_spaces (Transact-SQL)
- sys.destination_data_spaces (Transact-SQL)
- sys.partitions (Transact-SQL)
- sys.tables (Transact-SQL)
- sys.indexes (Transact-SQL)
- sys.index_columns (Transact-SQL)