зеркало из
https://github.com/iharh/notes.git
synced 2025-10-29 20:56:06 +02:00
m
Этот коммит содержится в:
родитель
3612188baa
Коммит
d5960cdab5
@ -10,6 +10,9 @@ https://hub.docker.com/_/microsoft-mssql-server
|
||||
|
||||
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-release-notes-2022
|
||||
Known issues
|
||||
SQL Server Configuration Manager can't connect to SQL Server on Linux.
|
||||
When restoring a database that was backed up on SQL Server on Windows,
|
||||
you must use the WITH MOVE clause in the Transact-SQL statement.
|
||||
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-faq
|
||||
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-deployment
|
||||
https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker
|
||||
@ -23,8 +26,6 @@ https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-co
|
||||
docker cp d6b75213ef80:/var/opt/mssql/log/errorlog /tmp/errorlog
|
||||
|
||||
|
||||
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools
|
||||
sql-cmd
|
||||
|
||||
https://github.com/microsoft/mssql-docker/tree/master/linux/preview/examples/mssql-customize
|
||||
|
||||
@ -40,6 +41,19 @@ issues
|
||||
db at startup
|
||||
https://github.com/microsoft/mssql-docker/issues/2
|
||||
|
||||
tools
|
||||
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools
|
||||
https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/connecting-with-sqlcmd
|
||||
https://packages.microsoft.com/config/ubuntu/
|
||||
https://packages.microsoft.com/config/ubuntu/22.04/
|
||||
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/packages.microsoft.gpg
|
||||
sudo su
|
||||
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
|
||||
exit
|
||||
sqlcmd -S localhost -U SA -Q 'select @@VERSION'
|
||||
sudo apt update
|
||||
sudo apt install unixodbc-dev
|
||||
sudo ACCEPT_EULA=Y apt install mssql-tools18
|
||||
vscode
|
||||
https://learn.microsoft.com/en-us/sql/tools/visual-studio-code/sql-server-develop-use-vscode
|
||||
azure data studio
|
||||
|
||||
5
db/sql/mssql/feature/create-db.txt
Обычный файл
5
db/sql/mssql/feature/create-db.txt
Обычный файл
@ -0,0 +1,5 @@
|
||||
if not exists (select name from sys.databases where name = N'TutorialDB')
|
||||
create database [TutorialDB]
|
||||
go
|
||||
alter database [TutorialDB] set query_store=on
|
||||
go
|
||||
7
db/sql/mssql/tools/azureds.txt
Обычный файл
7
db/sql/mssql/tools/azureds.txt
Обычный файл
@ -0,0 +1,7 @@
|
||||
https://learn.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio
|
||||
sudo apt install libxss1 libgconf-2-4 libunwind8
|
||||
sudo dpkg -i azuredatastudio-linux-<version string>.deb
|
||||
|
||||
keys
|
||||
F5
|
||||
run query
|
||||
8
db/sql/mssql/tools/go-sqlcmd.txt
Обычный файл
8
db/sql/mssql/tools/go-sqlcmd.txt
Обычный файл
@ -0,0 +1,8 @@
|
||||
https://learn.microsoft.com/en-us/sql/tools/sqlcmd/go-sqlcmd-utility
|
||||
https://github.com/microsoft/go-mssqldb
|
||||
https://github.com/microsoft/go-sqlcmd/discussions/367
|
||||
https://redmondmag.com/articles/2023/03/17/a-love--letter-to-the-command-line-tool-sqlcmd.aspx
|
||||
https://www.sqlservercentral.com/articles/experimenting-with-go-sqlcmd
|
||||
context
|
||||
https://www.sqlservercentral.com/articles/using-the-new-open-source-sqlcmd-to-create-containers
|
||||
https://dbafromthecold.com/2023/05/19/running-sql-server-in-a-container-with-sqlcmd/
|
||||
52
db/sql/mssql/tools/sqlcmd.txt
Обычный файл
52
db/sql/mssql/tools/sqlcmd.txt
Обычный файл
@ -0,0 +1,52 @@
|
||||
https://learn.microsoft.com/en-us/sql/tools/sqlcmd/sqlcmd-use-utility
|
||||
cmds to terminate blocking queries
|
||||
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools
|
||||
https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/connecting-with-sqlcmd
|
||||
https://packages.microsoft.com/config/ubuntu/
|
||||
https://packages.microsoft.com/config/ubuntu/22.04/
|
||||
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/packages.microsoft.gpg
|
||||
sudo su
|
||||
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
|
||||
exit
|
||||
sqlcmd -S localhost -U SA -Q 'select @@VERSION'
|
||||
sudo apt update
|
||||
sudo apt install unixodbc-dev
|
||||
sudo ACCEPT_EULA=Y apt install mssql-tools18
|
||||
|
||||
sqlcmd
|
||||
-?
|
||||
help
|
||||
-A
|
||||
admin-prompt (win-only?)
|
||||
-Q -q
|
||||
query
|
||||
-i <file>
|
||||
run sql from file
|
||||
-o <file>
|
||||
redirect output to file
|
||||
-S
|
||||
server or Dsn (if -D is provided)
|
||||
-G
|
||||
use Azure Active Directory for authentication
|
||||
When you want to use an Azure AD user name and password, you can provide the -G
|
||||
The -G parameter generates the following connection string in the backend: ...
|
||||
Known issue: Always start with the -G option followed by the -U option.
|
||||
-d
|
||||
use database name
|
||||
-E
|
||||
trusted connection (the default and does not need to be specified)
|
||||
-C
|
||||
enable protocol encryption
|
||||
-No
|
||||
...
|
||||
|
||||
commands
|
||||
:help
|
||||
:!!<shell-cmd>
|
||||
:connect myserver\instance1
|
||||
:go
|
||||
execute commands from buffer
|
||||
:r <file>
|
||||
loads commands from file into buffer
|
||||
:reset
|
||||
clear buffer
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user