1

I am trying to generate Schema with 90000 tables from Generate Script option but after sometime it returns error. DB size 600 GB. What's the other way around?

Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptPub‌​lishException: An error occurred while scripting the objects. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Xml.XmlTextReaderImpl.InitStreamInput(Uri baseUri, String baseUriStr, Stream stream, Byte[] bytes, Int32 byteCount, Encoding encoding) at System.Xml.XmlTextReaderImpl..ctor(String url, Stream input, XmlNameTable nt) at System.Xml.XmlTextReader..ctor(Stream input) at

McNets
  • 23,979
  • 11
  • 51
  • 89
Debajit Chandra
  • 125
  • 2
  • 6

2 Answers2

1

You can try with:

Visual Studio

  • Create a new Sql Server project.
  • Right click on the project and select Import - Database

You'll get an structure like this:

enter image description here

Third party tools like:

ApexSQL

Script SQL objects and data into scripts and deployment packages

DbSchema

I've not tested it.

http://www.dbschema.com/

SQL Power architect

Has a community edition.

McNets
  • 23,979
  • 11
  • 51
  • 89
0

Try to use SSIS which is the simplest method.

Or generate the script for each table in a separate .sql file. then create a batch file to execute one by one.

TheDataGuy
  • 1,986
  • 5
  • 36
  • 67