Showing posts from 2011

Error while trying to run Report Builder 3.0 in Sharepoint 2010

Ran across an issue while trying to create using Report Builder 3.0:-

Following errors were detected during this operation.
* [12/29/2011 12:47:47 PM] System.Deployment.Application.DeploymentException (Subscription)
- Unable to install this application because an application with the same identity is already installed. To install this application, either modify the manifest version for this application or uninstall the preexisting application.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SubscriptionStore.CheckApplicationPayload(CommitApplicationParams commitParams)
at System.Deployment.Application.SubscriptionStore.CommitApplication(SubscriptionState& subState, CommitApplicationParams commitParams)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activati…

Meritocracy Vs Bureaucracy

A friend of mine asked me to watch this movie Aaarakshan (pretty bad movie except for Amitabh's performance) but the movie did have a moral to it though it turned out to become a complete Bollywood fiasco at the end. The concept of having a quota in place for people belonging to the backward communities is correct in a manner of speaking. But wait!!! this is not where I stand. I would actually prefer to have the quota system in place for people who are near the poverty belt and below. It does not make sense for a wealthy person who comes from a backward community to take the eay way out and place the trump card ("quota") when it comes to his or her relative battling it with others. Merit should be the ultimate winner here where people work hard and prove to the world that they can stand on their own two feet and not have everything handed to them in a platter. Maybe the UID (Unique identifier system) that is currently taking place in India would be a solution to figure o…

Nice Tidy SQL problem & Solution

Have been writing a couple of tech articles in the recent past (If I had started writing it on a regualr basis I might have had an encyclopedia by now.... I should write something else just 4 a change huh!!!):
Question posted on one of the SQL server sites out there--> concatenation of rows to columns....
There are 3 ways of accomplishing it and I ain't going thru all those approaches but will just highlight them (except for my solution here):-
1. Creating a dynamic SQL which will keep concatenating the rows into a specific column in a PL/SQL block which returns the required table.

2. Using recursive CTE to concatenate the rows into columns .... Maybe should hit upon CTE's which are extremely useful in a later post (If I get some time i.e.)

3. Now this method is pretty cool Now let me give the problem statement as posted by that individual...

Let us create the table in the following manner-->
select 'Report1' as reportID,'Browser' as RoleID, 'YChen' as U…

Sharepoint and SSRS configuration continued...

So my next step is to deploy the reports in sharepoint. Great! Except now you might run into the following issue:
the full path must be less than 260 characters
how would you go about resolving this-->simple follow the steps below....
1. Create a document library with the document type being null.
2. Else go to the library section and select reports as the type of library.
3. The next step is to ensure that you give a valid name for the library (This is an easy one) so your format would be http:///SiteName/LibraryName
4. Go back to your SSRS project properties. Make sure that the Target Data source folder and the Target Report Folder are configured with the following value as mentioned in step 3 :- http:///SiteName/LibraryName
5. The TargetReportPartFolder need not be filled.... Its upto you. This foldercan be used to deploy to a sub library...
6. The TargetServerUrl would be http:///SiteName
7. Make sure you point the TargetServerUrl to the right version of SQL server.
Click deploy and yo…

Sharepoint & SSRS integration Issues

Recently started working with Sharepoint 2010. PPS and excel services seemed pretty simple on the onset. Now while trying to integrate SSRS with share point 2010, I ran into this issue:
"Failed to establish connection with report server. Verify the server URL is correct or review ULS logs for more information. Product area: SQL Server Reporting Services, Category: Configuration Pages"
Man--> this was a mind boggler. Let me explain what I tried to do in order to eliminate this issue and still did not work:-
1. Opened the RSManager Config file (located at C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer if you have a 64 bit OS) and then changed the following
and changed it to Kerberos mode:
<RSWindowsNegotiate/> (acts as a intermediary between NTLM and RSWindowsKerberos))

Script Object Model object in SSIS (commonly used in the SSIS script tasks)

Just a quick code snippet on the usage of the ScriptObjectModel in SSIS script tasks... It takes one through all the required functions that can be exposed using the script object model:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SqlServer.Dts.DtsClient;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.ScriptTask;
using Microsoft.SqlServer.Dts.Tasks;

namespace ScriptObjectNotifier
public class SOCall

ScriptObjectModel objModel;

public SOCall(ScriptObjectModel valObjModel)
objModel = valObjModel;
/// <summary>
/// gets the connection string from a conn Parameter
/// </summary>
/// <param name="connName">name of the connection</param>
/// <returns>string</returns>
public string GetConnectionString(string connName)
string connectionString = objModel.Connec…

Restoring a database using C#

This code works perfectly and can be configured in any manner:
I was struggling due to command timeout and WITH RECOVERY options not present in my code earlier...... Please note that if your database has differential files, set the tsql to NORECOVERY:

string dataFileName = string.Empty;
string logFileName = string.Empty;
string getRestoreQueryList = @" RESTORE FILELISTONLY FROM DISK = N'C:\Test\Ishwar.bak'";
SqlCommand getRestoreQueryListCommand = new SqlCommand(getRestoreQueryList, con);
SqlDataAdapter adp = new SqlDataAdapter(getRestoreQueryList, con);
DataSet ds = new DataSet();
foreach (DataRow dr in ds.Tables[0].Rows)
if ("PRIMARY" == dr["FileGroupName"].ToString())
dataFileName = dr["LogicalName"].ToString();

Murphy's law in Modern Business

I am a great believer in Murphy's law and the eventuality that this law can pertain to everything in life and its subsequent impact on humanity in a multitude of ways. Let me constrain myself to the outer realm of business application rather than the internals. Here is my own list (somebody might have come up with it before but maybe not this eloquent :) )
1> Business will never move in the direction one wants to steer it in.
2> Every time you decide to invest big in the stock market .... it crashes!!!
3> When you feel that your company is in good shape, your competitor is one step ahead into buying you out.
4> Whenever you think about a decision that you made for the benefit of your organization, your organization will get a massive blow to its body bag.
5> When you think that you are the conduit for the success of a project, there are others who have already taken the credit for the success.
6> Mistaking your partner as your pillar of support will eventually le…

Improving Query performance in SQL Server

Recently started learning more about performance related stuff in SQL server. Man oh man!!! so many things to learn and so many things to blog about.... Let us start with the basics:
Writing a SQL query you need to measure a couple of things:
1. Query Cost
2. CPU Utilization
3. Time taken for the Query to execute
4. Table scans, Index scans and Index seeks.
Let us start by focusing on Query cost--->
Write the command- SET SHOWPLAN ON;
and then execute a SQL for example-->
SELECT E.EmployeeID,E.EmployeeStatus FROM Employee E where E.AddressID = 112345 ORDER BY E.EmployeeID
This command will basically give us the Query analysis built into the SQL server. The first aspect you will notice is the Query cost... In this case if there are indexes on the underlying table then we can state that the query cost might be less provided the index is being used else the query cost is going to increase significantly. Also we can minimize query cost by inclusing more filters in our SQL query provided that…

People's dilemmas and the repercussions that arise...

I just noticed that the face of humanity has changed a lot from my generation. People tend to not take responsibility very well and keep nagging about various things that actually dematerialize the very foundation on which humanity is built on.
Act1: User forgets MP3 player @ office and asks one of his office colleagues to look after the MP3 player.
Act2: Colleague decides to keep MP3 player in his/her drawer without locking it.
Act3: MP3 player gets stolen.
Act4: Colleague pretends to be cool about the MP3 player and coy about the fact it gets stolen. According to his/her logic, the MP3 player would have eventually been stolen because of User's forgetfulness.

Is this what humanity is preaching now.... irresponsibility?? Pathetic display of human unresponsiveness to a general situation.

Lets us take the current predicament facing us @ the national level. The Lokpal bill is supposed (???!!!) is supposed to eradicate or subside the rise in corruption by giving the common man more power.…

Dexter is pretty good....

Have not been followin a TV series in a while (The last two I followed pretty religiously were Castle along with Bones and these two were pretty good).
But in the recent past I have been following Dexter and another called Spartacus (I was able to catch all the episodes of Blood & sands as well as Gods of the arena).
Spartacus is pretty slick in its cinematography bcoz its more like watching bits and pieces of 300 (a good movie) with more of a storyline and the explicit no holds barred kinda program really takes you back to the past. But Dexter on the other hand is quite different from the rest as it shows a bad guy killing other bad guys for sport. I mean to a certain extent what he is doing is nothing but being a vigilante since he is helping in takin out the trash. But does he have the moral right to do so...hmmm (pondering over this). Dexter has a disease and a nasty one at that. He is trying to control it by focusing it on bad guys. But how does he justify whether the person i…

Cycle Adventure with IT......

OMG!!! I dont know who I am!!!! Seriously nowadays there are several dime a dozen clones of you online. Being serious here --> Identity theft (IT) has certainly become rampant in all parts of the globe. Maybe some slander your very means of existence & others might be to increase your popularity (online stalkers? ahem). I dont know where I am going with this article but I thought that maybe becoming a Jason Bourne after your identity has been stolen is easier than one thinks. Can this be done easily?? Yes but why?? Does your existence (i.e. the one stealing the identity) does not have a life of his/her own??? Social Networking sites are ever increasing but is that really you on that site??
Lets get past the garbage I wrote earlier and come to the adventure part. Rode a cycle to office today (and back home too --> believe it you naysayers). Maybe about 40 kms. Not bad but more than the back pain it is the back side pain that leaves you struggling.
Scenario--> I am in a res…