Skip to main content

Posts

Showing posts from 2010

Eclipse issues with JDK 1.6 update 21

A lot of users seem to be having issues running Eclipse with the latest update of Java from Sun/Oracle. Apparently they changes the metadata in the dll that shows Oracle instead of Sun. Here are the details and workarounds to fix it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=319514

Automate SQL Dumps for SQLServer

The backup mechanism in SQL Server may be fine for many cases, but there are limitations with it (like restoring to a different server). I really like how I can just dump the database SQL with mySQL which can be easily processed with custom scripts. I was looking around for a mysqldump equivalent for SQLServer. I know you can do this with the SQL Management Studio through GUI in 2008 version, but I need this to be automated. This lead me to discover the SQL Server Management API . With it, you can do a SQL Dump like: using Microsoft.SqlServer.Management.Smo; using Microsoft.SqlServer.Management.Common; using Microsoft.SqlServer.Management.Sdk.Sfc; namespace SQLGenerator { class Program { static void Main(string[] args) { //Connect to the local, default instance of SQL Server. { Server myServer = new Server(args[0]); Database db = default(Database); db = myServer.Databases["be"];