:doc:`Glue <../../glue>` / Client / delete_database

***************
delete_database
***************



.. py:method:: Glue.Client.delete_database(**kwargs)

  

  Removes a specified database from a Data Catalog.

   

  .. note::

    

    After completing this operation, you no longer have access to the tables (and all table versions and partitions that might belong to the tables) and the user-defined functions in the deleted database. Glue deletes these "orphaned" resources asynchronously in a timely manner, at the discretion of the service.

     

    To ensure the immediate deletion of all related resources, before calling ``DeleteDatabase``, use ``DeleteTableVersion`` or ``BatchDeleteTableVersion``, ``DeletePartition`` or ``BatchDeletePartition``, ``DeleteUserDefinedFunction``, and ``DeleteTable`` or ``BatchDeleteTable``, to delete any resources that belong to the database.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteDatabase>`_  


  **Request Syntax**
  ::

    response = client.delete_database(
        CatalogId='string',
        Name='string'
    )
    
  :type CatalogId: string
  :param CatalogId: 

    The ID of the Data Catalog in which the database resides. If none is provided, the Amazon Web Services account ID is used by default.

    

  
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the database to delete. For Hive compatibility, this must be all lowercase.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

  
  *   :py:class:`Glue.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Glue.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Glue.Client.exceptions.OperationTimeoutException`

  
  *   :py:class:`Glue.Client.exceptions.ConcurrentModificationException`

  
  *   :py:class:`Glue.Client.exceptions.FederationSourceException`

  
  *   :py:class:`Glue.Client.exceptions.FederationSourceRetryableException`

  