Goodbye, ScrewTurn Wiki

June 29, 2012

Earlier this month, Dario announced the end of ScrewTurn wiki. Despite a huge number of downloads (>300.000), the project was not a financial success (read: commercial licenses did not sell well enough).

My interest in ScrewTurn Wiki started when I enabled my database versioning and documentation application dbscript to generate database documentation both into ScrewTurn 2.0 and ScrewTurn 3.0. I even experimented with a Page Storage Provider for STW 2, but dropped it later because static generation performs better than dynamic generation (read: my page provider needed a lot of CPU).

The source code will be kept on Bitbucket, but everything else will be thrown into the memory hole. What a pity.

The comments mention another .Net-based OS wiki, Road Kill, but from a first look, the download numbers are low, and there seems to be a problem storing or displaying Unicode characters in articles. I’m not convinced.

Any other .Net wikis out there?

More Documentation Generators for dbscript

January 14, 2010

The number of documentation generators included in dbscript is growing steadily.

Version 1.00 already implemented

and fixed the

All links show documentation on the MS AdventureWorks (2005) database.

Version 1.01 further includes

The XSLT style sheets shipping with dbscript need a bit of revising too, for example, to include separate sections for table indexes and constraints which are currently not output.

dbscript 1.00 released

December 30, 2009

The major new feature of version 1.00 of dbscript is the new SQL parser with the following improvements:

  • support for SQL Server 2005 and 2008 features
  • detailed log of parser results (successfully parsed statements as well as skipped clauses and text ranges)
  • parser continues after unrecognized or faulty statements
  • interpretation of sp_addextendedproperty to extract object and column descriptions (MS_Description)
  • dependency analysis of views, stored procedures, etc.

The descriptions and dependencies extracted by parsing or importing from a live database are included in SQL scripts and generated XML files, and thus available in all generated documentation. XSL style sheets have been adapted to display object and column descriptions.

Output samples of generated documentation:

Single HTML file documentation

MediaWiki documentation

ScrewTurn Wiki documentation

The new features lay the groundwork for future versions of dbscript the implement parsers for other SQL dialects (schema import from database is already supported for Oracle and PostgreSql), dependency diagrams, and more.

dbscript is available for download here.

Please send your feedback 😉

New SQL Parser in dbscript

November 30, 2009

I wrote about my plans to add a new SQL parser engine into dbscript a couple of months ago. Now the time has come to actually implement it for T-SQL (MS SQL Server; Oracle and PostgreSQL will follow in future versions), and I found that I did not foresee all the consequences of my initial intent. The overall architecture remained the same though.

The grammar definition allows to define attributes on non-terminals. Using the SQL Server versions as attributes (2005, 2008), I can mark commands or clauses as their support or feature has been introduced in a specific version, and store the database version as property of the uploaded Project Version.

The parser skips the parts of the uploaded file that it cannot parse, and writes these parts to the upload log. Up to now, the parser would simply fail if it considered the SQL file somehow invalid.

The (C#) object representation of a parsed SQL command has a boolean flag IsHandled for each non-terminal. The code processing the object representation needs to mark every non-terminal object as being handled (i.e. translated into schema information stored in the database). Objects that have not been flagged will also be listed in the upload log.

Next, the new parser allowed me to rewrite the dependency analysis. Until now, dbscript only analyzed view dependencies to order the CREATE VIEW statements. Dependency analysis has now been extended to all database objects.

One more major issue that has been solved is parsing and interpreting EXECUTE statements. Thus an EXEC sp_addextendedproperty is interpreted as adding a description to a database object.

This obviously led to changes in the XML generation of database schemas. Each object now lists its descriptions and the dependencies on and references from other database objects.

The XSL stylesheets which translate a project version XML into markup or HTML have been revised to reflect the additional information in the generated XML.

All taken together, the new parser adds:

  • better feedback on which parts of the uploaded SQL file have been processed
  • dependency analysis
  • object and column descriptions

See the following links documenting AdventureWorks OLTP 2008 (version 2005) for the effects of the new functionality:

Single HTML file documentation

MediaWiki documentation

ScrewTurn Wiki documentation

In both wikis, compare the (old-style) “wikibot” section with the new section “automatically generated” to see the changes.

The next version of dbscript with the mythical version number “1.0” will be released soon 😉

Generating Database Documentation for ScrewTurn wikis

August 29, 2009

Updated XSL style sheets for dbscript documentation generators creating ScrewTurn content.

See here for sample output:

MS SQL AdventureWorks

Oracle Demo Schema

PostgreSQL OpenNMS

ScrewTurn also allows external Page Providers (instead of stored static pages)

MS SQL AdventureWorks (by Page Provider)

New Features in dbscript 0.95

March 23, 2009

The latest version 0.95 of dbscript adds new functionality:

Data Diagram generation

dbscript 0.95 adds the capability to generate Data Diagrams from imported and uploaded SQL Server database schemas.

This allows you to get a quick overview of a database schema. It is also useful if you plan to manually create a data diagram in Management Studio, and need some visual help of how to layout the diagram.

ScrewTurn Wiki Page Provider

In addition to the ScrewTurn documentation generator introduced in dbscript 0.94, the latest version includes a Page Provider which you add in the Administration panel of your ScrewTurnWiki installation.

Configure the Documentation Generator plugin with the same ConnectionString you use in your dbscript web application.

Next, create a Documentation Generator of type ScrewTurn Page Provider, and define its contents. After you generate, ScrewTurn Wiki displays the selected Project Version information. (You may need to restart the ScrewTurn web application)

Summary of Output generated by dbscript

This is a list of output samples generated by dbscript based on MS AdventureWorks sample database:

Value Scripts

C# const int declarations of a dbscript Table

VB.Net Const Integer declarations of a dbscript Table

Project Version / Database Schema

Data Diagram of MS AdventureWorks database

Documentation Generators

MediaWiki Documentation of MS AdventureWorks database

Single Object documentation in MediaWiki format

Single HTML File documentation of MS AdventureWorks

ScrewTurn Wiki Documentation of MS AdventureWorks database

ScrewTurn Wiki Page Provider Documentation of MS AdventureWorks database

The latest version of dbscript is available for download here.

Generate ScrewTurn Documentation of MS SQL Database and Values

March 5, 2009

In addition to creating MediaWiki content, dbscript 0.94 now also supports ScrewTurn wikis to generate database documentation.

The steps to setup the documentation generator are essentially the same as described here and here for MediaWiki wikis, except that the respective ScrewTurn alternatives (generator type, XSLs) have to be selected.

To allow the built-in bot to post content to the ScrewTurn wiki, the wiki’s web.config has to be modified to disable viewstate validation:

<pages enableViewState="true" enableEventValidation="false" />

Follow this link to browse the ScrewTurn documentation of AdventureWorks as generated by dbscript.

The latest version of dbscript is available for download here.