When databases are provisioned to the TRE, the project user account is granted read-only access to to it. This means you won’t be able to make any changes to the data. This has some advantages, such as being certain that the database provided remains in the original state - you can’t accidentally drop rows or entire tables. However, there are cases where you might need to add an additional table or column. For this reason, we also provide a “Working” database - this should have the almost same name as your data release, but with an additional suffix. We always provide the Working database in an empty state, so you can use it as you wish.
These instructions describe the process for creating a writable copy of your read-only database into your working database table.
\uD83D\uDCD8 Instructions
These instructions use a fictional database provided by Microsoft called “AdventureWorks”. We will copy this into a read-write version called “AdventureWorks_Public”
Open Microsoft SQL Management Studio and start a connection to the database server. This has been described in our article on How do I connect to my study's SQL database?
Verify you can find your data release and working database in the list of databases on the left.
Right click on your read-only database (e.g. AdventureWorks2019), navigate to the Tasks submenu and select Export Data.
You will be prompted for connection details for the source database - these are the same as you used to open SQL Management Studio earlier. Once populated, click Next.
Repeat this for the destination connection, selecting the target “_Working” database from the Database dropdown. You can then click Next.
Leave the default “Copy data from one or more tables or views” selected and click Next.
The next step asks which tables you want to copy. You can select just a few, or use the heading checkbox to select all.
Highlight important information in a panel like this one. To edit this panel's color or style, select one of the options in the menu.