Blog Archives
Drop all tables in an MS SQL Server database
Currently working on a JDO DataNucleus object store for Apache Isis, as part of an app that’s gonna be deployed onto MS SQL Server.
Since I’m using DataNucleus to automatically create the database schema, the build-debug cycle is:
- to run the app
- inspect the resultant schema
- drop all the tables
- change the domain object annotations/metadata
and then go round the loop again.
What with foreign-key constraints between tables, step (3) is not exactly trivial. So it seemed like it’d be a good idea to write a little script to simplify step (3) of the above, namely to drop all the tables in my (development!) database. Here’s what I came up with… Read the rest of this entry
Connecting to SQL Server from Java over TCP/IP
Been a while since I did this; turns out it’s easy enough.
First, you’ll need the current JDBC driver from Microsoft, which can be found here. Add to classpath as usual.
Set up your Java application to use the following JDBC connection settings: Read the rest of this entry