Showing posts with label level. Show all posts
Showing posts with label level. Show all posts

Friday, March 30, 2012

Role Based Security and Child Groups

Hi All,

I have a report running and I am attempting to assign role based security. I added a group to the site level security. The group I added contains child groups. It doesn't seem that report server is looking into the child groups to see if the logged in user is a member of the child group. Is there anyway to get this to work instead of adding all the groups directly? I suspect that report server is using cominterop and cominterop is not traversing the directory tree?

Thanks,

Darren

Interestingly, if you add a group to a report server that contains logins, then remove that group from Management Studio, everyone in the group still has access to the reports.

DD

Role Based Security and Child Groups

Hi All,

I have a report running and I am attempting to assign role based security. I added a group to the site level security. The group I added contains child groups. It doesn't seem that report server is looking into the child groups to see if the logged in user is a member of the child group. Is there anyway to get this to work instead of adding all the groups directly? I suspect that report server is using cominterop and cominterop is not traversing the directory tree?

Thanks,

Darren

Interestingly, if you add a group to a report server that contains logins, then remove that group from Management Studio, everyone in the group still has access to the reports.

DD

Monday, March 26, 2012

Rights

I have a basic question regarding rights. What level of rights do I
have to have to grant another user update rights? I don't want to
give everyone owner rights. Can a person with update rights grant
another person update rights?

Thanks."Chris_M" <cmcclendon@.houston.rr.com> wrote in message
news:d6cef4db.0311260956.5893b978@.posting.google.c om...
> I have a basic question regarding rights. What level of rights do I
> have to have to grant another user update rights? I don't want to
> give everyone owner rights. Can a person with update rights grant
> another person update rights?
> Thanks.

You can grant a user update rights per table (and per column) if necessary.
If you specify WITH GRANT OPTION, then that user can grant the update right
to other users. There are examples in Books Online in the syntax for GRANT.

A general best practice is to manage permissions with roles, not by
individual user, as it makes things a lot easier. Also have a look at the
built-in roles, such as db_datareader and db_datawriter, which can be
useful.

In general, though, it's considered better to allow data access only through
stored procedures, if this is possible in your situation. This means that
users never require update permissions on tables, they only have execute
permissions on the procedures. That gives you more flexibility, as you can
add logic to the procedure for more control. Check out "Using Ownership
Chains" in Books Online for more details on how this works.

Simon

Friday, March 23, 2012

Right function doesn't handle ending whitespaces?

Have problem with the RIGHT function.

SELECT LEN(RIGHT('ABCD ',5))

Above return 4, but I expects 5. Is this a bug? The compability level i 90

Thanks,

John

The len function automatically trim the spaces on the tail end of the string.|||

The result from this one is "ABCD " with a withspace after D.

SELECT '"' + RIGHT('ABCD ',5) + '"'

How can LEN do so? It isn't a true value|||

Ok in SQL Server all the following values are equal..(while compare)

'ABCD'

'ABCD '

'ABCD '

'ABCD '

'ABCD '

Bcs SQL Server never consider the white space (any number of) at the end of the string. (while compare)

So if all these strings are equal then the length of the each string also equal ie, 4.

Got it?

|||

It depends what kind of operator or function you are using.

select 1

where'ABCD'like'ABCD '

select datalength('ABCD ')

go

AMB

|||Yep, use datalength() if you are interested in counting trailing blanks as part of the length.|||

Mani,

That's not complete accurate. SQL Server knows the values are NOT equal. The LEN() is designed to ignore the trailing spaces.

For example, using the values you have above:

Code Snippet


DECLARE @.MyTable table
( RowID int IDENTITY,
MyValue varchar(20)
)


INSERT INTO @.MyTable VALUES ( 'ABCD' )
INSERT INTO @.MyTable VALUES ( 'ABCD ' )
INSERT INTO @.MyTable VALUES ( 'ABCD ' )
INSERT INTO @.MyTable VALUES ( 'ABCD ' )
INSERT INTO @.MyTable VALUES ( 'ABCD ' )


SELECT SpaceNotTrimmed = ( MyValue + '<--' )
FROM @.MyTable

SpaceNotTrimmed
--
ABCD<--
ABCD <--
ABCD <--
ABCD <--
ABCD <--

As you can see from the example, the trailing spaces are definitely not ignored -they are there.

However the LEN() function does 'ignore' the trailing spaces, if you need to know the character count for a varchar field, you need to use the DATALENGTH() function.

This is one of those 'ANSI' related pecularities...

|||Thanks for all help!sql

Tuesday, February 21, 2012

Returning multiple attributes from the same dimension at the same level

This seems like it should be basic, but I can't find any examples that explain if this should be possible, or if I'm just approach the problem incorrectly. I've got several books on MDX and it seems every example uses only one column from a dimension to perform any reports.

Let's say I have a customer dimension with the attributes:

Customer Id, FirstName, LastName, MiddleName, State, City

A standard date dimension and a fact table that tracks Orders.

In my Customer Dimension I define a hiearchy that has State, City and Customer Id.

With this simple setup, I am able to show Order totals by Customer Id, City or State with no problem. The issue I am having is if I want to write a query that shows order totals by the person, with their first, middle and last name. I can write a cross join with all of these dimensions, but as soon as I add in the Last Name or any other attribute, the query never returns. Is there an architectural thing I am missing that this isn' t how I should structure my cube or is there a way in MDX to have it return other attributes of the dimension along with the attribute that is part of the Hierarchy. I.e, I want results like:

First Middle last Customer Id Month Order Total

Joe M. Smith 123 July $1000

Sally T. Smith 456 July $2000

Is this something I need to structure differently in my Cube (2005) or is there another construct in MDX other than a crossjoin that allows me to get the Rows to contain First, Middle and last name along with the attribute from the hierarchy (Customer Id).

Thanks!

Luke

Luke,

When you crossjoin your attributes you are creating a lot of combinations that do not have any data associated with them and depending on the number of members in each of your attributes this could be a very large result set. Try using NON EMPTY to filter out empty cells:

SELECT

NON EMPTY {Customer.First.DefaultMember.Children * Customer.MI.DefaultMember.Children * Customer.Last.DefaultMember.Children * Customer.ID.DefaultMember.Children} ON ROWS...

HTH,

Steve

|||

You can add a named calculation to your customer table in the data source view(like FullName). Use this attribute in the the dimension editor as the name column for your CustomerId attribute.

Regards

Thomas Ivarsson

|||

I ended up doing three things:

Creating a user hierarchy (on the columns that really are not in a hierarchy)

Creating a query using the hierarchy that referenced the lowest level member

Used a different tool for seeing the results. There is a lot of meta-data returned that all viewers do not show. When accessing through ADO, I received the Unique Name that had all the levels in the hierarchy. This was not show in the Management Studio query interface.

The calculation idea is probably the best way, but it seems odd there isn't another way to do this. I'm still not satisfied with this solution. It seems like this should be a common problem, but I can't find any real reference or example to it.