I figure out the issue.
Problem: EXT3 files system is not supported.
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup
File System XFS or EXT4 (other file systems, such as BTRFS, are unsupported
Solution: Create an EXT4 file system.
- Comment the line in /etc/fstab that mounts the ext3 filesystem
vi /etc/fstab
-mount logical volume
"#/dev/vgsqldata/lvsqldata /sqldata ext3 defaults 1 1"
:wq!
- Reboot the server
reboot
- Check the file system is not mounted
df -kh
- Check the linear volume
vgscan
vgdisplay vgsqldata
lvdisplay -v /dev/vgsqldata/lvsqldata
- Format the volume as ext4
mkfs.ext4 /dev/vgsqldata/lvsqldata
- Mount
mkdir /sqldata
mount -t ext4 /dev/vgsqldata/lvsqldata /sqldata
df -kh
touch /sqldata/test.txt
ls -la /sqldata
rm -rf /sqldata/test.txt
- Persist the mount
vi /etc/fstab
-mount logical volume
/dev/vgsqldata/lvsqldata /sqldata ext4 defaults 1 1
- Change Owner
chown -R mssql:mssql /sqldata
ls -la /
"drwxr-xr-x. 5 mssql mssql 4096 Nov 7 10:43 sqldata"
Best Answer
Based on what you want I would do the following:
List.txt
(with the list of DBs you want to restore) andDBRestore.bat
with sqlcmd command to run a stored procedure 'DBRestore' insideSQL Server
SQL Server
temp table the list from theLIST.txt
and processes it - reads DB name one by one and restores them