Showing posts with label names. Show all posts
Showing posts with label names. Show all posts

Tuesday, March 20, 2012

Referencing system message types

I need to handle system messages being put on my queue.

I have 2 ways of doing this, by message_type_id or by name.

As BOL only mentions names of message types I assume the only gauranteed method is the "by name" option. or can I guarantee the values of message_type_ids, the reason I thought the latter was possible was that Remus included ids in his recent performance blog post.

Thanks

The safest way is to look up the id by name at the procedure start and then use the id. The system message type ids are the same on all deployed SQL 2005 SKUs/versions, but we cannot guarantee this for future versions.

HTH,
~ Remus

Monday, March 12, 2012

Reference variables with identical names but different scopes

Hi,
I have a script task that can "see" 2 variables with identical names. The only difference is that they are scoped differently.

As far as I know my script task will use the most locally scoped variable by default. Is there any way to make it use the other one?

-JamieHi it seems as tho I'm going to get much reply so I've submitted this at betaplace: 708844227

-Jamie|||

Give people a chance, you only posted a few hours ago! Saying that from all we have learnt about the “precedence” behaviour of variables and scope, I certainly don’t think it can be done. Did you suggest a fully qualified syntax to access higher variables? I’d quite like that, but not a big deal for me (yet).

|||

DarrenSQLIS wrote:

Give people a chance, you only posted a few hours ago! Saying that from all we have learnt about the “precedence” behaviour of variables and scope, I certainly don’t think it can be done. Did you suggest a fully qualified syntax to access higher variables? I’d quite like that, but not a big deal for me (yet).

Yeah I know, sorry, but when I said I didn't think i was going to get a reply I meant because I'm convinced this can't be done so I wanted to get the bug in ASAP. Also Doug contacted me offline and as-near-as-makes-no-difference confirmed my suspicions.

A fully qualified syntax is what I had in mind but I didn't suggest it - better let the dev team come up with their own ideas I reckon. Besides, in my scenario that wouldn't work because it could be akin to hardcoding the scope and I want a generic event handler that works for all containers, but basically ignores the "most local" scope. Does that make sense?
A fully qualified syntax is a good idea though.

The more and more I look at this though the more I'm becoming convinced that this system variable that is scoped to the task in the event handler is something new in June CTP. I'm pretty sure that before then:

-there was only ever one occurence of System::ContainerStartTime
-it contained the start time of the container raising the event
-and it was scoped to the event handler

That is EXACTLY the same as System::SourceName, System::SourceDescription, System::SourceID, etc...

-Jamie

Friday, March 9, 2012

Reference a file name

Hi,
How can I reference the ldf or mdf (using the logical names) file of a
particular database when I'm in a diferent context, for instance, I've got
two databases PG and PG1 and being in PG1 I want to do the following
DBCC SHRINKFILE (PG_Log ,100)
Any ideas?One option,
EXEC('Use PG DBCC SHRINKFILE (PG_Log ,100)')
-Sue
On Thu, 27 Apr 2006 17:35:01 -0700, FJC
<FJC@.discussions.microsoft.com> wrote:

>Hi,
>How can I reference the ldf or mdf (using the logical names) file of a
>particular database when I'm in a diferent context, for instance, I've got
>two databases PG and PG1 and being in PG1 I want to do the following
>DBCC SHRINKFILE (PG_Log ,100)
>Any ideas?|||Thanks Sue, I worked.
"Sue Hoegemeier" wrote:

> One option,
> EXEC('Use PG DBCC SHRINKFILE (PG_Log ,100)')
> -Sue
> On Thu, 27 Apr 2006 17:35:01 -0700, FJC
> <FJC@.discussions.microsoft.com> wrote:
>
>

Reference a file name

Hi,
How can I reference the ldf or mdf (using the logical names) file of a
particular database when I'm in a diferent context, for instance, I've got
two databases PG and PG1 and being in PG1 I want to do the following
DBCC SHRINKFILE (PG_Log ,100)
Any ideas?One option,
EXEC('Use PG DBCC SHRINKFILE (PG_Log ,100)')
-Sue
On Thu, 27 Apr 2006 17:35:01 -0700, FJC
<FJC@.discussions.microsoft.com> wrote:
>Hi,
>How can I reference the ldf or mdf (using the logical names) file of a
>particular database when I'm in a diferent context, for instance, I've got
>two databases PG and PG1 and being in PG1 I want to do the following
>DBCC SHRINKFILE (PG_Log ,100)
>Any ideas?|||Thanks Sue, I worked.
"Sue Hoegemeier" wrote:
> One option,
> EXEC('Use PG DBCC SHRINKFILE (PG_Log ,100)')
> -Sue
> On Thu, 27 Apr 2006 17:35:01 -0700, FJC
> <FJC@.discussions.microsoft.com> wrote:
> >Hi,
> >How can I reference the ldf or mdf (using the logical names) file of a
> >particular database when I'm in a diferent context, for instance, I've got
> >two databases PG and PG1 and being in PG1 I want to do the following
> >
> >DBCC SHRINKFILE (PG_Log ,100)
> >
> >Any ideas?
>

Saturday, February 25, 2012

Reduce time connection to AS2005

what is "slow"?
when the pivottable access the cube, the first time a query is executed
against the server to retrieve the measure names, but this query also ask
for the data, not only the labels. (use the profiler to see this query)
if 1 of your measures is a complex one, then you'll suffer a delay.
if your metadata is more complex in your cubes, then the time required to
retrieve the metadata is longer.
verify if you have the right SP level installed on the server AND the client
verify if you have activated the compression
also, it could be an authencation issue, maybe you suffer a delay due to a
network configuration issue (verify the DNS configuration if you use the
Active Direcotry)
again, use the profiler on the server to identify the source of the problem.
"Kazmane" <mkazmane@.capinfo.co.ma> wrote in message
news:%23y9YKXulGHA.1972@.TK2MSFTNGP05.phx.gbl...
> can someone help to reduce a time connecting to As2005 with using OLEDB9.0
> and PivotTable.
> thanks.
>can someone help to reduce a time connecting to As2005 with using OLEDB9.0
and PivotTable.
thanks.|||what is "slow"?
when the pivottable access the cube, the first time a query is executed
against the server to retrieve the measure names, but this query also ask
for the data, not only the labels. (use the profiler to see this query)
if 1 of your measures is a complex one, then you'll suffer a delay.
if your metadata is more complex in your cubes, then the time required to
retrieve the metadata is longer.
verify if you have the right SP level installed on the server AND the client
verify if you have activated the compression
also, it could be an authencation issue, maybe you suffer a delay due to a
network configuration issue (verify the DNS configuration if you use the
Active Direcotry)
again, use the profiler on the server to identify the source of the problem.
"Kazmane" <mkazmane@.capinfo.co.ma> wrote in message
news:%23y9YKXulGHA.1972@.TK2MSFTNGP05.phx.gbl...
> can someone help to reduce a time connecting to As2005 with using OLEDB9.0
> and PivotTable.
> thanks.
>