Default data folder on Linux

  • Comments posted to this topic are about the item Default data folder on Linux

  • That is really interesting, thanks Steve
    Learned something new.

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • Yes, the correct path (for SQL Server 2017 on Linux at least) is actually /var/opt/mssql/data. I doubt that's changed for 2019 Preview though. The question being asked is still relevant though, even if the original default path is missing a directory; as you don't need to specify the original path in the command.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thom A - Thursday, January 31, 2019 2:18 AM

    Yes, the correct path (for SQL Server 2017 on Linux at least) is actually /var/opt/mssql/data. I doubt that's changed for 2019 Preview though. The question being asked is still relevant though, even if the original default path is missing a directory; as you don't need to specify the original path in the command.

    But the main thing is not the explicit path spec, but the use of 'set defaultdatadir' without the filelocation. prefix:
    sudo /opt/mssql/bin/mssql-conf set defaultdatadir /opt/mssql/data

  • morlindk - Thursday, January 31, 2019 2:51 AM

    Thom A - Thursday, January 31, 2019 2:18 AM

    Yes, the correct path (for SQL Server 2017 on Linux at least) is actually /var/opt/mssql/data. I doubt that's changed for 2019 Preview though. The question being asked is still relevant though, even if the original default path is missing a directory; as you don't need to specify the original path in the command.

    But the main thing is not the explicit path spec, but the use of 'set defaultdatadir' without the filelocation. prefix:
    sudo /opt/mssql/bin/mssql-conf set defaultdatadir /opt/mssql/data

    The filepath prefix isn't required if you've already navigated to /opt/mssql/bin/ or you've added it to .bash_profile as a PATH. It might be a helpful note in the comments of the answer but doesn't change the answer about what command syntax is correct here.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thom A - Thursday, January 31, 2019 2:57 AM

    The filepath prefix isn't required if you've already navigated to /opt/mssql/bin/ or you've added it to .bash_profile as a PATH. It might be a helpful note in the comments of the answer but doesn't change the answer about what command syntax is correct here.

    Well, to repeat myself I am still not referring to path spec of any kind, but to the filelocation. prefix required in the QOTD answer, but not included in the link given by me, quote: use mssql-conf with the "set filelocation.defaultdatadir /prod/data" parametervs. sudo /opt/mssql/bin/mssql-conf set defaultdatadir /opt/mssql/data

  • The incorrect answer is "set defaultdatadir /prod/data".

    The correct answer is "set filelocation.defaultdatadir /prod/data"

    This is specified in  https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-2017#datadir

    You are referencing an article that has a mistake. This might have worked at some CTP level, but this is not how it works now. Despite typos, here is what I tested on RHEL.

  • Steve Jones - SSC Editor - Thursday, January 31, 2019 9:43 AM

    The incorrect answer is "set defaultdatadir /prod/data".

    The correct answer is "set filelocation.defaultdatadir /prod/data"

    This is specified in  https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-2017#datadir

    You are referencing an article that has a mistake. This might have worked at some CTP level, but this is not how it works now. Despite typos, here is what I tested on RHEL.

    The typos just make it more realistic Steve. 😀

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • htey certianly do

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply