SqlServer linux - Ubuntu
Post date: Nov 20, 2016 1:49:08 PM
Stato attuale del servizio SqlServer linux
Avviare servizio SqlServer linux
Dove sono i dati dei database per SqlServer linux?
Aprire porta firewall database per SqlServer linux
systemctl status mssql-server
sudo service mssql-server start
/var/opt/mssql/data
sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent sudo firewall-cmd --reload
Creare nuovo database per SqlServer linux
USE master ; GO CREATE DATABASE Sales ON ( NAME = Sales_dat, FILENAME = '/var/opt/mssql/data/saledat.mdf',
SIZE = 10, MAXSIZE = 50, FILEGROWTH = 5 ) LOG ON ( NAME = Sales_log, FILENAME = '/var/opt/mssql/data/saledat.ldf',
SIZE = 5MB, MAXSIZE = 25MB, FILEGROWTH = 5MB ) ; GO
Eliminare database per SqlServer linux
Ripristinare database per SqlServer linux
DROP DATABASE saledat;
RESTORE DATABASE [AdventureWorks] FROM DISK = N‘/var/opt/mssql/data/AdventureWorks2014.bak' WITH MOVE 'AdventureWorks2014_Data' TO N'/var/opt/mssql/data/AdventureWorks2014_Data.mdf', MOVE 'AdventureWorks2014_Log' TO N'/var/opt/mssql/data/AdventureWorks2014_Log.ldf';