Friday, March 9, 2012
Reference a file name
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
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?
>
Wednesday, March 7, 2012
Reefernce dimensions
We have designed a schema which has some snowflakes which we implement as Reference dimensions in SSAS. This design seems to be the most logical given that we have a dimension table called Portfolio, which has a number of related dimensions such as Client, Employee and Product. Instead of direcrly joining all these tables to the Positions fact table, we set them up as Reference dimensions via Portfolio.
I have read in a number of places (Lachev, Mundy) that there may be some issues with this approach, particularly on performance. Are there any metrics on what sort of performance degradation there may be? Does it depend on the number of Reference dimensions? Is it generally better if possible to always use the Standard dimensions by denormalising to a star schema - that is making Client, Employee and Product join directly to the fact table? Are there any other advantages or disadvantages, such as in the ease of data maintenance?
I would be grateful for any feedback on this.
I don't know what the performance implications of Reference dimensions are, other than that you should select the "Materialize" option on the Usage dialog, to improve query peformance - could you mention the respective page numbers in the 2 books, since many in this forum may have access to them?
But, regardless of whether you use Reference dimensions, or roll Client, Employee and Product into the Portfolio dimension, there should be no need to denormalize the snowflake to a star. For example, the Product dimension in Adventure Works has 3 tables, but there are other examples of Reference dimensions as well.