.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Track Initial Catalog used for the execution.

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server



My project environment includes 2 databases DB1 and DB2 of SQL Server 2008. 

I have an SSIS package designed with source from DB1. The package configuration for this package is set with Initial Catalog property being selected. There is a chance to change the database name from DB1 to DB2 in the future.

My requirement is to send an email to the team saying which database DB1 or DB2 is used for the execution.

I tried with variables but could not make it? Any help would be highly appreciated.





View Complete Post

More Related Resource Links

Track: SharePoint for Developers - Part 1

Are you a developer who wants to learn more about Microsoft Office SharePoint Server (MOSS)? MOSS is based on Microsoft Windows SharePoint Services, which will make it easier for you to get more problems solved with less effort. Windows SharePoint Services 3.0 takes full advantage of Microsoft ASP.NET and the Microsoft .NET runtime. In this course, you will be immersed in the new features and added programmability that is support in MOSS, which will provide you with a wealth of development opportunities.

How to track the changes of user contacts(colleagues) by using SharePoint API

We might have seen colleague tracker web part which keep tracks the changes made in our contacts/colleagues details like profile/lists/sites. The same tracking mechanism can be implemented by using MOSS API in any custom web part/ web control/ feature/web service...

UserProfile.GetColleagueChanges is the method which returns all changes happened with the contacts, this method also accepts a Query (UserProfileChangeQuery) where we can specify different parameters to filter the changes

.NET Matters: Ordered Execution With ThreadPool


This month we demonstrate how you can use the ThreadPool to support ordered execution without having to build custom thread pools yourself.

Stephen Toub

MSDN Magazine February 2009

Spider in .NET: Crawl Web Sites and Catalog Info to Any Data Store with ADO.NET and Visual Basic .NE


Visual Basic .NET comes loaded with features not available in previous versions, including a new threading model, custom class creation, and data streaming. Learn how to take advantage of these features with an application that is designed to extract information from Web pages for indexing purposes. This article also discusses basic database access, file I/O, extending classes for objects, and the use of opacity and transparency in forms.

Mark Gerlach

MSDN Magazine October 2002

Virus Hunting: Track and Report Server Attacks Quickly and Easily with the .NET Networking Classes


To help stop the spread of worms, viruses, and other hostile activity, it is important to track down and report the servers used in these attacks along with those used to send spam. Many Web administrators, however, don't take the time to track them because the manual process can be quite cumbersome. The Microsoft .NET Framework comes to the rescue with several networking classes, including the Dns class and the TcpClient class, that abstract away the complexity of performing DNS and WHOIS lookups. These classes make it easy to create a simple, straightforward ASP.NET-based utility for performing these lookups and automating this very important task.

G. Andrew Duthie

MSDN Magazine April 2002

.NET CLR Profiling Services: Track Your Managed Components to Boost Application Performance


The Microsoft .NET platform provides you with a rich set of services for building profilers and application monitors for applications targeting the Common Language Runtime (CLR). These services expose runtime events that occur during the execution of a .NET application. They can be used to obtain information about managed code being executed under the runtime. This article describes the .NET CLR Profiling Services and shows how to use the services to build a simple profiler that will provide hot spot information for any .NET application. The sample profiler can easily be modified to suit other profiling and monitoring needs.

Anastasios Kasiolas

MSDN Magazine November 2001

Regarding Business data catalog in SharePoint


Hi All,

          I am using business data catalog to display the records present in the Active Directory based on the user selection of samAccountName. Since the number of records present in Active Directory are more than 3000 the user has to iterate through each page to get to a particular record. I want to add a kind of filter to my Definition file that user can search for a particular samAccountName from the list of samAccountName displayed in the business data list web part. I am using office server SDK by microsoft to generate the application definition file.

Any help regarding this will be appreciated.



Count Query Execution


I have a class that being used to connect with the DB. Now I want to count how many times each web request executes the queries, but I've no idea where to store the counted value. I mean, Session wont, ViewState wont work as site also have webservices. What else I can use ?

UpdatePanel - UpdateProgress only displays on initial postback



I'm having a somewhat odd issue, I'll do my best to explain it.

In a nutshell I have an UpdatePanel with an UpdateProgress item, first postback checks for warnings, if there are any they will be be displayed to the user as a JavaScript 'confirm' box. If the user clicks OK the next postback occurs to commit the change.

The UpdateProgress loading notification appears on the first postback but not on the second, even though both of them function correctly.  The buttons that trigger both postbacks are async postback triggers in the update panel, and both are inside the ContentTemplate.

It's not a huge problem, but it causes some confusion, has anybody ever seen this issue before?


Doubt in sp execution

Hi,  i am executing sp in one of my database it is taking 4 minutes to complete execution. where as i am executing same sp in different database it is taking only 1 millisecond to complete execution. i have checked the table settings such as index and table data also everything is same. now i want to find where is the problem. what are steps to find such kind of problems.

Slow query execution

Hello, I have a strange problem that suddenly happened. I have a Windows 7 Ultimate OS running SSMS 2008. When I run a query or an stored proc against a server (the server is remote and passes through a VPN tunnel) it can take me 40 seconds to get the query to complete. But when I run a similar query against another server located at the same location (go through the same tunnel) I get the results in 1 second.  I select about 400 rows on both servers. The slow response comes from a server that runs sql 2005 and the fast response is sql 2008. I asked a friend that works in the same office with me and uses the same connection as I do to run the same queries and he gets the result in 1 second. Does anyone has any ideas what can cause such problems?  I tried to remove and reinstall all the sql server components from my computer but nothing helped? Thanks, Oded Tal

Staying with the SQL Agent during Execution

I need to create a stored procedure that triggers off a particular job in the SQL server 2005 agent, waits for the job to complete and then returns back the control to the calling application with the job execution results. As far as triggering off the SQl server agent is concerned, I can use the sp_start_job procedure. But what is the best way to wait for the job to complete execution (Because the sp_start_job proc returns back the control immediately after starting the job). I could use the sp_help_job proc in a loop and wait for the value of the "current_execution_status" column to change from 1 to 4...but is there a better way of doing this? Appreciate inputs here. - Thanks, Manmeet

Wierd error during execution of SerializeReply of IDispatchMessageFormatter

I am trying to develop a WCF REST app as explained in http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/04640a45-1a37-4722-8ed7-9f75c155dc14 (which serves both XML and JSON at the same time). the error is in the return statement of the following code: Public Function SerializeReply(ByVal messageVersion As System.ServiceModel.Channels.MessageVersion, ByVal parameters() As Object, ByVal result As Object) As System.ServiceModel.Channels.Message Implements System.ServiceModel.Dispatcher.IDispatchMessageFormatter.SerializeReply Dim formatter As IDispatchMessageFormatter = Me.xmlFormatter If OperationContext.Current.OutgoingMessageProperties.ContainsKey(WebBodyFormatMessageProperty.Name) Then Dim webBody As WebBodyFormatMessageProperty = DirectCast(OperationContext.Current.OutgoingMessageProperties(WebBodyFormatMessageProperty.Name), WebBodyFormatMessageProperty) If webBody IsNot Nothing AndAlso webBody.Format = WebContentFormat.Json Then formatter = Me.jsonFormatter End If End If Return formatter.SerializeReply(messageVersion, parameters, result) End Function It gives the error as "The given key was not present in the dictionary." further going deeper the stack trace looks like the following: Encountered unexpected namespace 'http://schemas.microsoft.com/ws/2005/05/envelope/none'. The namespace must be empty. Parameter name: ns

Improper execution plan with scalar function

Run the following sql in an empty db(in my case, sql 2008): create table t (id int) go declare @i int set @i = 1 while @i <= 1000 begin insert t values (@i) set @i = @i + 1 end go create function f(@i int) returns int as begin return (select count(*) - 10000+@i from t) end go Then run the following sql a, it's slow, used 6 seconds, yet sql b is very fast. Their execution plans are totally different. Can sql a run as fast as sql b? If not, why? -- sql a declare @i int set @i = 500 select * from t where id = (select dbo.f(@i)) -- sql b select * from t where id = (select dbo.f(500)) Thanks!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend