Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

DROP DATASHARE - Amazon Redshift

DROP DATASHARE

Drops a datashare. This command isn't reversible.

Only a superuser or the datashare owner can drop a datashare.

Required privileges

Following are required privileges for DROP DATASHARE:

  • Superuser

  • Users with the DROP DATASHARE privilege

  • Datashare owner

Syntax

DROP DATASHARE datashare_name;

Parameters

datashare_name

The name of the datashare to be dropped.

DROP DATASHARE usage notes

When using the DROP DATASHARE statement, consider the following:

  • In general, we recommend that you don't drop an AWS Data Exchange datashare using the DROP DATASHARE statement. If you do, the AWS accounts that have access to the datashare lose access. Performing this type of alteration can breach data product terms in AWS Data Exchange.

    The following example shows an error when an AWS Data Exchange datashare is dropped.

    DROP DATASHARE salesshare; ERROR: Drop of ADX-managed datashare salesshare requires session variable datashare_break_glass_session_var to be set to value '620c871f890c49'

    To allow dropping an AWS Data Exchange datashare, set the following variable and run the DROP DATASHARE statement again.

    SET datashare_break_glass_session_var to '620c871f890c49';
    DROP DATASHARE salesshare;

    In this case, Amazon Redshift generates a random one-time value to set the session variable to allow DROP DATASHARE for an AWS Data Exchange datashare.

Examples

The following example drops a datashare named salesshare.

DROP DATASHARE salesshare;
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.