Showing posts with label itself. Show all posts
Showing posts with label itself. Show all posts

Tuesday, March 27, 2012

Getting the format bar while using SSRS Web Service

Hi,

I am using the URL method to call reports where you get all the look and feel and report format and export options on the report page itself. When I tried to use the Web Service I couldn't find those options. I can render the reports only one format at a time. Is there anyway to view the reports as in URL methos using web service with all the formatting options? Thank You.

Regards,

Das.

The report toolbar is available only with URL addressability. If you need to use the Web Service, why don't use the Report Viewer controls? Behind the scenes, they call down to the Web service APIs.

Friday, March 9, 2012

getting name of trigger in trigger itself

Hello,
i have a trigger on every table to check that only one row is to handle.
If there are more rows i want to show an error message with the
name of the trigger in which the error occured.
Now i have nearly 100 tables and also so much triggers which are
all identically from the statements inside, only the triggername for
the message is different. So is there a way to get the actual trigger
name instead of having the name hardcoded in each trigger?
tia,
HelmutWhy!!? It seems perverse to prevent multiple row updates. Especially
since the code to do this is probably less efficient than actually
performing the update.
Triggers have global scope and aren't easy to bypass on a live system,
so doing what you propose will make it extremely difficult to perform
any administrative maintenance on the data. Think very carefully about
the implications of this. Even if it is a requirement to limit users in
this way I strongly recommend you do so through SPs rather than
triggers. A trigger should always perform correctly for 0,1 or N rows
updated.
OBJECT_NAME(@.@.PROCID) will return the name of the executing trigger or
proc.
David Portas
SQL Server MVP
--

Wednesday, March 7, 2012

Getting mdb file path at runtime for Dts package

Hi everybody..

I am creating a Dts package for transferring data from an Access mdb file to SQL server 2000 database.

The package itself is being invoked from a .Net program using dtsrun.

What i want to know is that I need to get the mdb files' path at runtime and accordingly run the Dts package for that mdb file path..

So how do i do that?
Thanks

try to include the mdb files in the same path as the .NET program is. then make an iterators or any trick to find the files at run time.

Getting Job name, Job ID , Step within the Job

Hi There,
Can I get the Job ID , Job name and Step ID withing the job itself ? Infact
my need is to send a mail with these parameters and some data from user
tables. This process I have to do from the different servers and jobs. I
would like to impliment this without hardcoding the job names , Job ID etc.
Thank you,
ShinuPlease post DDL, sample data and expected result. If I understand your
question correctly, then I see no reason why this question would ever need t
o
be asked.
ML
http://milambda.blogspot.com/|||Hi ,
Thank you
I just want to get the name of the Job and Job ID within a step of the same
job and mail it.
Eg: In step 1 of the job1 I need to send a mail
EXEC msdb.dbo.SP_Send_DBMail @.Profile_Name = 'MyProfile',
@.Recipients = 'Myname@.MyCompany.com',
@.Body = @.job,
@.Subject = @.@.Servername
Regards,
Shinu
"ML" wrote:

> Please post DDL, sample data and expected result. If I understand your
> question correctly, then I see no reason why this question would ever need
to
> be asked.
>
> ML
> --
> http://milambda.blogspot.com/|||To put it as simple as possible: concatenate the values you want to send in
the body of the e-mail message into a single varchar variable or use the
@.query parameter to specify a query whose result set can either be sent as a
n
attachment or a part of the body.
ML
http://milambda.blogspot.com/|||Hi ,
How can I get the jobname and Job ID within the job ?
Thanks
Shinu
"ML" wrote:

> To put it as simple as possible: concatenate the values you want to send i
n
> the body of the e-mail message into a single varchar variable or use the
> @.query parameter to specify a query whose result set can either be sent as
an
> attachment or a part of the body.
>
> ML
> --
> http://milambda.blogspot.com/|||What exactly are you trying to achieve? Are you designing a procedure that
will send messages as SQL Server Jobs are being run, that can be used in
several of your jobs?
Look at the sysjobs system table (in the msdb database).
ML
http://milambda.blogspot.com/|||My guess is that Shinu want to receive an email with the name of the job, wh
ether the job was OK,
the ID of the job etc. I do this all the time.
Shinu, you can use Agent tokens for this. The syntax for token differs betwe
en 2000 and 2005. If you
search Books Online for below, you will find more information:
token agent
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ML" <ML@.discussions.microsoft.com> wrote in message
news:36337B02-D5C6-4F0B-827C-A55BA5A39380@.microsoft.com...
> What exactly are you trying to achieve? Are you designing a procedure that
> will send messages as SQL Server Jobs are being run, that can be used in
> several of your jobs?
> Look at the sysjobs system table (in the msdb database).
>
> ML
> --
> http://milambda.blogspot.com/|||Ah, you mean using the COMMAND parameter of the sp_add_jobstep system
procedure?
ML
http://milambda.blogspot.com/|||Use tokens.
http://www.sqldev.net/sqlagent/SQLAgentStepTokens.htm
"Shinu" <Shinu@.discussions.microsoft.com> wrote in message
news:433ECE5A-A3FB-45A9-930F-9019B4910343@.microsoft.com...
> Hi There,
> Can I get the Job ID , Job name and Step ID withing the job itself ?
> Infact
> my need is to send a mail with these parameters and some data from user
> tables. This process I have to do from the different servers and jobs. I
> would like to impliment this without hardcoding the job names , Job ID
> etc.
> Thank you,
> Shinu
>
>