简体   繁体   中英

Import large database from bacpac with SQL Server Management Studio

I'm trying to import a large database to a Microsoft SQL Server 2016 (v13.0.2164.0) from a bacpac export with Microsoft SQL Server 2016 Management Studio.

To import I right click Databases , select Tasks and Import Data-tier Application .

The problem is that it always times out. I managed to do the import by truncating a large tables with unimportant data, but I have other databases to import where I can't delete as much, so I'm wondering how I can do such imports without getting a timeout

Try this cmd:

"C:\\Program Files (x86)\\Microsoft SQL Server\\130\\DAC\\bin\\SqlPackage.exe" /Action:Import /SourceFile:"c:\\DB.bacpac" /TargetConnectionString:"Data Source=localhost;Initial Catalog=DB;Integrated Security=True;" /p:CommandTimeout="0"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM