diff --git a/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java b/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java
@@ -496,8 +496,26 @@ public class ODatabaseDocumentTx extends OListenerManger<ODatabaseListener> impl
           listener.onCreate(this);

         } catch (Throwable ignore) {

         }

-

     } catch (Exception e) {

+      // REMOVE THE (PARTIAL) DATABASE

+      try {

+        drop();

+      } catch (Exception ex) {

+        // IGNORE IT

+      }

+

+      // DELETE THE STORAGE TOO

+      try {

+        if (storage == null)

+          storage = Orient.instance().loadStorage(url);

+        storage.delete();

+      } catch (Exception ex) {

+        // IGNORE IT

+      }

+

+      status = STATUS.CLOSED;

+      owner.set(null);

+

       throw OException.wrapException(new ODatabaseException("Cannot create database '" + getName() + "'"), e);

     }

     return (DB) this;
Core: if the database cannot be created because an exception, now even if partially created, it's drop