469,603 Members | 2,049 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,603 developers. It's quick & easy.

command line

Using Query Analyzer, I can right click on an object and select "script
object to new window as create" and I get the text of the object's
definition (schema). Can I get same result from command line, i.e., from
osql, I can get text output for the definition of the object (something like
defncopy under Sybase)? If so, what is the command or store procedure name?

Thanks in advance.
Jul 23 '05 #1
2 1445
Unfortunately not. You can look at scptxfr.exe (it's installed with
MSSQL server - run it with /? to see the options), which is a
command-line tool used during an upgrade process. But it's not
documented, and it doesn't give you the same flexibility as the QA/EM
scripting fucntionality.

The best general solution is probably to write your own scripts using
the SQLDMO COM interface, which exposes .Script methods for all MSSQL
objects - the details are in Books Online. Or there are plenty of
third-party tools to do this as well.

Simon

Jul 23 '05 #2
Hi Dav,
Take a look at this sample. I guess this helps you. It is really good.

http://www.databasejournal.com/featu...0894_3401081_1

Thank you
Raju

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by randyelliott | last post: by
34 posts views Thread by Roman Mashak | last post: by
reply views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.