c# - SMO scripting entire database like Studio Management does with Generate Scripts -
i trying set c# tool scripts entire database tables down stored procedures. want schema , data. having hard time finding on net on how properly. think common practice alternative if don't wish dabase using backup or transfer, can't find on subject. can direct me on how or tell me needs done? have found how script tables , stored procedures, want in database can revert if changes database breaks other things.
one of reasons going way because know if backup:
a.) can corrupt b.) can on server hosting sql server. cannot on local machine if running application remotely sql server. of course assuming cannot rely on unc path or ftp script of kind.
have @ http://scriptdb.codeplex.com. tool scripts out database's ddl.
for scrripting out data try approach described here: http://sqlblog.com/blogs/ben_miller/archive/2007/10/18/scripting-tables-views-and-data-using-smo-part-3.aspx or try use bcp, wich better alternative bigger databases.
Comments
Post a Comment