Popular Tcl recipes tagged "database"http://code.activestate.com/recipes/langs/tcl/tags/database/2010-03-15T16:52:52-07:00ActiveState Code RecipesCloudscape - Run DDL against a Cloudscape database using batchupdate SQL. (Tcl) 2005-12-07T22:33:00-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461732-cloudscape-run-ddl-against-a-cloudscape-database-u/ <p style="color: grey"> Tcl recipe 461732 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>Run DDL against a Cloudscape database using batchupdate SQL.</p> Cloudscape - unlock database. (Tcl) 2005-12-07T23:08:15-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461736-cloudscape-unlock-database/ <p style="color: grey"> Tcl recipe 461736 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>Unlock a cloudscape database that has been locked for readonly access.</p> Cloudscape - lock database. (Tcl) 2010-03-15T16:52:52-07:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461735-cloudscape-lock-database/ <p style="color: grey"> Tcl recipe 461735 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>Lock a cloudscape database for read only.</p> CloudScape - get network server runtime info. (Tcl) 2005-12-07T22:42:14-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461733-cloudscape-get-network-server-runtime-info/ <p style="color: grey"> Tcl recipe 461733 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>CloudScape - get network server runtime info.</p> Cloudscape - start network server. (Tcl) 2005-12-07T21:36:51-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461728-cloudscape-start-network-server/ <p style="color: grey"> Tcl recipe 461728 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>Start and monitor Cloudscape network server.</p> Cloudscape - Backup Cloudscape DB. (Tcl) 2005-12-07T22:07:10-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461730-cloudscape-backup-cloudscape-db/ <p style="color: grey"> Tcl recipe 461730 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>Backup Cloudscape Database in a network server multiuser environment.</p> Cloudscape - stop network server. (Tcl) 2005-12-07T21:50:34-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461729-cloudscape-stop-network-server/ <p style="color: grey"> Tcl recipe 461729 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>Stop the Cloudscape Network Server.</p> Cloudscape - list database info. (Tcl) 2005-12-07T22:51:49-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461734-cloudscape-list-database-info/ <p style="color: grey"> Tcl recipe 461734 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>List tables and schemas in a database.</p> Cloudscape - Create cloudscape DB. (Tcl) 2005-12-07T22:19:03-08:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/461731-cloudscape-create-cloudscape-db/ <p style="color: grey"> Tcl recipe 461731 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>Create cloudscape database.</p> DB2 - check tablespace status (Tcl) 2003-07-01T00:10:26-07:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/208207-db2-check-tablespace-status/ <p style="color: grey"> Tcl recipe 208207 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>DB2 tablespaces can become unavailable for various reasons and when they do go off-line the problem may not be immediately visible. For example tablespaces in "backup pending mode" can be readable but not updateable.</p> <p>For example:</p> <p>------------------------------ Command Entered ------------------------------ update sch1.table1set ind = 'N' where provider = 'ABC'</p> <hr /> <p>DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0290N Table space access is not allowed. SQLSTATE=55039</p> <p>This looks like a permissions problem but it's actually an issue with the physical tablespace. We can enumerate the tablespace details with the "db2 list tablespaces". In this case the hex code for the "state" command indicates backup pending.</p> <p>Table</p> <p>Tablespace ID = 91 Name = SW380 Type = System managed space Contents = Any data State = 0x0020 Detailed explanation: Backup pending</p> <p>This procedure returns a list of tablespaces where state is abnormal.</p> Generate java structure definitions for DB2 tables. (Tcl) 2003-06-18T01:33:12-07:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/206126-generate-java-structure-definitions-for-db2-tables/ <p style="color: grey"> Tcl recipe 206126 by <a href="/recipes/users/1220635/">Patrick Finnegan</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>This tcl script, called from a windows bat file generates java structure definitions for DB2 tables using the db2 db2dclgn and describe utilities.</p> <p>Output is sent to two files.</p> <p>*.txt</p> <p>452 CHARACTER 1 ACCESS_STATUS 13 485 DECIMAL 8, 0 CUSTOMER 8</p> <p>*.java</p> <p>java.lang.String access_status; java.math.BigDecimal customer;</p>