Showing posts with label example. Show all posts
Showing posts with label example. Show all posts

Tuesday, March 20, 2012

Authentication failure - can't find domain accounts

We're getting an error where we can't add a login with the full dns name of a user - domain.xyz\user, for example. Get an error 15401, "Windows NT user or group domain.xyz\user' not found". The domain has a different Netbios name and DNS domain names, so we can add the user when we use the form "netbiosname\user". So far so good.

Unfortunately, we have another application - Office Share Point Server whose shared services provider won't run, giving errors in the event log every 60 seconds that "Windows NT user or group 'domain.xyz\user' not found".

It looks as if SQL insists upon listing users in the form netbiosdomainname\user, and applications that look for domain.xyz\user simply fail to authenticate.

Suggestions?

jnfranc at yahoo period com

SQL Server only understands NetBIOS names for Windows principals (i.e. when creating a login), but authentication via SSPI should work normally.

Please let us know if you still require help on this issue, if so, we will need more details regarding the failure, if possible the SQL Server error number/message.

Thanks a lot,

-Raul Garcia

SDE/T

SQL Server Engine

Authentication failure - can't find domain accounts

We're getting an error where we can't add a login with the full dns name of a user - domain.xyz\user, for example. Get an error 15401, "Windows NT user or group domain.xyz\user' not found". The domain has a different Netbios name and DNS domain names, so we can add the user when we use the form "netbiosname\user". So far so good.

Unfortunately, we have another application - Office Share Point Server whose shared services provider won't run, giving errors in the event log every 60 seconds that "Windows NT user or group 'domain.xyz\user' not found".

It looks as if SQL insists upon listing users in the form netbiosdomainname\user, and applications that look for domain.xyz\user simply fail to authenticate.

Suggestions?

jnfranc at yahoo period com

SQL Server only understands NetBIOS names for Windows principals (i.e. when creating a login), but authentication via SSPI should work normally.

Please let us know if you still require help on this issue, if so, we will need more details regarding the failure, if possible the SQL Server error number/message.

Thanks a lot,

-Raul Garcia

SDE/T

SQL Server Engine

sql

Saturday, February 25, 2012

Attribute Relationships, Related Attributes, Uniqueness

I haven't see a clear example of how to setup the following for efficient aggregations:

Example 1:

If I have a Hierarchy like:

Year->Month->Day

Its clear how to setup the attribute relationships as long as the Month members are all unique. Can I somehow include an Attribute like WeekendIndicator? Weekend certainly isn't unique, but it would seem there should be a way to roll this up and include it in the attribute relationships.

Example 2:

In many of my dimensions, I have Hierarchies whose Name member is not unique, but there is an Id value that is unique. I want to build the relationships using the Ids since I know the aggregations will be good...the problem is, that a program querying the data would use the IDs, but a person writing a report would want to use the Name attributes. Is there a way to link the two together so that the non-unique name members are tied to the Id fields. The User Defined Hierarchy define on names works fine from a UI perspective, but I want to make sure I have aggregations as well.

For example, if I have a Campaign dimension, and users frequently want to navigate these for rollups:

Account -> MarketingProgram->MarketingCampaign

The fact is an Order

The Program and Campaign names can be anything, but their IDs are enforced to be unique. How do I manage these together?

Example 3:

And finally, if I want to do rollups with the following types of attributes

AccountStatus->AccountCategory->Account

I can't build an attribute relationship for this since Account Category does not imply Account Status since all accounts of a certain category are not guaranteed to be within an Account Status. How do I efficiently build aggregations for this type of hierarchy? The User Defined Hierarchy allows the customer to navigate it, but the aggregations don't allow it.

Thanks for any insight!

Example 1

Create a new attribute WeekeendIndicator and use it to filter the time dimension.

Example 2

One way to resolve this by adding the name and id in a view or Data Source View as a calculated value, e.g.
Market Development Fund (1)
Market Development Fund (2)
Market Development Fund (3)

Example 3

If the hierarchy is enforced (or a strong hierarchy) such as the time dimension, then aggregations can roll up.

Hope this helps.

|||

That's a solution , but not quite what I want to do.

Example 1 -> Is there a way to pre-aggregate this information with attribute relationships?

Example 2 -> I know I can generate unique names, but is there a way to "pair" attributes together so I can leverage the Ids for the aggregation but see the names elsewhere

Example 3 -> The issue is the hierarchy is not enforced, so is there no option for attribute relationships of any kind, is there another way I should model this?

Friday, February 24, 2012

Attribute Hierachies

Hi there. I have a problem that I have been struggling to understand. Here is the situation. I will use a time dimension just as an example.

If I build a time dimension containing 2 Years of dates from 2005 to 2006 with 3 attributes: Year, Month, Date and set my attribute relationships as Date ->Month and Month -> Year. In management studio I can drag over Month and then Year (in that particular order ) and it will give me the correct results. For example if I expand the Month of January 2006 the year column will show 2006. Now If I filter the year column for the year of 2006, you would expect that the month column would only contain the months of 2006, but it doesn't. It still has months for 2005.

Now if I rebuild that dimension setting the attribute relationships to the key. I.e. Date ->Year, Month. And no attribute relation to month. I can rebuild the cube and drag over the same 2 colums, Month and Year (in that order) and then filter on the the year column for 2006 and then the Month column will show only the months for 2006.

Whats going on here?

I would check to make sure you have the total heirarchy structure as part of your key.

IE: Date should have a key of (Year --> Month --> Date).

|||

I'm not quite sure what you mean since date is the key.

My user hierarchy for the first scenario is:

Year

Month

Year (year is the attribute relationship)|||

I was able to recreate this scenario using Adventure Works. Seems to me this should work, but it behaves as you described. Here's what I did:

First, I created a new dimension called Date Test 1 that had three attributes -- Date, Month, Year based on the DimTime dimension table. For this dimension, I left Month and Year related to Date (the default). The Month attribute had members like "January 2002", "January 2003", etc. while the Year attribute had members like "CY 2002", "CY 2003", etc. I included this dimension in the Adventure Works cube, relating it to the Internet Sales measure group (joining from the Date attribute to the OrderDateKey column in the underlying fact table). After deploying and processing the updated project, I browsed the cube. From the Date Test 1 dimension, I put Month on rows and got each month listed. I then added Year to the filter area (not the subcube filter area, but the normal page filter area. I selected only "CY 2003" from the list of years and the list of months was indeed filtered to just those in 2003. Note that this was done without putting any measures in the data area -- just the dimension data. This works as I would expect it to.

Second, I created another new dimension called Date Test 2 that had the same three attributes with the same definitions. However, in this test, I moved the attribute relationship for Year from the Date attribute to the Month attribute. Thus, Date had a single attribute relationship to Month and Month had a single attribute relationship to Year. I again added this new dimension to the Adventure Works cube, relating it in the same manner as Date Test 2. Then I did the same browsing test. In this case, adding Month on rows to begin with gives the same list of all months across years. But, adding Year to the filter area and selecting "CY 2003" did NOT filter the list of months displayed on rows. Again, this was done without any measures in the data area (as was the first test above).

A few interesting observations:

1. I turned on SQL Server Profiler and captured the MDX queries being generated. As far as I can tell, they look exactly the same. They query in the browser window results in a few different queries that look something like this:

CREATE SESSION
SET [Adventure Works].[{39001120-29B1-4733-BBBA-C2BA3B63A05B}Pivot21Axis1Set0] AS
'
{
{ [Date Test X].[Month].[All] },
AddCalculatedMembers([Date Test X].[Month].[Month].MEMBERS)
}
'

SELECT
NON EMPTY [{39001120-29B1-4733-BBBA-C2BA3B63A05B}Pivot21Axis1Set0]
FROM [Adventure Works]
WHERE
(
[Date Test X].[Year].&[2003]
)

2. In the browser window, if I instead add the Year attribute to the subcube filter area (instead of the page filter area in the pivot area itself), things work as expected. For both dimension tests, the list of months displayed on the rows after adding the Month attribute is filtered when a specific year is selected for the Year attribute filter.

I suspect that this has something to do with how the query engine determines what attribute combinations actually exist (ie, the autoexists feature of the engine). It seems to be able to determine that the months of a given year are the only months that exist when both attributes are related to the key attribute for the dimension. But it doesn't seem to be able to determine this in a scenario where the relationship between the attributes is above the key attribute for the dimension.

I would consider this to be a bug myself. Anyone from Microsoft care to comment (Mosha?)

HTH,

Dave Fackler

|||

Thanks for taking the time to go through this. Another thing to note is that the same situation occurs when both attributes are related to the key attribute and then you try to filter the dates by the month.

I suspect that this is a bug as well. Any other comments?

Thanks.

Attention SQL Programmer's

I have an alphanumeric field that I need to sort. So for example the data
is:
1A
2A
10A
1B
11A
When I sort it needs to come out like:
1A
1B
2A
10A
11A
Can someone provide the best method on how to do this?
Thank you,
DavidSELECT your_column
FROM your_table
ORDER BY RIGHT('000' + your_column, 3)
Jacco Schalkwijk
SQL Server MVP
"David Pope" <dpope@.nospam.satx.rr.com> wrote in message
news:%23wMYh8vLFHA.3708@.TK2MSFTNGP14.phx.gbl...
>I have an alphanumeric field that I need to sort. So for example the data
>is:
> 1A
> 2A
> 10A
> 1B
> 11A
> When I sort it needs to come out like:
> 1A
> 1B
> 2A
> 10A
> 11A
> Can someone provide the best method on how to do this?
> Thank you,
> David
>|||The "best" solution is to divide this column up into two separate columns,
one numeric and one CHAR. Barring this schema change, other alternatives
might include:
1) split the data element up as it is read (should be easy if it's always of
the format nA or nnA where n is a numeric and A is an alphabetic char).
Just grab the RIGHT(sortvalue, 1) to get the CHAR and the rest
(SUBSTRING(sortvalue, 1, LENGTH(sortvalue) - 1) is the number - make sure to
convert to a numeric type).
2) A simpler solution might be to left pad with 0's, either in your DB or
during the select. For instance, to left pad with up to 3 zeros in the
select, you could do something similar to this:
SELECT sortvalue
FROM mytable
ORDER BY (RIGHT('000' + sortvalue, 3))
"David Pope" <dpope@.nospam.satx.rr.com> wrote in message
news:%23wMYh8vLFHA.3708@.TK2MSFTNGP14.phx.gbl...
>I have an alphanumeric field that I need to sort. So for example the data
>is:
> 1A
> 2A
> 10A
> 1B
> 11A
> When I sort it needs to come out like:
> 1A
> 1B
> 2A
> 10A
> 11A
> Can someone provide the best method on how to do this?
> Thank you,
> David
>|||Try,
use northwind
go
select
colA
from
(
select cast('1A' as varchar(25))
union all
select '2A'
union all
select '10A'
union all
select '1B'
union all
select '11A'
) as t(colA)
order by
cast(left(colA, patindex('%[^0-9]%', colA) - 1) as int) asc,
right(colA, patindex('%[0-9]%', reverse(colA)) - 1) asc
go
AMB
"David Pope" wrote:

> I have an alphanumeric field that I need to sort. So for example the data
> is:
> 1A
> 2A
> 10A
> 1B
> 11A
> When I sort it needs to come out like:
> 1A
> 1B
> 2A
> 10A
> 11A
> Can someone provide the best method on how to do this?
> Thank you,
> David
>
>|||Am I missing something because this doesn't produce the desired result?
David
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:%23i8yLAwLFHA.3016@.TK2MSFTNGP15.phx.gbl...
> SELECT your_column
> FROM your_table
> ORDER BY RIGHT('000' + your_column, 3)
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "David Pope" <dpope@.nospam.satx.rr.com> wrote in message
> news:%23wMYh8vLFHA.3708@.TK2MSFTNGP14.phx.gbl...
>|||Where is it failing to produce the desired result? Do you have data items
that have more than three digits or more than one alphabetic character on
the end? Is this a VARCHAR column?
This is why you should post DDL as well as sample data. For the sample data
you provided, this should produce the expected result you provided.
"David Pope" <dpope@.nospam.satx.rr.com> wrote in message
news:Ovq1JGwLFHA.3512@.TK2MSFTNGP15.phx.gbl...
> Am I missing something because this doesn't produce the desired result?
> David
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
> wrote in message news:%23i8yLAwLFHA.3016@.TK2MSFTNGP15.phx.gbl...
>|||And for further clarification of what Michael is asking for:
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.

> This is why you should post DDL as well as sample data. For the sample
data
> you provided, this should produce the expected result you provided.|||Here is the table script and the data being used is the exact data posted
earlier.
CREATE TABLE [dbo].[SortExample] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
"Michael C#" <xyz@.yomomma.com> wrote in message
news:eJEnLIwLFHA.3708@.TK2MSFTNGP14.phx.gbl...
> Where is it failing to produce the desired result? Do you have data items
> that have more than three digits or more than one alphabetic character on
> the end? Is this a VARCHAR column?
> This is why you should post DDL as well as sample data. For the sample
> data you provided, this should produce the expected result you provided.
> "David Pope" <dpope@.nospam.satx.rr.com> wrote in message
> news:Ovq1JGwLFHA.3512@.TK2MSFTNGP15.phx.gbl...
>|||Here's your DML:
SELECT [name]
FROM SortExample
ORDER BY RIGHT('000' + [name], 3)
This assumes that the data is not Left or Right-padded with Spaces, however.
It also assumes that none of your [name] values will be over 3 characters
long, which is a safe assumption based solely on your sample data. To
compensate for any left or right padding add LTRIM() and RTRIM() like this:
SELECT [name]
FROM SortExample
ORDER BY RIGHT('000' + LTRIM(RTRIM([name])), 3)
Here's the results with your sample data:
1A
1B
2A
10A
11A
"David Pope" <dpope@.nospam.satx.rr.com> wrote in message
news:%23ZEfALwLFHA.2252@.TK2MSFTNGP15.phx.gbl...
> Here is the table script and the data being used is the exact data posted
> earlier.
>
> CREATE TABLE [dbo].[SortExample] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> ) ON [PRIMARY]
> GO
>
>
> "Michael C#" <xyz@.yomomma.com> wrote in message
> news:eJEnLIwLFHA.3708@.TK2MSFTNGP14.phx.gbl...
>|||Thank you very much!
It works. Excellent!
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:%23i8yLAwLFHA.3016@.TK2MSFTNGP15.phx.gbl...
> SELECT your_column
> FROM your_table
> ORDER BY RIGHT('000' + your_column, 3)
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "David Pope" <dpope@.nospam.satx.rr.com> wrote in message
> news:%23wMYh8vLFHA.3708@.TK2MSFTNGP14.phx.gbl...
>