Posts

SSIS XML Task / Source Adapter

I have been working with SSIS using the XML Task and XML Source Adapter. I was getting an error say that an element is was not defined. When I check the XSD, which was using import / include schemas, I found the element was difined but not in the main XSD schema the adapter was pointing to but another schema which was being imported. The probelm was with the schema were the element was defined not being invaild for the XML Source Adapter, that was the real probelm, as soon as I corrected the imported schema the error was resolved. The probelm with the imported XSD schema there was some DTD define at the being of the file and XML Source Adapter does not support a mixture of DTD and XSD.

SSIS Execute SQL Task With VARCHAR(MAX)

While I was using the SSIS Execute SQL Task to return a single row result I getting the following error: [Execute SQL Task] Error: An error occurred while assigning a value to variable "RestoreCmd": "The type of the value being assigned to variable "User::RestoreCmd" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object!." This was happening becuase I was trying to assgin a varchar(max) result column to SSIS string variable. There are two ways to solve this problem; one is to change the SSIS variable to object and convert each time it used to a string; the second way to solve this is to cast result column to max size limit.

SSIS 2005 and Database Snapshots

I have been looking into the feasibility of using database snapshots as method of rolling back an SSIS package that fails and this is what I found: Creating a database snapshot was not a real problem, there is one issue that you need to be aware of. For each data file within the database that the snapshot is being based on there will have to be a sparse file created for it. I have created a little SQL script that automates the creation of the database snapshot. Rolling back a database to its initial state after a package has errorred is a problem. The method to revert a database back to its initial state with database snapshots is a restore operation. The restore is a full restore, which of course means there can't be any connections while the restore is happening and this can't be done on-line because it might have to take out the primary data file. This is a problem because SSIS connection manager will create connections to the database when the package starts and doesn...

Reporting Services Report Viewer using SQL Authentication

I have written some code, which will create a report and deploys it to a report server. However the connection string for the report has to use SQL Authentication. My code which builds the reports uses the same approach that Microsoft does to SQL Authentication within report, which is to not store the UserID and Password, so what would happen now when the report is displayed in the report viewer is that a prompt would appear asking for a username and password. This behavior had to be suppressed, because I did not wish the users to know or need to type in a userid or a password, so I tried to resolved this by looking for a way to get the connection string stored on the server when deploying the report, like you can when you use SQL Server Business Intelligence Development Studio, with no joy. I did find a solution with the Report Viewer control, there is method to send the data source credentials to the server without the user having to type them in. Below is an example: 1: rvRepor...

Createing threads for a windows form

I am wrining a program that has lenghtly process which si casing my UI to freeze. I now how to the solve the probelm which is create thread and let it do the processing. Now this new ground for me so I went looking for some explames on how to this and I found this link CodeGuru: Maintaining a Responsive UI , which I found easy to follow, that explains about UI thread and some of the probelms that can happen.

DTS Custom Tasks written .Net

After writing some custom task in VB6 for a client thought it would be better if they were in .Net. So after some research finding that it can be done I start re-writing them for .Net. I started running into some issues: Could not register custom task within the DTS client. This because Regasm does not expose the DLL entry point for DllRegisterServer, to solve this I had to write some extra code that will register the task in DTS. The task then could not be use within DTS. This was because the default create interface was incorrect by the fact there was read-only function which dts does not like, I had disable the creation of default interface and write my own version. The global variables not working after the .Net custom component set the values. This was some quirk between .Net and DTS as soon as try setting the value through the objects properties The activex script task and other tasks could not access the global variable. I mange to solve this deleting the Global variable and...

Reporting Services 2000

I have been using reporting services for a while now and I've found it to be a useful tool for application development. The reason for this I am working on web application that had some summary data which need to be display with the option to allow detail data to be seen. Also there was a requirement to exporting the data to spreadsheet, generate some charts displays to make application look sexy and give users quick and easy status reports to read. The application is using Object Model approach so instead writing code and creating pages. I sold reporting service to the client and I manage to give all the requirements need with in matter of days. It was easy to use, Easy to install and easy to manage as well.

Multithreading .Net C#

Here is a list of articles that makes threading sound easy to do: Multithreading Part I: Multithreading and Multitasking Multithreading Part 2: Understanding the System.Threading.Thread Class Multithreading Part 3: Thread Synchronization Multithreading Part 4: The ThreadPool, Timer Classes and Asynchronous Programming Discussed

The future role of a DBA in Middle to Small Companys

This is a link about the futre role of a DBA. Also people thoughts about the article are at the end of the piece.

Developing Web Parts for SharePoint Portal Server 2003 in .NET

Developing Web Parts for SharePoint Portal Server 2003 in .NET