Using Groovy to Deploy Federated (or Linked Server) views

I have several federated server / linked views in SQL Server 2000, which allows querying across multiple servers and databases simultaneously. While very powerful, there are some limitations. The primary database server has some linked servers defined. The primary database has a view defined in it which points to a specific linked server and linked database. Unfortunately, Linked Server aliases are not supported and the linked database name varies between environments. Because the View has the Linked Server and Database

Read more

Connecting Ruby On Rails (on Redhat Linux) to SQL Server

Setting up Ruby On Rails and SQL Server 2005 Database connections on Redhat Linux Following are the setup notes for how I got Ruby On Rails (running on RedHat Enterprise Linux) to connect with Microsoft SQL Server. This is based on the Ubuntu Platform-install instructions for activerecord-sqlserver-adapter Install the Redhat Packages unixODBC unixODBC-devel Download, compile, and install the stable version of FreeTDS Edit the configuration for FreeTDS…. we need to tell it about the SQL Server hosts and ports we’re

Read more

RoR Database seeding

Lately, I’m researching various RoR methods, technologies, and doing further ready on Agile software development methodologies. Below is a technique I’ve learned for seeding RoR databases.

    Database seeding technique

  1. Define the model and controller (nifty_scaffold is great for building quick, CRUD interfaces)
  2. Add data to the database via the CRUD interface
  3. Use sqlite3 command to extract the new seed data into a flat file.
    In this example, the table contains custom fields for name and description.

       cd [project folder]\db
    sqlite3 development.sqlite3

    Read more