Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Documentation tool like BOL

Author  Topic 

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2012-08-08 : 10:02:58
Hi all,

Anyone know if there is a way to auto generate documentation for stored procs etc with the same kind of format you see in Books Online?

For example:

sp_addsubscription [ @publication = ] 'publication'
[ , [ @article = ] 'article']
[ , [ @subscriber = ] 'subscriber' ]
[ , [ @destination_db = ] 'destination_db' ]
[ , [ @sync_type = ] 'sync_type' ]
[ , [ @status = ] 'status'
[ , [ @subscription_type = ] 'subscription_type' ]
[ , [ @update_mode = ] 'update_mode' ]
[ , [ @loopback_detection = ] 'loopback_detection' ]
[ , [ @frequency_type = ] frequency_type ]
[ , [ @frequency_interval = ] frequency_interval ]
[ , [ @frequency_relative_interval = ] frequency_relative_interval ]
[ , [ @frequency_recurrence_factor = ] frequency_recurrence_factor ]
[ , [ @frequency_subday = ] frequency_subday ]
[ , [ @frequency_subday_interval = ] frequency_subday_interval ]
[ , [ @active_start_time_of_day = ] active_start_time_of_day ]
[ , [ @active_end_time_of_day = ] active_end_time_of_day ]
[ , [ @active_start_date = ] active_start_date ]
[ , [ @active_end_date = ] active_end_date ]
[ , [ @optional_command_line = ] 'optional_command_line' ]
[ , [ @reserved = ] 'reserved' ]
[ , [ @enabled_for_syncmgr= ] 'enabled_for_syncmgr' ]
[ , [ @offloadagent= ] remote_agent_activation]
[ , [ @offloadserver= ] 'remote_agent_server_name' ]
[ , [ @dts_package_name= ] 'dts_package_name' ]
[ , [ @dts_package_password= ] 'dts_package_password' ]
[ , [ @dts_package_location= ] 'dts_package_location' ]
[ , [ @distribution_job_name= ] 'distribution_job_name' ]
[ , [ @publisher = ] 'publisher' ]
[ , [ @backupdevicetype = ] 'backupdevicetype' ]
[ , [ @backupdevicename = ] 'backupdevicename' ]
[ , [ @mediapassword = ] 'mediapassword' ]
[ , [ @password = ] 'password' ]
[ , [ @fileidhint = ] fileidhint ]
[ , [ @unload = ] unload ]
[ , [ @subscriptionlsn = ] subscriptionlsn ]
[ , [ @subscriptionstreams = ] subscriptionstreams ]
[ , [ @subscriber_type = ] subscriber_type ]


...

[ @publication=] 'publication'
Is the name of the publication. publication is sysname, with no default.

[ @article=] 'article'
Is the article to which the publication is subscribed. article is sysname, with a default of all. If all, a subscription is added to all articles in that publication. Only values of all or NULL are supported for Oracle Publishers.

[ @subscriber=] 'subscriber'
Is the name of the Subscriber. subscriber is sysname, with a default of NULL.

[ @destination_db=] 'destination_db'
Is the name of the destination database in which to place replicated data. destination_db is sysname, with a default of NULL. When NULL, destination_db is set to the name of the publication database. For Oracle Publishers, destination_db must be specified. For a non-SQL Server Subscriber, specify a value of (default destination) for destination_db.


If you interrogate the sys.parameters views etc then you could build something but I really don't want to have to....

I've tried Redgate Sql Doc and it's not really suitable for me (I just want to product plain text files to be imported into a wiki)

Ideally I'd like to know the default value of any params also. From playing around it looks like I'd have to rip that from the OBJECT_DEFINITION([object_id])

anyone got an existing solution?

Transact Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
http://nosqlsolution.blogspot.co.uk/
   

- Advertisement -