Showing posts with label similar. Show all posts
Showing posts with label similar. Show all posts

Thursday, March 29, 2012

Executable or Way for User to Launch an SQL Package?

I have a sitation where I need a dts package or similar to run at a user initiated time. I do not want to give the user access to the server. Any ideas on how one goes about something like this?Howdy

If its through a web or VB type app, let the web app execute a stored procedure called by the app.

Cheers,

SG.|||Hey,
from a vb app or vb script you can do this function:

Public Sub ExecuteEDIPackage(FileName As Variant)

Dim sServer As String
Dim sUsername As String
Dim sPassword As String
Dim sPackageName As String
Dim lErr As Long
Dim sSource As String
Dim sDesc As String

Set oPKG = New DTS.Package

' Set Parameter Values
sPackageName = "EDIPackage"

' Load Package
oPKG.LoadFromSQLServer DataSource, UserName, Password, _
DTSSQLStgFlag_Default, , , , sPackageName

' Set Exec on Main Thread
For Each oStep In oPKG.Steps
oStep.ExecuteInMainThread = True
Next

' Execute
oPKG.Execute

' Get Status and Error Message
For Each oStep In oPKG.Steps
If oStep.ExecutionResult = DTSStepExecResult_Failure Then
oStep.GetExecutionErrorInfo lErr, sSource, sDesc
sMessage = sMessage & "Step """ & oStep.Name & _
""" Failed" & vbCrLf & _
vbTab & "Error: " & lErr & vbCrLf & _
vbTab & "Source: " & sSource & vbCrLf & _
vbTab & "Description: " & sDesc & vbCrLf & vbCrLf
Else
sMessage = sMessage & "Step """ & oStep.Name & _
""" Succeeded" & vbCrLf & vbCrLf
End If
Next

oPKG.UnInitialize

Set oStep = Nothing
Set oPKG = Nothing

End Sub

Wednesday, March 21, 2012

Exclude Single User From Single Report

Here is my situation. I have a group set up in Active Directory for a group
of people that will share similar reports. The problem is that there is one
report that one particular user in that group doesn't need to see, but
everybody else in the group does need to see the report. Right now I have
the group added so everyone sees the report.
How can I exclude that one user from the report, but allow everyone else to
still see. This of course is without creating a new group of the same users,
but without this particular user. That would work, but seems as if there
should be another way.
Thanks!
BJbjkaledas,
I don't know how well you will like this answer, but I don't see many
other alternatives...
That report is currently inheriting its permissions from the folder it
is in. You can override that inheritance and specify item-level
permissions for that report (without affecting the other reports in
that folder).
Once you override the inheritance, you will have to delete the AD group
and add all of the group members EXCEPT for the user you want to
exclude. Unfortunately, that also means that you will have to manually
maintain those permissions when new members are added to the AD group.
Not optimal, but all I can think of.
Microsoft could solve this problem by allowing administrators to
explicity grant AND explicitly deny permissions to objects. All
permissions would stack, and in case of a conflict, it could default to
the most conservative (or limited) access level.
For example, if a user was in a group that could view and another group
that could execute, then the user could view and execute. However, if
the user was in a group that could execute and another group that could
"not execute", then it could default to the "not execute".
Maybe they will include that in the next release...
-Josh
bjkaledas wrote:
> Here is my situation. I have a group set up in Active Directory for a group
> of people that will share similar reports. The problem is that there is one
> report that one particular user in that group doesn't need to see, but
> everybody else in the group does need to see the report. Right now I have
> the group added so everyone sees the report.
> How can I exclude that one user from the report, but allow everyone else to
> still see. This of course is without creating a new group of the same users,
> but without this particular user. That would work, but seems as if there
> should be another way.
> Thanks!
> BJ|||Josh,
Thank you for your response. It seems easier to get one here than on the
forums. I had feared that was the only way around this issue. That is ok
though. Hopefully they will have exclusions in the next version. Hopefully
they will have exceptions in the Subscription schedules also!
Thanks again!
BJ
"Josh" wrote:
> bjkaledas,
> I don't know how well you will like this answer, but I don't see many
> other alternatives...
> That report is currently inheriting its permissions from the folder it
> is in. You can override that inheritance and specify item-level
> permissions for that report (without affecting the other reports in
> that folder).
> Once you override the inheritance, you will have to delete the AD group
> and add all of the group members EXCEPT for the user you want to
> exclude. Unfortunately, that also means that you will have to manually
> maintain those permissions when new members are added to the AD group.
> Not optimal, but all I can think of.
> Microsoft could solve this problem by allowing administrators to
> explicity grant AND explicitly deny permissions to objects. All
> permissions would stack, and in case of a conflict, it could default to
> the most conservative (or limited) access level.
> For example, if a user was in a group that could view and another group
> that could execute, then the user could view and execute. However, if
> the user was in a group that could execute and another group that could
> "not execute", then it could default to the "not execute".
> Maybe they will include that in the next release...
> -Josh
>
> bjkaledas wrote:
> > Here is my situation. I have a group set up in Active Directory for a group
> > of people that will share similar reports. The problem is that there is one
> > report that one particular user in that group doesn't need to see, but
> > everybody else in the group does need to see the report. Right now I have
> > the group added so everyone sees the report.
> >
> > How can I exclude that one user from the report, but allow everyone else to
> > still see. This of course is without creating a new group of the same users,
> > but without this particular user. That would work, but seems as if there
> > should be another way.
> >
> > Thanks!
> >
> > BJ
>

Friday, February 24, 2012

EXCEPT Operator In YUKON?

Does anyone know if the ANSI-92 Except(ALL) Operator will be included in YUK
ON? This is similar to Oracle's MINUS function.
ThxNot that I am aware of any public information on the same. You need to post
the same in the Yukon private newsgroups for further information.
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"RobertR" <anonymous@.discussions.microsoft.com> wrote in message
news:2CB6BCAB-572A-470F-B6EB-46D304F75461@.microsoft.com...
> Does anyone know if the ANSI-92 Except(ALL) Operator will be included in
YUKON? This is similar to Oracle's MINUS function.
> Thx