patternsqlMinor
Executing a very large SQL file
Viewed 0 times
executingfilesqllargevery
Problem
I have a 830mb
I wish to execute this SQL so it will create and insert data into a database on a hosted server. I cannot get it to open in SQL Server Management Studio or EMS SQL Manager.
How can I execute it?
.sql file which is a scripted DB.I wish to execute this SQL so it will create and insert data into a database on a hosted server. I cannot get it to open in SQL Server Management Studio or EMS SQL Manager.
How can I execute it?
Solution
Depends on db flavor, most provide command line tools to load sql files. Looks like you may be using ms sql, reference here http://technet.microsoft.com/en-us/library/ms165702(v=sql.105).aspx, more specific http://technet.microsoft.com/en-us/library/ms170572.aspx
sqlcmd -S myServer\instanceName -i C:\myScript.sqlCode Snippets
sqlcmd -S myServer\instanceName -i C:\myScript.sqlContext
StackExchange Database Administrators Q#54453, answer score: 9
Revisions (0)
No revisions yet.