Rajib Bahar's Blog

Rajib blogs here about topics of his interest.

Data Podcast

June 15
by Rajib Bahar 15. June 2017 02:32

Last few months Shabnam, & I were working on creating a podcast. Our podcast brings industry experts working in various Data practices. We focus on topics related to Big Data, Data Science, Database technologies, RDBMS. Many thanks to our colleagues & friends for their support in this initiative.

 

Here are links to our podcast:

Soundcloud -> https://soundcloud.com/data-podcast

iTunes -> https://itunes.apple.com/us/podcast/data-podcast/id1247751397?mt=2

Sql Saturday #332 Interviews at KFAI Radio

December 25
by Rajib Bahar 25. December 2014 01:39

 

 

Rick Krueger, director of PASSMN stopped by KFAI radio to discuss the interviews conducted by Dan English & Brian Larson of Superior Consulting. He talked about the significance of this event & the kind of impact it makes for fellow database professionals.

Rajib Bahar Photography

December 02
by Rajib Bahar 2. December 2013 02:31

Last two years, I was doing a lot of running. I enjoyed the camaraderie with our team in eagan. However, this year I found a new hobby which I ran into accidentally. A lot of my family friends started asking me to take pictures at their private gathering... Prior to this, I was using Canon 5d Mark 2 primarily for videography projects for nonprofit organizations I volunteered for. I've been using 5d since it came out. So, I started experimenting with various techniques with DSLR, and photo editing as I attended various events. Along the way, I learned new things from friends who were heavily into DSLR photography. I was invited to cover various large events this year. They include Holi color festival, dance team performances, running events, and nature photography. Anyways, I'll see where this journey will take me. I thought I'd let my friends, colleagues and well wishers know that I launched a website for my photography project. The webpage address is http://www.rajibbaharphotography.com/. Feel free to click the image below to see similar themed unique pictures. Any kind feedback will be greatly appreciated.

 

Ambarsariya cover song by guests of KFAI Radio Nikita Deval & Anshul Gupta - The Lennie Chism Show

November 23
by Rajib Bahar 23. November 2013 23:30
I volunteer for a minnesota based community radio namely KFAI. During my free time, I love contributing to their world music segment. It is a great privilege to be able to share my cultural heritage and mix it up with Minnesotan cultural scene. Here is a clip from one of the show.


Dance Performance of Thug Le by Bollywood Dance Scene Twin Cities at KFAI Radio with Rajib - The Lennie Chism Show

February 25
by Rajib Bahar 25. February 2013 02:00
I volunteer for a minnesota based community radio namely KFAI. During my free time, I love contributing to their world music segment. It is a great privilege to be able to share my cultural heritage and mix it up with Minnesotan cultural scene. Here is a clip from one of the show.


Is a table variable always the answer?

August 14
by Rajib Bahar 14. August 2012 00:27

I usually got good results with table variables over cursors or derived queries. I wanted to take advantage of available memories. In one of my previous project, I tried to implement an alternative to cursor via table variable. Unfortunately, it caused the SSIS process to run out of memory after running for 8+ hours. I was surprised to see it perform slower than a derived query version of that same query. It was doing a very basic data retrieval function such as selecting the data. After working with our DBA, we discovered that the server didn't have enough memory available during the time of execution (due to high user traffic). The query would slow down after processing few thousands of rows of data. It took some time to work with our colleagues to figure out the most optimal # rows the table variable can handle at any given time. Anyways, we resorted to the derived queries approach for bigger datasets.

Tags: ,

SQL

The EXECUTE permission was denied on the object 'sp_ssis_addlogentry'

August 07
by Rajib Bahar 7. August 2012 05:51

I have been lazy about blogging for a long long long time... I thought I'd get back into it again with an error message. Depending upon a project, I either get full-admin privilege or restricted privilege. Both options have merit, but, I prefer more flexibility in anything I do. This particular error message is very trivial. I'll not be breaking any ground by saying the solution is to grant proper permission. We often run into this kind of permission issues whenever dealing with database objects. It happens whenever the user lacks permission to utilize an object. How did I run into this error? I usually prefer storing ssis logging data in a table. One of these days, I'll get motivated to write my own custom solution. Until then I find the built-in logging mechanism sufficient. In most ssis projects, I had the privilege to utilize sp_ssis_addlogentry object. I didn't have to worry about setting that permission. When this issue arose I had to get help from our dba Jimit Mehta. He's a dba-super-hero for our team. As soon as he ran the statement below, my headache was gone. 

 

 

grant execute on sp_ssis_addlogentry to [domain_name\user_name]

 

Inactive

December 28
by Rajib Bahar 28. December 2010 17:11

I have been quite busy and inactive in my blog. It was a challenging year. My New Year’s Resolution is to do more blogging compared to 2010.

Tags:

There is an error in displaying error in the error report!

April 15
by Rajib Bahar 15. April 2010 12:07
That was the screenshot of a presentation by Mark Mydland. He is the group manager of the "Visual Studio Team Test". He presented on the topic of Testing in Visual Studio 2010 in the TwinCities .NET User group. His approach to explaining the solution was easy to understand. Just like any good presentation it had elements of humor involving real life settings. He talked about a funny scenario, when someone entered a 0, triggering a division by zero error message, and stopped the propulsion of a ship. He used humor to drill into our head why quality matters.

This is what I learned by attending this event:
  • IntelliTrace is one of the new feature within the Visual Studio 2010 family of products. I believe visual studio 2010 ultimate edition contains this enhancement. This tool brings automated testing capabilities. I asked Mark few basic questions, and he was very kind in response. Just like other debugger in the microsoft environment, this one can start right within the IDE. We can write automated test scripts depicting certain scenarios, or use the recording option as if you are recording a VBA macro. This in turn generates the code files.
  • One can build a lab within the test manager. In the lab, you can have multiple machines. As per Mark, we can have up to 60 machines (or depending upon the environment) tested at the same time.


This is just glimpse of what I have learned today. There is more to it. I have included some helper or reference links for everyone to check out.

Mark's Team Blog is: http://blogs.msdn.com/vstsqualitytools

Blogs recommended by Mark Mydland:
1. Lab Management Team Blog
2. Brian Keller's Blog


Debugging With IntelliTrace

Set Operation trick to generate date data #TSQL2sDay

December 08
by Rajib Bahar 8. December 2009 17:52

Two things that happened today, which motivated me to write this post: 

1. I learned a new trick using set-operation

2. Also today is the day some of my SQL Server colleagues having #TSQL2sDay party

 

Here is the entry where I learned the trick [http://ask.sqlteam.com/questions/1206/insert-date-value-for-1-year]. 

 

I have been participating at AskSqlTeam.com lately. One of the recent question was about how to generate date for 1 year. TG had an interesting solution and I did not realize it was set-operation until Kristen set me straight. :) As usual, I was coming up with a iterative solution as opposed to set-based one. Here is the snippet I modified off of TG's code.

create table #myTable 
(dateCol datetime)
go
declare @i int
SET @i = 0
WHILE 
(
 datediff(year, dateadd(day, @i,'2010-01-01'),'2010-01-01')=0
)
begin
    insert #myTable (dateCol)
    select dateadd(day, @i, '2010-01-01')
    SET @i = @i + 1
    continue
end
go
select * from #myTable
go


The script above will create about 365 entries containing everyday of the year 2010. 

TG's answer to that problem was:

create table #myTable 
(dateCol datetime)
go
insert #myTable (dateCol)
select dateadd(day, number, '2010-01-01')
from   master..spt_values
where  type = 'P'and    number < 365
order by number
go
select * from #myTable
go

 

Anyways, my approach above is not the most ideal solution and it will be slow because of the looping. TG had the right idea. Many DB professional create a reference database for their tasks. In this database one may have scripts that can be applied on scheduled jobs and other artifacts that don't belong anywhere else. The solution above can be improved if we create a reference table containing all integers. Let's say we call that table IntValues. I started building that table today and it took more than 6 hours to enter 2 billion numbers. Here is the final draft of what that script would look like.

 

create table #myTable 
(dateCol datetime)
go
insert #myTable (dateCol)
select dateadd(day, number, '2010-01-01')
from   DbReference.dbo.IntValues
where  number < 365
order by number
go
select * from #myTable
go