Showing posts with label certain. Show all posts
Showing posts with label certain. Show all posts

Sunday, March 25, 2012

ActiveX to define presidence

I have a DTS package (SQL2000) which uses ActiveX scripts to check for records with certain criteria in a table. If the certain criteria is met, I want to initiate a child package that preforms a data-extraction. Otherwise move onto the next step which check for a different set of criteria. Currently if the criteria is met, I flag the task as success to dictate moving to one set of steps, otherwise failure & moving onto the next check.

The problem I am realizing, is that if I 'Fail' on of the check steps, subsequent steps furthur down the route that I am directing it to go, do not run. These are other ActiveX tasks that send email, and do furthur analysis.

Why is this the case? Can't you perform a logical check, and based upon the check have a decision to run certain steps? I attempted to use the result 'Main = DTSStepScriptResult_DontExecuteTask', but I must not be using it correctly, because it lists the task as returning failure.

Any help would be great.

Kevin Albrecht

DTS is called "SQL Server Integration Services" in the SQL Server 2005 generation. If you re-post your question in the SSIS forums (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1) the DTS experts that hang out over there could likely answer your question.

Thanks,
Steve

|||Moving thread as per the suggestion to keep in SSIS related forums.|||Don't use success/fail as the flag to move to the next step. Set a variable and use an "Expression" precidence constraint to pick which one to move too.

ActiveX Script Task/Function Not Found

We have a SQL Server 2005 Cluster that we are trying to send email from to notify when certain jobs have completed, failed, etc. We are having a bit of a problem getting the email to work and I believe that the failure is at the SMTP server, not at the SQL level.

That being said, I'm trying to create a simple SSIS package that I can use to test connectivity to the SMTP server with and send email. I've added an ActiveX Script Task that calls a COM object that actually sends the email. I keep getting a "Function not found." error when I try to execute the package, and I have no idea why I'm getting that. It says that the errors were found during validation.

Can anyone help?

Function not found is most likely the result of an invalid reference.

However, we do not recommend using the ActiveX script task - it is only for backwards compat. Better to move to the Script task which uses VB.Net and which enables a much better development and debugging experience.

Donald

Monday, March 19, 2012

Active Directory Groups Authenticate

I've got a windows application that needs to authenticate to the active directory.
But the only members of certain group can start the application.
for example only the administrators of the active directory can start the application.

Cheers,
Mike

Try posting this question on an Active Directory forum.

Thanks
Laurentiu

Active Directory groups / Permissions problems

We have a large group of users that need read access to a certain report folder. We have added the active directory group to the permissions for the entire folder, and all the reports inherit the folder's permissions.

About 75% of the people in the group CAN access the reports just fine. About 25 people cannot - they get the typical"The permissions granted to user 'DOMAIN\user' are insufficient for performing this operation."

Could someone point me in the right direction for debugging this problem? Is this a bug in Microsoft, or is this a "common" configuration problem where I can look at a couple of logs and change a couple of settings?

Any tips would be greatly appreciated

Sue

HiSue,

Do you use xp system? If so, you have to use impersonation, while on IIS6
and above you can use a domain account for the AppPool.

#Understanding ASP.NET Impersonation Security - Rick Strahl's Web Log
http://west-wind.com/weblog/posts/2153.aspx

Hope this helps.

|||

Rex:

Thank you for the tip. I do use IIS6, and the Reports Server web site, installed by the Reporting Services installer, already uses Impersonation.

Itried to change my application pool identity to a network service account, and it comes back saying I can't even browse the site, due to "Service Unavailable". The event logs seem to indicate that that service account doesn't have some security policy rights on the system, but I tried adding that account to "Log on Locally", "Log on as Service" and "Log on from Network" and none of that works.

We have also discovered that the domain group account that we added for security is listed in Active Directory as a "Distribution" type group and not a "Security" type group. I don't know if this makes a difference, but I'm going to see if we have a security group for these people.

Thanks
Sue

Active Directory and Stored Procedures

I have a need to access the active directory from a stored

procedure. I am certain that CLR is the answer but I am having a

hard time finding and example and I am a true newbie to AD and CLR.

Has anyone ever attempted to do this? I would love to see an example in VB if possible.It's certainly feasible to use SQLCLR to access AD. However, depending on how you plan to use the data coming from AD, it's not necessarily the most convenient approach. Instead of connecting to AD from managed code, you might want to consider linking to your AD store from
within SQL Server (see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/joining_heterogeneous_data.asp,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/creating_and_executing_a_view.asp,
and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/creating_a_heterogeneous_join_between_sql_server_and_active_directory.asp for details). This would allow you to create joins directly to AD-sourced views, which may better suit your use of AD data from a stored procedure.|||Thank you, I had seen the first link and had started working with it.

I now have to find a way to convert the SID from a byte array so I can

store it in my application. I am only storing the SID and will

make "round trips" to the AD for all user information.

I appreciate your help.

Rick

Tuesday, March 6, 2012

Accumulated values in analysis services

Hello,

I'm making a report where I have a matrix showing the weeks of a month in the columns and certain data. The user selects a month and I use it as a parameter to show all the calculations from a cube. I already have all the data needed for the matrix, the problem is that I need an accumulated value in the last row that sums the first week's accumulated value and the second week's value and so on (the month can have 4 or 5 weeks). The first week's accumulated value is the data itself since there is no previous value.

week1

week2

week3

....

data

x1

x2

x3

...

accumulated value

x1

x1+x2

x1+x2+x3

...

I don't know if I can do this from the cube using a mesure or something(i think it would be easier to have all the calculations in the cube),or if it has to be done from the matrix in the report.

I would appreciate all help you can give me. Thanks in advance.

Assuming that you have a hierarchy with something like Year - Month - Week, you should be able to create a calculated "MonthToDate" figure using the PeriodsToDate function.

eg.

CREATE MEMBER Measures.MonthToDate AS SUM(PeriodsToDate([Time].[Year-Month-Week].[Month],[Time].[Year-Month-Week].CurrentMember),Measures.[data])

|||

Hello Darren!,

Thanks for your reply!, that is what I wanted to do :)

Sunday, February 19, 2012

Accessing stored procedure with another role?

Hi NG,
I have the problem that I need to give certain users the right to add and
remove other users from roles. I have a stored procedure that looks
simplified like this
CREATE PROCEDURE UpdateUserRoles
(
@.UserName varchar(255),
@.RoleName varchar(255),
)
AS
EXEC sp_addrolemember @.RoleName, @.UserName
GO
This works for me fine because I have the db_owner role, but if you don't
have the role you are not allowed to execute the system sp
"sp_addrolemember". And I need that some users of the programm can execute
this procedure, but I can grant them all rights there are, they habe to be
in the db_owner role and I don't want to do that for obvious reasons.
My question, is it possible, that everybody who ist allowed to use this
procedure is allowed to use it as db_owner? I don't want them to be in the
db_owner role, they should just have the right for this one procedure...
I tried:
GRANT Execute ON UpdateUserRoles to User as db_owner
but I got
Grantor does not have GRANT permission...
Any help is appreciated...Christian
I've got
Server: Msg 15247, Level 16, State 1, Procedure sp_addrolemember, Line 49
User does not have permission to perform this action.
I'm affraid you cannot. However , please take a look at an Application Role
that you can activate on the connection to the database
"Christian" <uce@.cash4banners.de> wrote in message
news:u6gw5jLnFHA.3656@.TK2MSFTNGP09.phx.gbl...
> Hi NG,
> I have the problem that I need to give certain users the right to add and
> remove other users from roles. I have a stored procedure that looks
> simplified like this
> CREATE PROCEDURE UpdateUserRoles
> (
> @.UserName varchar(255),
> @.RoleName varchar(255),
> )
> AS
> EXEC sp_addrolemember @.RoleName, @.UserName
> GO
> This works for me fine because I have the db_owner role, but if you don't
> have the role you are not allowed to execute the system sp
> "sp_addrolemember". And I need that some users of the programm can execute
> this procedure, but I can grant them all rights there are, they habe to be
> in the db_owner role and I don't want to do that for obvious reasons.
> My question, is it possible, that everybody who ist allowed to use this
> procedure is allowed to use it as db_owner? I don't want them to be in the
> db_owner role, they should just have the right for this one procedure...
> I tried:
> GRANT Execute ON UpdateUserRoles to User as db_owner
> but I got
> Grantor does not have GRANT permission...
> Any help is appreciated...
>|||Thanks Uri.
Changing shortly the connection to another user worked for me. Thanks
again...
"Uri Dimant" <urid@.iscar.co.il> schrieb im Newsbeitrag
news:uZ2KtuLnFHA.2852@.TK2MSFTNGP15.phx.gbl...
> Christian
> I've got
> Server: Msg 15247, Level 16, State 1, Procedure sp_addrolemember, Line 49
> User does not have permission to perform this action.
>
> I'm affraid you cannot. However , please take a look at an Application
> Role that you can activate on the connection to the database
>
>
> "Christian" <uce@.cash4banners.de> wrote in message
> news:u6gw5jLnFHA.3656@.TK2MSFTNGP09.phx.gbl...
>