|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Monday, September 10, 2012 12:31 PM
Points: 56,
Visits: 129
|
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:37 PM
Points: 941,
Visits: 1,041
|
|
Thanks for article, I had found something similar at CodePlex, Link.
Only thing about CodePlex version was I couldn't get it to script out only the objects I wanted. So using DMO can give us that flexibility. Thanks.
---
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN. Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding... * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. 
How to ask for help .. Read Best Practices here.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, June 21, 2012 7:40 AM
Points: 26,
Visits: 84
|
|
Why is the script called with cscript rather than wscript? From Technet: Using the command-based script host (CScript.exe)
Cscript.exe is a command-line version of the Windows Script Host that provides command-line options for setting script properties.
With Cscript.exe, you can run scripts by typing the name of a script file at the command prompt. Like Microsoft Internet Explorer, Windows Script Host serves as a controller of Windows Script compliant scripting engines, but Windows Script Host has very low memory requirements. Windows Script Host is ideal for both interactive and non-interactive scripting needs, such as logon scripting and administrative scripting.
Windows Script Host supports scripts written in VBScript or JScript. When you start a script from your desktop or from the command prompt, the script host reads and passes the specified script file contents to the registered script engine. The script engine uses file extensions (that is, .vbs for VBScript and .js for JScript) to identify the script. As a result, you do not need to know the exact programmatic identifier (that is, the ProgID) of the script engine. The script host maintains a mapping of script extensions to programmatic identifiers, and uses the Windows XP association model to start the appropriate engine for a given script. For more information about Windows Script Host, see Windows Script Host For more information about CScript.exe, see To run scripts using the command-line-based script host (cscript.exe)
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Tuesday, November 22, 2011 8:44 AM
Points: 395,
Visits: 275
|
|
To be fair, I have not read your article, but I did notice that it uses DMO which is being replaced by SMO. We have found that although DMO does a fair job in SQL 2005, it does not script out everything as expected in SQL 2005 (e.g., jobs, varchar(max), etc.).
Aaron
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Tuesday, November 22, 2011 8:44 AM
Points: 395,
Visits: 275
|
|
To be fair, I have not read your article, but I did notice that it uses DMO which is being replaced by SMO. We have found that although DMO does a fair job in SQL 2005, it does not script out everything as expected in SQL 2005 (e.g., jobs, varchar(max), etc.).
Aaron
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, October 26, 2012 10:31 AM
Points: 8,
Visits: 30
|
|
| For scripting all your SQL objects to a Visual Studio Database project, you should do a Google search for "DbFriend".
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, October 26, 2012 10:31 AM
Points: 8,
Visits: 30
|
|
| For scripting all your SQL objects to a Visual Studio Database project, you should do a Google search for "DbFriend".
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, October 26, 2012 10:31 AM
Points: 8,
Visits: 30
|
|
| For scripting all your SQL objects to a Visual Studio Database project, you should do a Google search for "DbFriend".
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 8:15 PM
Points: 1,409,
Visits: 4,509
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, October 26, 2012 10:31 AM
Points: 8,
Visits: 30
|
|
I use DbFriend for: - clean organization (I can put my files anywhere on disk, not just where SMSS says). - clean, repeatable scripts (SMSS script options are many and if I forget to check/uncheck an option, all my scripting time is wasted) - comparing against Production (again, clean scripting makes this a reliable DIFF) - DATABASE FIND & REPLACE - working in my environment of choice (VS 2008) - encourages me to THINK about my SQL assets as compiled code, that I have to RUN against a SQL box first, then exercise using SMSS (and with dual monitors, this is a very fluid workflow)
|
|
|
|