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
Mihaela Blendea 9ccc8a17fb Update vdipipesample.cpp
Fix sample to work on SLES. . The issue is in access to the shared memory that VDI uses to communicate between SQL Server and the client application. When opening the file, the mode is modified by the current umask setting and group sharing is removed.
2017-05-19 14:58:55 -07:00
..
2017-03-13 18:18:45 -07:00
2017-03-13 18:34:22 -07:00
2017-03-13 18:18:45 -07:00
2017-03-13 18:18:45 -07:00
2017-05-19 14:58:55 -07:00

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