# opalR database creation

**URL:** <https://datashield.discourse.group/t/opalr-database-creation/727>\
**Category:** Beginner Support\
**Created:** [1 March 2023 15:53 UTC](https://datashield.discourse.group/t/opalr-database-creation/727 "2023-03-01T15:53:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aakkoc](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/aakkoc/32/200_2.png) [@aakkoc](https://datashield.discourse.group/u/aakkoc)\
**Post date:** [1 March 2023 15:53 UTC](https://datashield.discourse.group/t/opalr-database-creation/727/1 "2023-03-01T15:53:15Z")

</div>

Hi,

While following the OpalR [Cookbook Tutorial](https://www.obiba.org/opalr/articles/opal-projects.html), I found myself stuck on the following part

```auto
if (opal.project_exists(o, "dummy"))
  opal.project_delete(o, "dummy")  
opal.project_create(o, "dummy", database = TRUE)
opal.project(o, "dummy")

```

The docker console logs the following error indicating that the DB for this project does not exist. : `ERROR org.obiba.opal.core.service.DatasourceLoaderServiceImpl - Datasource Loader 1: loading datasource of project dummy failed for database: mongodb`

Do I need to follow some other step before, to ensure a valid database is created? Preferably within OpalR, without switching to web app. Thanks in advance 😃

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/yannick/32/19_2.png) [@yannick](https://datashield.discourse.group/u/yannick)\
**Post date:** [1 March 2023 16:31 UTC](https://datashield.discourse.group/t/opalr-database-creation/727/2 "2023-03-01T16:31:57Z")

</div>

Hi,

If the database you registered (called `mongodb` apparently) is functional (is it?), there is nothing more to be specified. You can list the databases that can be associated to a project with the function [opal.projects\_databases](https://www.obiba.org/opalr/reference/opal.projects_databases.html).

Regards  
Yannick
