赞
踩
本文将介绍如何在Mac电脑上搭建SQL Server,主要涉及以下应用软件:
其中1可以理解为Adapter;2,3可以连接到本地mssql,并通过GUI运行sql脚本。
# Format
docker pull mcr.microsoft.com/mssql/server:<image_tag>
# Example:
docker pull mcr.microsoft.com/mssql/server:2019-latest
# Format
docker run -d --name <container_name> -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<strong_pwd>’ -e 'MSSQL_PID=<edition>’ -p 1433:1433 -d mcr.microsoft.com/mssql/server:<image_tag>
# Example
docker run -d --name jll_dev -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=@dmin!234' -e 'MSSQL_PID=Express' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
Specify your own strong password that is at least 8 characters and meets the SQL Server password requirements. Required setting for the SQL Server image.
当我们把bak文件存在Mac的某个目录下后,可以使用命令行将文件转存到container的文件系统中,然后使用Azure Data Studio的Restore操作来恢复数据。
# Format:
sudo docker exec -it <container_name> mkdir var/opt/mssql/backup
# Example: 在容器的文件系统中创建一个backup文件夹
sudo docker exec -it jll_dev mkdir var/opt/mssql/backup
# 假如备份文件存在该目录下
cd /Users/xuyan/项目/公司/xxx/JLL/db
# 列举文件夹下的文件
ls
# 复制bak文件文件名,如:bak_file='Data_Backup_20210716.bak'
# Format:
sudo docker cp <bak_file> <container_name>:var/opt/mssql/backup
# Example: 将Mac本地的bak文件转存到Docker容器的文件系统目录下
sudo docker cp Data_Backup_20210716.bak jll_dev:var/opt/mssql/backup
#1. 免费的SFTP文件传输工具:Cyberduck
1.1 简介
Cyberduck is a free FTP client designed for both Windows and Mac. In fact, unlike most cross platform FTP client solutions, Cyberduck integrates seamlessly with your native Mac environment, making it one of the best Mac FTP clients available. It even supports Mac features such as storing login credentials in keychain and locating files in the Finder.
1.2 优点
1.3 缺点
Although Cyberduck works for both Windows and Mac users, this option is touted as one of the best for Mac users, as there are better Windows options available. That said, Cyberduck is an inexpensive solution that will get the job done whether you use Windows or Mac.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。