using below tool, you can backup a database, with all user defined objects, as a script and save it to the file.... without any third party/extra tool.
NOTE: download the ZIP file "DBScriptGenerator.zip"
After download, extract the zip and place it anywhere you want.
in my case, location is -- "C:\DBScriptGenerator\"
this zip file contains an EXE file named "DBScriptGenerator.exe", along with the other DLL files.
now we have to call this executable from anywhere we can. of course, we need to pass all the parameters.
in my case, I am calling from CMD...
Format :
DBScriptGenerator.exe "DatabaseServerName" "DatabaseName" "DatabaseUser" "DatabasePassword" "FullPathToSaveWithFileName"
Example:
DBScriptGenerator.exe "PRODSV" "EMPMAS" "UADMIN1" "u@Dwin!" "C:\DBScriptGenerator\EMPMAS.sql"
NOTE:::
for Advanced users only ...
There is a DLL file, DBScriptGenerator.dll, available to use programmatically. we can use this DLL from C# classes and/or SSIS scripts also.
Object List: Table, Procedure, Function, View, Trigger, Schema, assembly .. all user objects
Share reusable code, script, component. Reusable Database scripts. Different kinds of automation tools like SSIS, Batch ... please write a Comment to do batter ...
Showing posts with label script all db objects. Show all posts
Showing posts with label script all db objects. Show all posts
Tuesday, May 16, 2017
Backup SQL Server DB Objects (user defined) as script
Labels:
all objects,
assembly,
backup database,
create script,
dll to create db script,
Function,
procedure,
Schema,
script,
script all db objects,
SSIS Script,
table,
Trigger,
user defined,
user objects,
View
Location:
Dhaka, Bangladesh
Subscribe to:
Posts (Atom)
