Linux:location


Following are some commands to check the Location of MSSQL Files, Services, Ports, Error log in linux:

Start, restart, stop services:

To start service:
#systemctl start mssql-server.service

To restart service:
#systemctl restart mssql-server.service

To check the status of service
#systemctl status mssql-server.service


To check SQL Server port listening or not:

#netstat -ltnp | grep 1433

To check process of sqlserver, CPU & Memory :
#top


Detailed Error log message:

#cat /var/log/messages
or
#gedit /var/log/messages


MSSQL Files & Explaination:

Default locations:
Data, Log and Backup file arer stored in following location:
#cd /var/opt/data/

[root@localhost bin]# cd /var/opt/mssql/
[root@localhost mssql]# tree
.
├── data
│   ├── master.mdf
│   ├── mastlog.ldf
│   ├── modellog.ldf
│   ├── model.mdf
│   ├── msdbdata.mdf
│   ├── msdblog.ldf
│   ├── tempdb.mdf
│   └── templog.ldf
├── log
│   ├── errorlog
│   ├── errorlog.1
│   ├── errorlog.2
│   ├── errorlog.3
│   ├── HkEngineEventFile_0_131965325722020000.xel
│   ├── HkEngineEventFile_0_131965326649610000.xel
│   ├── HkEngineEventFile_0_131965326698640000.xel
│   ├── log_13.trc
│   ├── log_14.trc
│   ├── log_15.trc
│   ├── log_16.trc
│   ├── log_17.trc
│   ├── sqlagentstartup.log
│   ├── system_health_0_131965325738490000.xel
│   ├── system_health_0_131965326659670000.xel
│   └── system_health_0_131965326710160000.xel
├── mssql.conf
└── secrets
    └── machine-key

3 directories, 26 files



Installing a SQL Server instance creates following hierarchy in /var/opt/mssql with the followings items:

  • data folder = default folder for database data and transaction log files. By the way, system and tempdb database files are located here by default. 
  • log folder = log files are stored here. We may retrieve logs related to SQL Server engine (errorlog files), to the SQL Server agent here.
  • mssql-conf utility= Stores the default location files for user database files and dump files.
  • secret folder = contains the machine.key file used by the SQL Server engine or potential other files that come with high-availability architectures to store pacemaker credentials 

Some important files:

[root@localhost ~]# tree /opt/mssql/
/opt/mssql/
├── bin
│   ├── compress-dump.sh
│   ├── crash-support-functions.sh
│   ├── generate-sql-dump.sh
│   ├── handle-crash.sh
│   ├── mssql-conf
│   ├── paldumper
│   └── sqlservr
└── lib
    ├── libc++abi.so.1
    ├── libc++.so.1
    ├── libsqlvdi.so
    ├── libunwind.so.8
    ├── loc
    │   ├── de_DE
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── en_US
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── es_ES
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── fr_FR
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── it_IT
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── ja_JP
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── ko_KR
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── pt_BR
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── ru_RU
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   ├── zh_CN
    │   │   └── LC_MESSAGES
    │   │       └── sqlservr.mo
    │   └── zh_TW
    │       └── LC_MESSAGES
    │           └── sqlservr.mo
    ├── mssql-conf
    │   ├── checkinstall.sh
    │   ├── checkrunninginstance.sh
    │   ├── collations.txt
    │   ├── invokesqlservr.sh
    │   ├── loc
    │   │   └── mo
    │   │       ├── mssql-conf-de_DE.mo
    │   │       ├── mssql-conf-en_US.mo
    │   │       ├── mssql-conf-es_ES.mo
    │   │       ├── mssql-conf-fr_FR.mo
    │   │       ├── mssql-conf-it_IT.mo
    │   │       ├── mssql-conf-ja_JP.mo
    │   │       ├── mssql-conf-ko_KR.mo
    │   │       ├── mssql-conf-pt_BR.mo
    │   │       ├── mssql-conf-ru_RU.mo
    │   │       ├── mssql-conf-zh_CN.mo
    │   │       └── mssql-conf-zh_TW.mo
    │   ├── mssqlconfhelper.py
    │   ├── mssql-conf.py
    │   ├── mssqlsettingsmanager.py
    │   ├── mssqlsettings.py
    │   └── set-collation.sh
    ├── secforwarderxplat.sfp
    ├── sqlagent.sfp
    ├── sqlservr.sfp
    ├── system.certificates.sfp
    ├── system.common.sfp
    ├── system.netfx.sfp
    └── system.sfp

28 directories, 49 files


From the above output we may find out a bunch of files that are part of the proper functioning of SQL Server.

Most of these files are installed in the main hierarchy /opt/mssql/ with the following specific items
  • /opt/mssql/bin/ (binary files and SQL Server crash dump generation scripts)
  • /opt/mssql/lib (sqlserver libraries and sfp files)
  • /opt/mssql/lib/mssql-conf (python and bash scripts)

Name

Azure Backup Database Clustering Crash Dumps DBCC Deadlock Link Server Log Shipping Maintenance Migration Mirroring Monitoring Performance Tuning Permissions Post Installations Prerequisites Replication Restore Database SQL Installations SQL on Linux SQL Uninstallations SSIS T-SQL Windows Server
false
ltr
item
hybriddba.blogspot.com: Linux:location
Linux:location
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRz5DGwMxl6h6cP1itYGu51A6VYNaROS_5gcdR3T9BCYZ9gVJnNCBCqxFFe6TX98Ior4p8U7NPJn7qcY2E8M9DSkWOWfhbXsDdQ6D24MRMni2NmoG8e5O1-Spk_T5_4QuYp4Rywap_0y54/s1600/1579483971345689-0.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRz5DGwMxl6h6cP1itYGu51A6VYNaROS_5gcdR3T9BCYZ9gVJnNCBCqxFFe6TX98Ior4p8U7NPJn7qcY2E8M9DSkWOWfhbXsDdQ6D24MRMni2NmoG8e5O1-Spk_T5_4QuYp4Rywap_0y54/s72-c/1579483971345689-0.png
hybriddba.blogspot.com
https://hybriddba.blogspot.com/2019/05/linuxlocation.html
https://hybriddba.blogspot.com/
https://hybriddba.blogspot.com/
https://hybriddba.blogspot.com/2019/05/linuxlocation.html
true
7679493960263860249
UTF-8
Not found any posts Not found any related posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU Tag ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Contents See also related Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy