1
0
mirror of https://github.com/Microsoft/sql-server-samples.git synced 2025-12-08 14:58:54 +00:00
Files
sql-server-samples/samples/features/sqlvdi-linux/README.md
2017-03-13 18:34:22 -07:00

1.5 KiB

SQLVDI for Linux

This folder contains the latest files and samples required to build a SQL Server VDI based backup/restore application for Linux.

Files available

  1. vdi.h
  2. vdierror.h
  3. vdipipesample.cpp
  4. MAKEFILE

Known Bugs

There is a problem with VDF_LikeDisk and VDF_RandomAccess where the backup/restore is aborted unexpectedly.

Steps

  1. Install the mssql-server and mssql-tools packages 

    Install SQL Server on Linux  Install SQL Server tools on Linux   

  2. Install the clang and uuid-dev packages in order to build the sample.

    Example (for Ubuntu): 

    sudo apt-get install clang 
    sudo apt-get install uuid-dev 
    
  3. Create a symbolic link to sqlcmd in /usr/bin

    sudo ln -s /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd
    
  4. Copy the vdi sample files to a directory on your Linux machine.

  5. Run make to build the sample code

  6. Run the vdi client as the mssql user or follow these instructions:

    • Add the user running the vdi client to mssql group sudo usermod -a -G mssql vdiuser.
    • Add the mssql user to the vdi client user's group sudo usermod -a -G vdiuser mssql.
    • Reboot
  7. Run the following command to issue a database backup of pubs:

    LD_LIBRARY_PATH="/opt/mssql/lib" ./vdipipesample B D pubs sa <SQLSAPASSWORD> /tmp/pubs.bak