Enterprise Search and the BDC

This is an article on configuring the BDC to work with Enterprise Search.

The BDC is a database/web service abstraction layer that provides a unified api.
It claims to be of general use in Sharepoint.

I can see little benefit to it if you don’t want google like searches of your application.
The big problem is that you need to be very careful or the search mechanism will invalidate any access controls that you have.

The BDC is excessively complex for what it provides.  The price in it’s complexity (as is generally the problem with sharepoint) exceeds the effort required to roll it yourself…

Fun with Virtual PC's

Lately I have been working on a Sharepoint project.

Sharepoint developers have two main choices:

(i) Develop natively on a server OS (which my IT Helpdesk does not support)
(ii) Develop on a virtual pc (which can be slow).

Sharepoint developer’s tend to be at least familiar with the vpc.
This is a solution to a common problem with vpc’s.

Typically one developer sets up the vpc then gives a copy to the next person to join the team.
You need to play games about leaving/rejoining domains and renaming machines.
One thing that you also need to do is to delete the ethernet_card_address entry in the vmc file (it is just xml).

You may also need to see this. That fixes the names that sql server stores in the registry.

Asp.Net connection string bug

This is clearly a bug.

I have been using the connection manager class.

If you use an instance db then the database name part of the connection string is of the form:

ServerInstance

However if you leave this as this in the web.config this is returned as Server\Instance which is correctly identified as an invalid connection string.

You need to record this as Server\Instance so that it will return the result ServerInstance.

Why should an xml based config tool start escaping data that is entirely valid xml?

Further schema comparison

The following is an extension of the previous post.

This is useful when dealing with sql server 2005 and custom schema’s.

(That is the prefix before database objects, not the structure of the database).


select tableName=SO.name, schemaName = SS.Name

from sysobjects SO

join sys.schemas SS ON SO.uid = SS.[schema_id]

where type = ‘U’

order by SO.name

Comparing Database Schema in SQL Server and Sybase

A common development problem is to keep the schema of two databases in step.

This lists the tables:

    select tableName=name from sysobjects where type = ‘U’ order by name

This lists the fields per table:

    select tableName = so.name,
       colName = sc.name,
       colLength = sc.length,
       colOrder = sc.colid,
       dataType = st.name 
  from sysobjects so
 inner join syscolumns sc on sc.id = so.id
 inner join systypes st on st.usertype = sc.usertype
 where so.type = ‘U’
 order by so.name, sc.colid
   
Between the two you have the tools needed to compare two database schemas.
The only restriction is the database access.

This does not compare contents – that is a different problem.