New answers tagged


If no code page conversions are necessary (i.e. either not changing code pages or changing code pages but no characters being used are different between the code pages; and this only pertains VARCHAR data), then there is an undocumented option that might be much quicker, both in terms of time spent working out the solution, and time spent moving data. In ...


I have generated the script of my whole SQL Server database into a file and it's more than 36 G Don't include the data in the script. That option is intended for small tables. Instead script only the DDL, and use the Copy Database Wizard, or INSERT ... SELECT queries to copy the data.


I suggest you use some other tool to execute the script file. I'm thinking SQLCMD.EXE, for instance. And if you need to edit the file, use a good editor that can handle large text files (i.e., work witch chunks of the file in memory instead of the whole file). I found this conversation on SO on such editors. (I'm not surprised that SSMS is choking on the ...


scripting out to a file the entire 36GB database is not a good idea. I think the right way to do it is to backup/restore the database. To backup the database: BACKUP DATABASE [WideWorldImporters] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup\WideWorldImporters-Full.bak' WITH STATS = 1 GO To restore the database: USE [...

Top 50 recent answers are included