Showing posts with label executing. Show all posts
Showing posts with label executing. Show all posts

Saturday, February 25, 2012

Can I use Custom UI for executing Package in C#?

Hi

I've a doubt. I don't know whether it is possible or not.

I've a very less knowledge in DTS packages.

When I execute a package in C#. it is displaying predefined GUI for showing process.

Can I've my own UI when executing DTS.

Thanks in advance.

Could you clarify what you mean by "When I execute a package in C#" and whether the question is about DTS 2000 or SSIS. This forum is about SSIS, BTW.|||

Thanks for the reply Michael

I'm using SSIS

I'm putting the C# code here


public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Package package;
ConnectionManager ConMgr;

Package p;
private void Form1_Load(object sender, EventArgs e)
{
string pkg ="Package.dtsx";

Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();
p = app.LoadPackage(pkg, null);

}

private void button1_Click(object sender, EventArgs e)
{
if(p!=null)

p.Execute();

}
}

When I click on Button ie) p.Execute(); is invoked I need my own UI to see the processing . Is it possible.

Thank u

|||Of course - you need to implement event sink interface (IDTSEvents) and/or logging sink interface (IDTSLogging), and call package.Execute(...) version that takes these interfaces (pass null for all other arguments). You'll get the information about the package progress and can show the UI similar (or completely different if you choose) to the one DtExecUI shows (DtExecUI uses the same interfaces).|||

Thanks michael

It is useful

and can I know abt DtExecUI for what it is useful for?.]

|||Well, it executes the packages :)

Some people use command line and some people like to use GUI to execute packages. We provide DTEXEC and DTEXECUI for each group appropriately.|||

Thank u Michael .

Thanks for ur support to know these.

And finally one , can u provide some resource to learn , how to create custom UI. and executing package.etc

|||

Hi

I've one more doubt.

Executing package is a single threaded or multi threaded?

Can I catch the names of the currently transfering table when Executing package?

Thanks in advance.

|||Execution is multithreaded, you'll need to gather information you need from the event and pass it to the UI thread, and probably call package.Execute() on a different thread too to avoid locking up the UI.

There are many events and log information, see Books Online for details. Creative use of this information joined with the package information (e.g. transform properties) may give you most of the information you need.

I don't have any sample, sorry.|||

Thanks alot Michael.

Sunday, February 19, 2012

Can I shift the stress of SQL processing using a linked server?

I often need to run intensive queries against our live database but
this affects the performance of the system while the queries are
executing so I'm looking for a way to shift the processing to another
server. I have tried creating a linked server on my local PC pointing
at the live DB but it seems to stress both servers. Does anybody have
any suggestions how I can achieve this?
Thanks,
LiamCan you create a refreshable replica of your Live DB. Quite often reporting
requirements cause this kind of impact. We replicate our live databases to
reporting servers for just this purpose.
--
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Liam Weston" <liam_weston@.hotmail.com> wrote in message
news:5f9a8c3b.0308200334.7a43ef56@.posting.google.com...
> I often need to run intensive queries against our live database but
> this affects the performance of the system while the queries are
> executing so I'm looking for a way to shift the processing to another
> server. I have tried creating a linked server on my local PC pointing
> at the live DB but it seems to stress both servers. Does anybody have
> any suggestions how I can achieve this?
> Thanks,
> Liam|||Linked servers are not of use in your scenario since the server where the
data lives still has to do a substantial, if not majority, of the work. The
solution you want is to take a copy of the data to another machine to do
your reporting. There are numerous strategies for doing this depending on
your exact scenario. Replication, Log Shipping, or simply backing up and
restoring the database on another server are all potential solutions.
--
Hal Berenson, SQL Server MVP
True Mountain Group LLC
"Liam Weston" <liam_weston@.hotmail.com> wrote in message
news:5f9a8c3b.0308200334.7a43ef56@.posting.google.com...
> I often need to run intensive queries against our live database but
> this affects the performance of the system while the queries are
> executing so I'm looking for a way to shift the processing to another
> server. I have tried creating a linked server on my local PC pointing
> at the live DB but it seems to stress both servers. Does anybody have
> any suggestions how I can achieve this?
> Thanks,
> Liam|||Allan,
I plan to implement replication in the coming months and this would
certainly solve the problem. In the short term I can extract data to a
different server 'out of hours' but I was looking for a way of running
queries during peak times at short notice.
Thanks,
Liam