MSSQL Docker on UnRaid


Jaster

Recommended Posts

  • 8 months later...
On 5/26/2020 at 6:12 PM, Merrrp said:

I've been attempting to set up MS SQL Server too, I seem to get it up and running fine pointing the paths at /mnt/cache etc. (I'm using my own template repo here if it helps anyone, I'd also welcome any feedback on cleaning that template up a bit). I haven't given it any serious work to do yet so I may still run in to more issues.

 

The only issue I'm having currently is getting Unraid to detect available updates, I currently always get 'Not Available' - is anyone aware of a workaround for that other than an occasional force update? I'm guessing it's to do with MS using the mcr.* repo but I'm quite new to tinkering with Docker and these Unraid templates.

 

@Merrrp, thanks very much for your template - I'm using it successfully bar an issue with paths...

 

In the template I set both the data and log volume mounts and they appear to be mapped correctly:
DockerPaths.png.cf4bba74c4f2df78794dd9d24124ed56.png

 

...however, when I look at the server properties in SQL Server Management Studio all the Data, Log and Backup paths have all been set to the same directory /var/opt/mssql/data:

InstancePaths.png.2fdce013048dcf9c04b048049bb4a080.png

 

So it looks like setting the data directory is successful but not the log directory and there appears to be no way to set the backup directory. I know I can set them after the container is running using mssql-conf but I'd really like to have them set properly as part of the template.

 

Do you have any ideas what is wrong here? Thanks!

Edited by writablevulture
  • Like 1
Link to comment
  • 1 month later...
On 9/22/2021 at 4:04 PM, writablevulture said:

 

@Merrrp, thanks very much for your template - I'm using it successfully bar an issue with paths...

 

In the template I set both the data and log volume mounts and they appear to be mapped correctly:
DockerPaths.png.cf4bba74c4f2df78794dd9d24124ed56.png

 

...however, when I look at the server properties in SQL Server Management Studio all the Data, Log and Backup paths have all been set to the same directory /var/opt/mssql/data:

InstancePaths.png.2fdce013048dcf9c04b048049bb4a080.png

 

So it looks like setting the data directory is successful but not the log directory and there appears to be no way to set the backup directory. I know I can set them after the container is running using mssql-conf but I'd really like to have them set properly as part of the template.

 

Do you have any ideas what is wrong here? Thanks!

 

@writablevulture

You're welcome, glad it helped!

I've checked my configuration and I see the same paths showing in the SSMS server properties window, but when I check the contents of the paths I've configured I can see things appear to be going in the correct places on disk.

 

After some digging I've realised I think it's just the naming of things being confusing. The two settings in the template are for the container paths whereas it sounds like you want to configure the server DB defaults within the container? If so I suspect what you want might be these docs:

MSSQL_BACKUP_DIR	Set the Default backup directory location.
MSSQL_DATA_DIR	Change the directory where the new SQL Server database data files (.mdf) are created.
MSSQL_LOG_DIR	Change the directory where the new SQL Server database log (.ldf) files are created.
MSSQL_DUMP_DIR	Change the directory where SQL Server will deposit the memory dumps and other troubleshooting files by default.

 

It's a little while since I looked at this so I'll sort out updating my template in due course, hopefully it helps folks get started.

Link to comment
  • 1 month later...
On 10/24/2021 at 10:45 AM, Merrrp said:

After some digging I've realised I think it's just the naming of things being confusing. The two settings in the template are for the container paths whereas it sounds like you want to configure the server DB defaults within the container? If so I suspect what you want might be these docs:

MSSQL_BACKUP_DIR	Set the Default backup directory location.
MSSQL_DATA_DIR	Change the directory where the new SQL Server database data files (.mdf) are created.
MSSQL_LOG_DIR	Change the directory where the new SQL Server database log (.ldf) files are created.
MSSQL_DUMP_DIR	Change the directory where SQL Server will deposit the memory dumps and other troubleshooting files by default.

 

Thank you, these variables work as you describe.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.