Monday, January 26, 2009

Configure Sharepoint Report Viewer – My Report or Chart Won’t Display or the Report Server Root Directory Is Displayed

My chart was fine and in the correct place but when viewed in inside a Sharepoint Report Viewer part, I either got an error or the root directory of the Report Server was shown. After doing some research on the web, I discovered this is a common problem. Everyplace I looked told me the same thing…you need a fully qualified path to the Report Server. Nobody mentioned the need to included the instance.

You need to fill in these two boxes in the Sharepoint web part:



You must include the name of your Report Server instance if your Report Server is not installed in the default instance. In my case, Report Server was installed in an instance called Development.

Report Manager URL = http://myserver/report$instance

Report Path = /folder/rdlname

Backup Jobs Fail After Upgrading to SQL 2008

Various literature on this says to recreate your backup plans once the SQL 2008 upgrade is done.

After looking into the issue I discovered the root cause of the issue was that the “allow updates” global configuration value had been set to true. When I set it back to false, the backup plans worked again. I know the “allow updates” property is supposed to allow users to update system tables but if you don't need to do that on a regular basis then this solution might be fine or a quick workaround until you can go through the tasks of recreating each individual plan.

Tuesday, January 20, 2009

Import Excel and Populate a Uniqueidentifier Column

I have seen several posts around with this problem: When importing data from an Excel sheet, the Import Wizard throws an error saying the uniqueidentifier column in the destination table cannot be populated.

This is acually a very simple problem. If we were importing Excel into our destination table, we would make an identity column and seed the start and incrementation accordingly. Uniqueidentifier columns are GUIDs generated by SQL. They also need to be seeded. In the case of uniqueidenfiers, the seed is (newid).

Here is how I do the import:

1. I create my destination table with the empty column including uniqueidentifier column:

CREATE TABLE [dbo].[Tablename](
[Unique_ID] [uniqueidentifier] NOT NULL DEFAULT (newid()),
[ThingOne] [nvarchar(255)] NULL,
[ThingTwo] [nvarchar(255)] NULL
) ON [PRIMARY]


2. I use the Import Wizard to import my Excel data

3. Be sure to select 'Enable identity insert' on the Mapping section of the Wizard