Showing posts with label successfully. Show all posts
Showing posts with label successfully. Show all posts

Monday, March 26, 2012

job security and permission required

Hi,
What permission is required to create and execute the job successfully?
Switch job ownership to A, but A can't execute job successfully. In the job
, there is DTS and stored procedure. What permission is required?
Thank you.
YulingSee:
269074 INF: How to Run a DTS Package as a Scheduled Job
http://support.microsoft.com/?id=269074
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Job scheduling

As opposed to running a job every X minutes, is there a way to schedule a
job to re-start X minutes after it finishes successfully ?
Is this the correct newsgroup for this question ?Untested, but it should work:
schedule the job to run every 1 minute
Add an additional step to the end of the job that will only execute if =
the steps ahead of the job complete successfully that does a WAITFOR =
DELAY.
--=20
Keith
"rob" <rwc1960@.bellsouth.net> wrote in message =
news:XBg6c.47748$xL3.43022@.bignews1.bellsouth.net...
> As opposed to running a job every X minutes, is there a way to =
schedule a
> job to re-start X minutes after it finishes successfully ?
>=20
> Is this the correct newsgroup for this question ?
>=20
>=20
>|||Another option could be to end each job with a jobstep which executes
sp_add_jobschedule to schedule the job again, based on the desired interval.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:eobvl4ODEHA.3584@.TK2MSFTNGP11.phx.gbl...
Untested, but it should work:
schedule the job to run every 1 minute
Add an additional step to the end of the job that will only execute if the
steps ahead of the job complete successfully that does a WAITFOR DELAY.
Keith
"rob" <rwc1960@.bellsouth.net> wrote in message
news:XBg6c.47748$xL3.43022@.bignews1.bellsouth.net...
> As opposed to running a job every X minutes, is there a way to schedule a
> job to re-start X minutes after it finishes successfully ?
> Is this the correct newsgroup for this question ?
>
>

Monday, March 12, 2012

Job fails in SQL Server 2005 Agent with error "Package not found"

Hello everybody,
I am trying to run an SQL Server 2005 job which is made up of one SSIS
package.
The SSIS package run successfully when I start it manually, but as soon as I
include it in an SQL Server Agent I get the error message mentioned in the
subject.
Any ideas?
Thank you in advance
Massimo SartorisHere is the solution for this issue from Micorosft:
http://support.microsoft.com/Default.aspx?kbid=918760
Bob
"Massimo" wrote:
> Hello everybody,
> I am trying to run an SQL Server 2005 job which is made up of one SSIS
> package.
> The SSIS package run successfully when I start it manually, but as soon as I
> include it in an SQL Server Agent I get the error message mentioned in the
> subject.
> Any ideas?
> Thank you in advance
> Massimo Sartoris|||Thank you, Bob.
I tried the proxy method described in the article, but the job keeps
failing. The error message is now
"A required privilege is not held by the client"
The user is an administrator on the SQL server machine, which privilege is
actually missing?
Thank you
"Bob" wrote:
> Here is the solution for this issue from Micorosft:
> http://support.microsoft.com/Default.aspx?kbid=918760
> Bob
>|||Did you change the SQL Server Service account to use the proxy method?
"Massimo" wrote:
> Thank you, Bob.
> I tried the proxy method described in the article, but the job keeps
> failing. The error message is now
> "A required privilege is not held by the client"
> The user is an administrator on the SQL server machine, which privilege is
> actually missing?
> Thank you
>
>
> "Bob" wrote:
> > Here is the solution for this issue from Micorosft:
> >
> > http://support.microsoft.com/Default.aspx?kbid=918760
> >
> > Bob
> >
>|||Bob,
I did, actually.
I created a credential with an account that has administrator rights
(Username "Massimo")
I created a proxy using that credential.
I changed the step in the SQL Server agent job saying "run as" the proxy
instead of the SQL Agent Service Account
Username "Massimo" is also member of the group SQLServer2005SQLAgentUser
Cheers
Massimo
"Bob" wrote:
> Did you change the SQL Server Service account to use the proxy method?
> "Massimo" wrote:
>

Job fails in SQL Server 2005 Agent with error "Package not found"

Hello everybody,
I am trying to run an SQL Server 2005 job which is made up of one SSIS
package.
The SSIS package run successfully when I start it manually, but as soon as I
include it in an SQL Server Agent I get the error message mentioned in the
subject.
Any ideas?
Thank you in advance
Massimo SartorisHere is the solution for this issue from Micorosft:
http://support.microsoft.com/Default.aspx?kbid=918760
Bob
"Massimo" wrote:

> Hello everybody,
> I am trying to run an SQL Server 2005 job which is made up of one SSIS
> package.
> The SSIS package run successfully when I start it manually, but as soon as
I
> include it in an SQL Server Agent I get the error message mentioned in the
> subject.
> Any ideas?
> Thank you in advance
> Massimo Sartoris

Job Failing if shceduled from DTS

Hi,
I have an .exe executed from DTS and it is running successfully but when I
schedule a job for the DTS it fails."Detail Records: Error: -214722033
0
(80040496); Provider Error: 0 (0) Error string: CreateProcessTask
'DTSTask_DTSCreateProcessTask_1': Process returned code -532459699, which
does not match the specified Succ... Process Exit Code 1. The step failed.
"
Can anyone please help me?
Thanks.
Riz"Riz" <Riz@.discussions.microsoft.com> wrote in message
news:8032F201-CA6F-42C7-97B4-38F99003331E@.microsoft.com...
> Hi,
> I have an .exe executed from DTS and it is running successfully but when I
> schedule a job for the DTS it fails."Detail Records:
Error: -2147220330
> (80040496); Provider Error: 0 (0) Error string: CreateProcessTask
> 'DTSTask_DTSCreateProcessTask_1': Process returned code -532459699, which
> does not match the specified Succ... Process Exit Code 1. The step
failed."
When you run the job it is running under your permissions, when the SQL
Agent runs a scheduled job it runs under the Agent's permissions.
Most likely the agent does not have access to a resource such as the Network
or a particular share. Or, you need to use the full path in the DTS.
Try the Following:
1. Check in Services to see what account the SQL Server Agent is logging in
as.
If it is logging in to local machine it does not have access to any network
resources.
2. Make sure the executable, including any necessary data files, is
available to the SQL Server Agent account.
3. Use UNC Paths (\\CompName\ShareName\) to avoid drive mapping issues.
Good Luck,
Jim

Monday, February 20, 2012

JDBC Issue with Varchar

OK..Ive successfully connected to sql server and can execute stored
procedures...if the result set is an integer it prints the result set
but has a bunch of errors:
Execute: com.microsoft.jdbc.base.BaseResultSet@.fc9944
Got from result set: 12345
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Invalid parameter binding(s).
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
at
com.microsoft.jdbc.base.BaseCallableStatement.getA ndValidateOutParameter(Unknown
Source)
at com.microsoft.jdbc.base.BaseCallableStatement.getS tring(Unknown
Source)
at JDBC_Test.<init>(JDBC_Test.java:24)
at JDBC_Test.main(JDBC_Test.java:31)
If the result set returns a varchar I get:
Execute: com.microsoft.jdbc.base.BaseResultSet@.fc9944
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Value
can not be converted to requested type.
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
at com.microsoft.jdbc.base.BaseData.getInteger(Unknow n Source)
at com.microsoft.jdbc.base.BaseResultSet.getInt(Unkno wn Source)
at JDBC_Test.<init>(JDBC_Test.java:22)
at JDBC_Test.main(JDBC_Test.java:31)
Heres my code:
import java.sql.*;
public class JDBC_Test {
private String msDbUrl =
"jdbc:microsoft:sqlserver://localhost:1433;databaseName=KB;selectMethod=cursor ;";
private java.sql.Connection mcDbAccess;
private CallableStatement msProcedure;
public JDBC_Test() {
try {
Class.forName("com.microsoft.jdbc.sqlserver.SQLSer verDriver");
mcDbAccess = java.sql.DriverManager.getConnection( msDbUrl,
"kbuser", "password" );
msProcedure = mcDbAccess.prepareCall("{call STP_test(?)
}");
msProcedure.setInt( 1, 1);
ResultSet lrsReturn = null;
System.out.println( "Execute: " + (lrsReturn =
msProcedure.executeQuery() ) );
while( lrsReturn.next() ) {
System.out.println( "Got from result set: " +
lrsReturn.getInt( 1 ) );
}
System.out.println( "Got from stored procedure: " +
msProcedure.getString( 1 ) );
} catch( Throwable e ) {
e.printStackTrace();
}
}
public static void main(String[] args) {
new JDBC_Test();
}
}
Jimbo wrote:
> OK..Ive successfully connected to sql server and can execute stored
> procedures...if the result set is an integer it prints the result set
> but has a bunch of errors:
Ok, and what were you expecting? When an ResultSet containing an
integer is returned, you process that and then you try to get a String
output parameter, which you did not declare as output parameter in the
first place (and probably it isn't a String either, as you pass an
integer as input value for that parameter).
In the second case your procedure returns a ResultSet containing a
character value and you try to read it using getInt()?
Alin.
|||I fixed it...sorry about all the questions..Im still learning this
stuff..thanks for all your help..now that I got the recordset
object...do you have a good link that shows me how to pass that
recordset object to a bean so I can view it in a jsp?
thanks
-Jim