Book Image

SQL Server on Linux

Book Image

SQL Server on Linux

Overview of this book

Microsoft's launch of SQL Server on Linux has made SQL Server a truly versatile platform across different operating systems and data-types, both on-premise and on-cloud. This book is your handy guide to setting up and implementing your SQL Server solution on the open source Linux platform. You will start by understanding how SQL Server can be installed on supported and unsupported Linux distributions. Then you will brush up your SQL Server skills by creating and querying database objects and implementing basic administration tasks to support business continuity, including security and performance optimization. This book will also take you beyond the basics and highlight some advanced topics such as in-memory OLTP and temporal tables. By the end of this book, you will be able to recognize and utilize the full potential of setting up an efficient SQL Server database solution in your Linux environment.
Table of Contents (13 chapters)

Backup and restore

Now it's time for SQL coding and implementing backup/restore operations in our own environments. We will use the University database that you created in Chapter 4, Database in the Sandbox:

  1. First let's create a full database backup of our University database:
        1> BACKUP DATABASE University
        2> TO DISK = '/var/opt/mssql/data/University.bak'
        3> GO
        
        Processed 376 pages for database'University', file 'University' on file 1.
        Processed 7 pages for database 'University', file 'University_log' on file 1.
        BACKUP DATABASE successfully processed 383 pages in 0.562 seconds (5.324 MB/sec)
  1. Now let's check the content of the table Students:
        1> USE University                                                                      ...