diff --git a/lib/setup.php b/lib/setup.php
index bf7b6e36828c5e8116095775ee0d58cb6fee8186..61210560aba6d600328ddcb90a1676c7e334910e 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -285,6 +285,7 @@ class OC_Setup {
                                         } else {
 
                                                 OC_CONFIG::setValue('dbuser', $dbuser);
+                                                OC_CONFIG::setValue('dbname', $dbname);
                                                 OC_CONFIG::setValue('dbpassword', $dbpass);
 
                                                 //create the database not neccessary, oracle implies user = schema