惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
T
Threatpost
C
CERT Recently Published Vulnerability Notes
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
K
Kaspersky official blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
Project Zero
Project Zero
H
Heimdal Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Know Your Adversary
Know Your Adversary
Google Online Security Blog
Google Online Security Blog
W
WeLiveSecurity
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
News | PayPal Newsroom
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
V
Vulnerabilities – Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
S
Securelist
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
NISL@THU
NISL@THU
N
News and Events Feed by Topic
S
Security Affairs
The Last Watchdog
The Last Watchdog
T
Tor Project blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
P
Palo Alto Networks Blog
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
C
Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security

博客园 - Charles Chen

.Net Framework 4.x 程序到底运行在哪个 CLR 版本之上(ZT) C#常用工具类——Excel操作类(ZT) C#程序以管理员权限运行(ZT) why happen "WaitHandles must be less than or equal to 64" fsn文件解析(C#) OLDB读取excel的数据类型不匹配的解决方案(ZT) 加密配置文件(App.Config和Web.config)中connectionStrings通用方法 WinForm中使用XML文件存储用户配置及操作本地Config配置文件(zt) 理解DllImportAttribute中的属性 Winform中消息循环、异步操作、Control.Invoke&Control.BeginInvoke学习 Winform打包程序制作的快捷方式指向错误的位置(指向安装包文件) Reflector导出.NET工程项目的修复 存储过程返回值及输出参数笔记 使用本地系统帐户和域用户帐户两者区别(microsoft SQLServer2000)(ZT) SQL字符串的分组聚合(ZT) SQL中使用update inner join和delete inner join (ZT) C# ComboBox(DropDownList)数据绑定后,怎样再添加选项(ZT) 项目维护之WinXP IIS中HTTP500的来龙去脉 一次项目维护案例而对事务学习的笔记
MS SQL执行大脚本文件时,提示“内存不足”的解决办法()
Charles Chen · 2016-08-09 · via 博客园 - Charles Chen

问题描述:

当客户服务器不允许直接备份时,往往通过导出数据库脚本的方式来部署-还原数据库,

但是当数据库导出脚本很大,用Microsoft SQL Server Management Studio执行脚本时,往往会遇到“内存不足”的提示。

解决办法:

用微软自带的sqlcmd工具,可以导入执行。以SQL Server 2008R版本为例:

第一步:Win+R 键入:cmd 命令,开启命令行工具;

第二步:键入:cd C:\Program Files\Microsoft SQL Server\100\Tools\Binn (具体目录路径跟你安装的SQL位置有关)

第三步:键入:sqlcmd -S . -U sa -P 123 -d test -i data.sql

参数说明:-S 服务器地址 -U 用户名 -P 密码  -d 数据库名称 -i 脚本文件路径 

(建议将数据脚本文件拷到此目录,就只用写文件名,而不用写全路径了),注意参数大小写和空格符号。