To identify the user running the job at runtime
Hi All,
My requirement is to develop a program which need to send mail only if a particular user runs the job.
I need to read the user who runs the job at runtime, i tried with SY-UNAME but it holds the user name of the person who created the job at runtime.
Please suggest me the possible ways of identifying the user running the job at runtime.
Thanks in advance!!!
Regards,
Dinesh.
"I need to read the user who runs the job at runtime, i tried with SY-UNAME but it holds the user name of the person who created the job at runtime."
This is not true if your program/form/method is called inside the ABAP report which is executing in the batch job step. There, the active SY-UNAME is the user entered in SM36 as the job step user. It is not the user who planned/scheduled the job.
It is unclear from your description where your program is actually running. Is it another (ABAP) step belonging to the same job or is it actually some routine called within the same job step that you are checking or is it a program totally unrelated to the batch job in question (in that case, check out the other answers about TBTCO/TBTCP)
- Alex
Similar Messages
-
Identify the job name of a particular process
Hi Experts,
How can i find the job name of a particular process in sm37.since every load has job name as BI_Process_loading.
Thanks,
SandeepHi Sundeep,
can check the jobs by its name and user ID.
ex: BIDTPR job for loading data with DTP.
and time of job run.
check for different jobs runs thorugh process chain, go to completed process chain -> right click on each process type and select messages -> back ground job.
Best Regards. -
Non sysadmin Users running a job
According to BOL, only sysadmin users or owner of the job are allowed to run jobs.
I'm not too concern with viewing the jobs becuase the job will executed from sp.
How do I allow non sysadmin users to run just a certain job(s)? I cannot make all 5 users as the job owners.
Thanks
Edit: This is for SQL Server 2000. But I welcome any suggestions for SQL2008 as well.In SQL 2005+, a new right was added to allow users to run their own jobs. However, you still need to be a sysadmin to run jobs which are not owned by you.
Tom this is not correct . A member of SQLAgentOperator role can execute local jobs even though it is not a owner of the job but this user can only create modify and delete jobs owned by him not by others.
http://technet.microsoft.com/en-us/library/ms188283.aspx
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Not able to run the job with user id - is
Hello experts,
We have problem.
Every day we run the job.
( the job contians two programs called ZTIBCOPRG and J_5HJSTP )).
I would like to know why the above job is running with the user ID TIBCOADM. Because this user has German settings for the size conversion in program ZTIBCOPRG and we are having some issues.
We changed the user to TIBCOUSA and the job would not run.
We have changed the user back to TIBCOADM. It is running.
KINDLY HELP ME WITH YOUR VALUABLE inputs. YOUR HELP WILL BE HIGHLY APPRECIATED.
I have checked for both users in AGR_USERS table.
The AGR_USERS is the old user and have many roles compared to userid TIBCOUSA.
WHERE WE NEED TO SEE . IS it authorisation problem or the other user with whom unable to run the job ?
or is this the error in the program ZTIBCOPRG which is not able to do size conversion and causing some issues.
Thanks and Regards,Hi,
after running the job with user id TIBCOUSA, it should be in cancelled state as per your comments.
you just select the cancelled job and type JDBG in command box and enter it takes you to Debug mode.
There you may get some information where it is failing.
Sudheer. A -
Need to run the JOB without Ineractive Screen
Dear All,
We have written a new ABAP program for executing the Macro background Job and used JOB_OPEN,JOB_SUBMIT and JOB_CLOSE Function Modules to run the JOB from ABAP Program. We are able to run the JOB successfully for Any other ABAP Programs through the custom program, but when I tried with the same approach to run the Macro job through my new ABAP Program the JOB is throwing an error.
Error Message is like below
Job started
Step 001 started (program /SAPAPO/TS_BATCH_JOB, variant TEST, user ID GKMN3511
Specify a start time
Job cancelled after system exception ERROR_MESSAGE
Point of doubts:
-- Can we really execute the Macro job through the ABAP program with out any dialogue screen (because when I use the "/SAPAPO/MC8G - Schedule Demand Planning in the Backgroundu201D program in my custom program it pop-ups a interactive screen which I don't want in my ABAP program while scheduling the macro job)
Regards,
RajuIn transaction /sapapo/mc8t --> define the activity that looks at the macro in question
In transaction /sapapo/ mc8d --> define the job that looks at that activity and a selection iD/aggregation level
In transaction /sapapo/ts_batch_run --> save a variant pointing to the job defined in mc8d
you can then run the /sapapo/ts_batch_run job with that variant -
Please help me to get this done!....Thanks in Advance
This is current script I use to update AD record but its taking user id to pick the user in AD, which is some time give error not update properly..
# UpdateUsers.ps1
# PowerShell program to update Active Directory users from the information in a
# Microsoft Excel spreadsheet. Only single-valued string attributes supported.
# Author: Richard Mueller
# PowerShell Version 1.0
# September 12, 2011
Trap
If ("$_".StartsWith("Cannot load COM type Excel.Application"))
"Excel application not found, program aborted"
Add-Content -Path $LogFile -Value "## Excel application not found"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
If (("$_".StartsWith("Exception has been thrown")) -and ($Step -eq "4"))
"Excel spreadsheet not found, program aborted"
Add-Content -Path $LogFile -Value "## Excel spreadsheet not found: $ExcelPath"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
If ("$_".StartsWith("The server is not operational"))
"Domain Controller not found, program aborted"
Add-Content -Path $LogFile -Value "## Domain Controller not found"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
If ("$_".StartsWith("The directory service is unavailable"))
"Active Directory not found, program aborted"
Add-Content -Path $LogFile -Value "## Active Directory not found"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
If ("$_".StartsWith("The specified domain"))
"Domain not found, program aborted"
Add-Content -Path $LogFile -Value "## Domain not found"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
"Unexpected error: $_"
Add-Content -Path $LogFile -Value "## Unexpected error: $_"
Add-Content -Path $LogFile -Value " Step: $Step"
Break
Function CleanUp
Trap
"Error during cleanup: $_"
Add-Content -Path $LogFile -Value "## Error during cleanup: $_"
$Script:Errors = $Script:Errors + 1
Continue
# Function to release Excel objects from memory.
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Columns)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Rows)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Range)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Sheet)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Worksheets)} While ($x -gt -1)
$Workbook.Close($False)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbook)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbooks)} While ($x -gt -1)
$Excel.Quit()
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Excel)} While ($x -gt -1)
# Specify paths to spreadsheet and log file.
$Script:Errors = 0
$Step = "1"
$ExcelPath = "c:\scripts\UpdateUsers.xls"
$LogFile = "c:\scripts\UpdateUsers.log"
Write-Host "Please Standby..."
# Add to the log file.
$Step = "2"
Add-Content -Path $LogFile -Value "------------------------------------------------" -ErrorAction Stop
Add-Content -Path $LogFile -Value "UpdateUsers.ps1 Version 1.0 (September 12, 2011)"
Add-Content -Path $LogFile -Value $("Started: " + (Get-Date).ToString())
Add-Content -Path $LogFile -Value "Spreadsheet: $ExcelPath"
Add-Content -Path $LogFile -Value "Log file: $LogFile"
$Step = "3"
# Open specified Excel spreadsheet.
$Excel = New-Object -ComObject "Excel.Application"
$Workbooks = $Excel.Workbooks
$Step = "4"
$Workbook = $Workbooks.Open($ExcelPath)
$Worksheets = $Workbook.Worksheets
$Sheet = $Worksheets.Item(1)
$Range = $Sheet.UsedRange
$Rows = $Range.Rows
$Columns = $Range.Columns
$Step = "5"
# Hash table of attribute syntaxes.
# The LDAP display names will be read from the spreadsheet.
# The corresponding syntaxes will be read from the Schema container.
$Attributes = @{}
# Array of spreadsheet column headings.
$Cols = @()
$Step = "6"
# Read attribute LDAP Display Names from the first row of the spreadsheet.
$ID = 0
For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
# Retrieve column heading, the lDAPDisplayName of an attribute.
$Value = $Sheet.Cells.Item(1, $k).Text
# Keep track of all column headings.
$Cols += $Value
# Skip duplicates in hash table.
If ($Attributes.ContainsKey($Value) -eq $False)
# Default is "NotFound", until found in the AD Schema.
$Attributes.Add($Value, "NotFound")
# Keep track of which column uniquely identifies users.
If ($Value.ToLower() -eq "distinguishedname") {$ID = $k}
If (($Value.ToLower() -eq "samaccountname") -and ($ID -eq 0)) {$ID = $k}
# This script cannot be used to rename users.
If ($value.ToLower() -eq "cn")
Add-Content -Path $LogFile -Value "## This script cannot be used to rename users"
Add-Content -Path $LogFile -Value " Do not specify the cn attribute in the spreadsheet"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
CleanUp
Return "Program aborted: cn attribute found in spreadsheet" `
+ "`nSee log file: $LogFile"
$Step = "7"
If ($ID -eq 0)
Add-Content -Path $LogFile -Value "## No column found to identify users"
Add-Content -Path $LogFile -Value " One column must be distinguishedName or sAMAccountName"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
CleanUp
Return "Program aborted: No column found in spreadsheet to identify users" `
+ "`nSee log file: $LogFile"
# Create filter to query for attributes in the schema.
$Attrs = $Attributes.Keys
$Filter = "(&(objectCategory=AttributeSchema)(|"
ForEach ($Attr In $Attrs)
$Filter = $Filter + "(lDAPDisplayName=$Attr)"
$Filter = $Filter + "))"
$Step = "8"
$RootDSE = [System.DirectoryServices.DirectoryEntry]([ADSI]"LDAP://RootDSE")
$Domain = $RootDSE.Get("defaultNamingContext")
$Schema = $RootDSE.Get("schemaNamingContext")
$Step = "9"
# Use the NameTranslate object.
$objTrans = New-Object -comObject "NameTranslate"
$objNT = $objTrans.GetType()
# Initialize NameTranslate by locating the Global Catalog.
$objNT.InvokeMember("Init", "InvokeMethod", $Null, $objTrans, (3, $Null))
$Step = "10"
# Retrieve NetBIOS name of the current domain.
$objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (1, "$Domain"))
$NetBIOSDomain = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 3)
Add-Content -Path $LogFile -Value "NetBIOS name of domain: $NetBIOSDomain"
$Step = "11"
$Searcher = New-Object System.DirectoryServices.DirectorySearcher
$Searcher.SearchRoot = [ADSI]"LDAP://$Schema"
$Searcher.PageSize = 200
$Searcher.SearchScope = "subtree"
$Searcher.PropertiesToLoad.Add("lDAPDisplayName") > $Null
$Searcher.PropertiesToLoad.Add("attributeSyntax") > $Null
$Searcher.PropertiesToLoad.Add("isSingleValued") > $Null
$Searcher.PropertiesToLoad.Add("systemFlags") > $Null
# Filter on specified attributes.
$Searcher.Filter = $Filter
$Step = "12"
# Query Active Directory.
$Results = $Searcher.FindAll()
# Enumerate recordset.
ForEach ($Result In $Results)
# Retrieve properties of attributes.
$Name = $Result.Properties.Item("lDAPDisplayName")[0]
$SysFlags = $Result.Properties.Item("systemFlags")[0]
$SyntaxNum = $Result.Properties.Item("attributeSyntax")[0]
$SingleValued = $Result.Properties.Item("isSingleValued")[0]
# Only single-valued string attributes supported by this version of the program.
Switch ($SyntaxNum)
"2.5.5.12" {$Syntax = "String"}
Default {$Syntax = "NotSupported"}
If ($Name.ToLower() -eq "distinguishedname") {$Syntax = "DN"}
If (($SysFlags -band 4) -ne 0)
$Attributes[$Name] = "Constructed"
Else
If ($SingleValued -eq $True)
$Attributes[$Name] = $Syntax
Else
$Attributes[$Name] = "NotSupported"
$Step = "13"
# Check if any attributes not found or have unsupported syntax.
$Found = $True
ForEach ($Attr In $Attrs)
$Syntax = $Attributes[$Attr]
If ($Syntax -eq "NotFound")
Add-Content -Path $LogFile -Value "## Attribute $Attr not found in schema"
"Attribute $Attr not found in schema"
$Found = $False
If ($Syntax -eq "NotSupported")
Add-Content -Path $LogFile -Value "## Attribute $Attr has a syntax that is not supported"
"Attribute $Attr has a syntax that is not supported"
$Found = $False
If ($Syntax -eq "Constructed")
Add-Content -Path $LogFile -Value "## Attribute $Attr is operational, so is not supported"
"Attribute $Attr is operational, so is not supported"
$Found = $False
$Step = "14"
If ($Found -eq $False)
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
CleanUp
Return "Program aborted" `
+ "`nSee log file: $LogFile"
# Read remaining rows of the spreadsheet, until the first blank value is found
# in the column that identifies users.
$Step = "15"
$Script:Updated = 0
$Script:Unchanged = 0
$j = 2
Do {
# Retieve ID value for the user first.
$Value = $Sheet.Cells.Item($J, $ID).Text
$Found = $False
$Step = "16"
If ($Cols[$ID - 1] -eq "distinguishedname")
# Any forward slash characters must be escaped.
$DN = $Value.Replace("/", "\/")
# Bind to the user object.
# If user not found, $User.Name will be $Null.
$User = [ADSI]"LDAP://$DN"
If ($User.Name -ne $Null)
$Found = $True
$Step = "17"
If ($Cols[$ID - 1] -eq "samaccountname")
Trap
Write-Host ""
"Error translating name: $_"
Add-Content -Path $LogFile -Value "## Error translating name $Value"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
Continue
# Convert sAMAccountName to distinguishedName.
$DN = ""
$Step = "18"
$objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (3, "$NetBIOSDomain$Value"))
$DN = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 1)
$Step = "19"
If ($DN -ne "")
$Step = "20"
# Any forward slash characters must be escaped.
$DN = $DN.Replace("/", "\/")
# Bind to the user object.
$User = [ADSI]"LDAP://$DN"
$Found = $True
If ($Found -eq $True)
$Step = "21"
# Read remaining values for this user.
$Changed = $False
For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
# Skip the identifying column.
If ($k -ne $ID)
$Step = "22"
# Retrieve attribute name for this column from array.
$AttrName = $Cols[$k - 1]
# Retrieve attribute syntax from hash table.
$Syntax = $Attributes[$AttrName]
$Step = "23"
# Retrieve attribute value for this user.
$Value = $Sheet.Cells.Item($j, $k).Text
# Skip blank values.
If ($Value -ne "")
If ($Syntax -eq "String")
Trap
If ("$_".StartsWith("The directory property cannot be found"))
Continue
Else
Write-Host ""
"Error retrieving value from Active Directory: $_"
Add-Content -Path $LogFile -Value "## Error retrieving $AttrName for user $DN"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
Continue
$Step = "24"
# Single-valued string attribute.
# Retrieve existing value.
$OldValue = ""
$OldValue = $User.Get($AttrName)
# Check if existing value to be deleted.
If ($Value.ToLower() -eq ".delete")
If ($OldValue -ne "")
If ($AttrName.ToLower -eq "samaccountname")
Add-Content -Path $LogFile -Value `
"## Mandatory attribute sAMAccountName cannot be cleared for user: $DN"
$Script:Errors = $Script:Errors + 1
Else
Trap
Write-Host ""
"Error deleting value from Active Directory: $_"
Add-Content -Path $LogFile -Value "## Error deleting $AttrName for user $DN"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
Continue
$Step = "25"
# Make the attribute value "not set".
$User.PutEx(1, $AttrName, 0)
$Changed = $True
Else
$Step = "26"
# Check if new value from spreadsheet different.
If ($Value -ne $OldValue)
Trap
Write-Host ""
"Error assigning value from Active Directory: $_"
Add-Content -Path $LogFile -Value "## Error assigning $AttrName for user $DN"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
Continue
# Assign the new value to the attribute.
$User.Put($AttrName, $Value)
$Changed = $True
Else
# Unexpected error.
Add-Content -Path $LogFile -Value `
"## Unexpected syntax: $Syntax for attribute $AttrName for user $DN"
$Script:Errors = $Script:Errors + 1
If ($Changed -eq $True)
Trap
Write-Host ""
"Error saving to Active Directory: $_"
Add-Content -Path $LogFile -Value "## Error saving to AD for user $DN"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
$Script:Updated = $Script:Updated - 1
Continue
$User.SetInfo()
Add-Content -Path $LogFile -Value "Update user: $DN"
Write-Host "." -NoNewLine
$Script:Updated = $Script:Updated + 1
Else
Add-Content -Path $LogFile -Value "User unchanged: $DN"
Write-Host "." -NoNewLine
$Script:Unchanged = $Script:Unchanged + 1
Else
Add-Content -Path $LogFile -Value "## User not found: $Value"
Write-Host "." -NoNewLine
$Script:Errors = $Script:Errors + 1
$j = $J + 1
} Until ($Sheet.Cells.Item($j, $ID).Text -eq "")
$Step = "27"
CleanUp
Add-Content -Path $LogFile -Value $("Finished: " + (Get-Date).ToString())
Add-Content -Path $LogFile -Value "Number of users updated: $Script:Updated"
Add-Content -Path $LogFile -Value "Number of users unchanged: $Script:Unchanged"
Add-Content -Path $LogFile -Value "Number of errors: $Script:Errors"
Write-Host ""
"Done"
"Number of errors: $Script:Errors"
"See log file: $LogFile"Actually scripts run fine with excel file, currently we are using user-id to pick to update AD. Now we want to update AD use employee id. You can say to identify the record in AD through employee ID instead of user-id.
I do not think you will get anyone here to fix that for you. You need to find someone who knows PowerShell to help you or learn PowerShell your self.
I would fix it for you but not for free. It is too oddly designed and has too many dependencies. Any small change is likely to break it.
¯\_(ツ)_/¯ -
JOB_OPEN - SUBMIT - JOB_CLOSE - User Name for the Job
Hi,
I have a code like that:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_jobname
IMPORTING
jobcount = lv_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
* Call Update PO from Sales Order
SUBMIT zpcc_mm_upo3
WITH p_vbeln = puv_vbeln
USER lc_uname
VIA JOB lv_jobname NUMBER lv_jobcount
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_jobcount
jobname = lv_jobname
strtimmed = lc_true
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
In this code as you see I can run the SUBMIT program with a specified user. But the creator of the job always becomes SY-UNAME. So is there a way to specify the user name for a job creator? I don't want to use SY-UNAME.
Thanks,Hio try this way...
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_jobname
IMPORTING
jobcount = lv_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
"Comment this
* Call Update PO from Sales Order
SUBMIT zpcc_mm_upo3
WITH p_vbeln = puv_vbeln
USER lc_uname
VIA JOB lv_jobname NUMBER lv_jobcount
AND RETURN.
"Comment end
* Call function to submit the job
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = wa_authchknam "Pass the Other User name you want
jobcount = lv_jobcount
jobname = lv_jobname
REPORT = 'zpcc_mm_upo3'
VARIANT = jobs-variant "Create Varaqint
PRIPARAMS = wa_PRI_PARAMS
EXCEPTIONS
BAD_PRIPARAMS = 1
BAD_XPGFLAGS = 2
INVALID_JOBDATA = 3
JOBNAME_MISSING = 4
JOB_NOTEX = 5
JOB_SUBMIT_FAILED = 6
LOCK_FAILED = 7
PROGRAM_MISSING = 8
PROG_ABAP_AND_EXTPG_SET = 9
OTHERS = 10
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_jobcount
jobname = lv_jobname
strtimmed = lc_true
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
Prabhudas -
Run a job via job schedular, got the error message Connection to Agentlost"
Hi,
I have created a job with 60 scripts and trried to run a job via job schedular after executed some scripts i got error message as " Connection to Agent lost". what is the problem here. how to slove the probelm. please help me.
Thanks in Advance.
ra
Edited by: user4502901 on Nov 9, 2009 6:02 AMHi,
Try increasing your machines Virtual Memory and then run the scripts.
Thanks
Edited by: Openscript User 100 on Nov 10, 2009 9:31 PM -
How to run the job under sys id
Hello ,
I wanted to run a job under sys id ( Batch user ) , as my authorisation is not sufficiant to run the repoting agent - Precalculation. Where as Batch user have all the roles for the same .
I am in my login screen , and i wanted to run the job under batch user id ...could you please let me know how can i do it ?
Regards,
ManojHi,
Try to schedule the job in background and see.
Thanks,
JituK -
Object failed to run due to an error while processing on the Job Server
when i am scheduling a report ith email notification i am getting below error
error msg: Object failed to run due to an error while processing on the Job Server
i have configured email notification in bo cmc and server also SMTP enabled. while scheduling report to ueser i am getting error and even mails are delivered to users as well.hi prithvi,
i am able to schedule reports to other destinations and reports are delivered as per the requirement.
i am able to telnet SMTP server from Adaptive job server machine on SMTP port.
have to check errors on log file....
@ COULD YOU PLEASE LET ME KNOW USER CAN SEND A MAIL TO USER IN SAME DOMAIN . WHILE SCHEDULING A REPORT AND AS OPTION AVAILABLE IN 4.0 LAUNCH PAD CAN HE SEND A MAIL DIRECTLY AFTER RUNNING REPORT. -
Where is the account to execute ssis in file system when run a job
Hi
I have a ssis package in file system, and create a job, in general... the section package:... select "File System".
but it thrown: access denegate: the user should be administrator..
what is the account or where is it, that use to run the job in agent, this is owner of the job?
this is my configuration..
http://blog.sqlauthority.com/2011/05/23/sql-server-running-ssis-package-in-scheduled-job/By default it would be the service account which SQLAgent uses
You can see this from services properties
for that go to start-> run
type services .msc
In local services window right click SQL Agent Service and check the properties and in LogOn tab you will see the account configured for it
Most cases it would be network service account and in some cases local system account (if not in a domain)
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Running an SQL Server Agent Job to execute a package but the job FAILS on Connections
I have created a package which basically imports data from one database to another, The database where it collects the data from the job is failing on connecting reporting the following message:
Source: ****** Connection manager "Source - *****" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft
OLE DB Provider for SQL Server" Hresult: 0x80040E4D Description: "Login failed for user '*ConnectionONE*'.". End Error Error: 2015-02-18 11:36:04.94 Code: 0xC020801C
Source: Data Flow Task Get Revenue Data [1] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Source - *****" failed with error
code 0xC0202009.
The package runs fine if executed within the package but fails from the SQL Agent Job.
NB * is to hide confidential data. *ConnectionONE* is the database which the package is attempting to get data from.
Completely puzzled on what to do as i have tried reading other forumns but they dont seem to be helping.
Any Help would be great thankyou!That is because package is set to "EncryptSensitiveWithUserKey". Please change that to "EncryptSensitiveWithPassword" and the provide password to protect sensitive data.
More information
here.
Regards,
Vishal Patel
Blog: http://vspatel.co.uk
Site: http://lehrity.com -
Hi guys,
we have a batch job for
1. creating invoice
2. and printing invoices.
How do i identify the background job being used for the above two.
REgards,
AnandHow do i identify the background job being used for the above two.
1. creating invoice
In t.code VF02/VF03, go to the header level. Here you can see the created by field. This carries background billing job user name (for example SDBATCH).
2. and printing invoices.
In VF02/VF03, go to menu Goto->header->outupt. Highlight the output and click on the further data button. Here you can see created by at the botton(for example batch billing). By this way, you can identify, these are created by background jobs.
Regards, -
How to run the job using DBMS_SCHEDULER
How to run the job using DBMS_SCHEDULER
pleas give some sample Iam very new to DBMS_SCHEDULERHi
DBMS_SCHEDULER
In Oracle 10g the DBMS_JOB package is replaced by the DBMS_SCHEDULER package. The DBMS_JOB package is now depricated and in Oracle 10g it's only provided for backward compatibility. From Oracle 10g the DBMS_JOB package should not be used any more, because is could not exist in a future version of Oracle.
With DBMS_SCHEDULER Oracle procedures and functions can be executed. Also binary and shell-scripts can be scheduled.
Rights
If you have DBA rights you can do all the scheduling. For administering job scheduling you need the privileges belonging to the SCHEDULER_ADMIN role. To create and run jobs in your own schedule you need the 'CREATE JOB' privilege.
With DBMS_JOB you needed to set an initialization parameter to start a job coordinator background process. With Oracle 10g DBMS_SCHEDULER this is not needed any more.
If you want to user resource plans and/or consumer groups you need to set a system parameter:
ALTER SYSTEM SET RESOURCE_LIMIT = TRUE;
Baisc Parts: Job
A job instructs the scheduler to run a specific program at a specific time on a specific date.
Programs
A program contains the code (or reference to the code ) that needs to be run to accomplish a task. It also contains parameters that should be passed to the program at runtime. And it?s an independent object that can referenced by many jobs
Schedules
A schedule contains a start date, an optional end date, and repeat interval with these elements; an execution schedule can be calculated.
Windows
A window identifies a recurring block of time during which a specific resource plan should be enabled to govern resource allocation for the database.
Job groups
A job group is a logical method of classifying jobs with similar characteristics.
Window groups
A window groups is a logical method of grouping windows. They simplify the management of windows by allowing the members of the group to be manipulated as one object. Unlike job groups, window groups don?t set default characteristics for windows that belong to the group.
Using Job Scheduler
SQL> drop table emp;
SQL> Create table emp (eno int, esal int);
SQL > begin
dbms_scheduler.create_job (
job_name => 'test_abc',
job_type => 'PLSQL_BLOCK',
job_action => 'update emp set esal=esal*10 ;',
start_date => SYSDATE,
repeat_interval => 'FREQ=DAILY; INTERVAL=10',
comments => 'Iam tesing scheduler');
end;
PL/SQL procedure successfully completed.
Verification
To verify that job was created, the DBA | ALL | USER_SCHEDULER_JOBS view can be queried.
SQL> select job_name,enabled,run_count from user_scheduler_jobs;
JOB_NAME ENABL RUN_COUNT
TEST_abc FALSE 0
Note :
As you can see from the results, the job was indeed created, but is not enabled because the ENABLE attribute was not explicitly set in the CREATE_JOB procedure.
Run your job
SQL> begin
2 dbms_scheduler.run_job('TEST_abc',TRUE);
3* end;
SQL> /
PL/SQL procedure successfully completed.
SQL> select job_name,enabled,run_count from user_scheduler_jobs;
JOB_NAME ENABL RUN_COUNT
TEST_ABC FALSE 0
Copying Jobs
SQL> begin
2 dbms_scheduler.copy_job('TEST_ABC','NEW_TEST_ABC');
3 END;
4 /
PL/SQL procedure successfully completed. Hope it will help you upto some level..!!
Regards
K -
Intermittently my SSIS Packages which are run through the JOB are failing
Hi SSIS Guru's,
I am facing a very strange problem.
We have 2 Physical Servers (A and B) on which we have installed the SQL Server, one primary (A) and other as secondary (B). And there is a cluster (C) available to acces the running server. I have created some SSIS packages which we installed on the Server A (Primary), and created the job on the cluster server which initiates the SSIS packages, whcih are installed in the File System.
The problem i am facing is the some thing related to Connection time out. And interestingly i am not getting this error Always. Approxiamtely For Every 5 Times once it;s Failing. I am copying the errors Which i encountered in the different runs.
The thing i am confused is why i am not geting the error all the time? And Why am i getting this error all the time in a different data flow task. My SSIS Package structure is I have created one master package and 6 Child packages. I am getting the connection string for the Data base from the Configuration file which is defined in the XML File.
The connection string that i am using is
Data Source=<<server name>>;User ID=DOMAIN\user;Initial Catalog=DatabaseName;Provider=SQLNCLI.1;Integrated Security=SSPI;
RUN 1 - Error
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights
reserved. Started: 2:00:07 PM Error: 2007-09-15 14:02:35.92 Code: 0xC0202009 Source: ssis_emp Connection manager
"DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An
OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable to complete
login process due to delay in opening server connection". End Error Error: 2007-09-15 14:02:35.92 Code: 0xC020801C
Source: infr_char Get the Records from emp 1 [72] Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager
"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on
why the AcquireConnection method... The package execution fa... The step failed.
RUN 2 - Error
Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights
reserved. Started: 9:15:01 AM Error: 2007-09-15 09:17:01.64 Code: 0xC0202009 Source: ssis_emp Connection manager
"DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An
OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable to complete
login process due to delay in opening server connection". End Error Error: 2007-09-15 09:17:01.64 Code: 0xC020801C
Source: Data Flow Task Get the Records from emp [473] Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager
"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on
why the AcquireConnection me... The package execution fa... The step failed.
Run -3 Error
Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights
reserved. Started: 11:30:01 PM Error: 2007-09-14 23:32:21.28 Code: 0xC0202009 Source: ssis_dept Connection
manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code:
0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable
to complete login process due to delay in opening server connection". End Error Error: 2007-09-14 23:32:21.28 Code:
0xC020801C Source: Data Flow Task Get the Records from dept [632] Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager
"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on
why the AcquireConnection method ... The package execution fa... The step failed.
Run - 4 Error
Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights
reserved. Started: 11:00:02 PM Error: 2007-09-14 23:02:21.46 Code: 0xC0202009 Source: ssis_emp Connection
manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code:
0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable
to complete login process due to delay in opening server connection". End Error Error: 2007-09-14 23:02:21.46 Code:
0xC020801C Source: infr_itm_char_val Get the Records from emp_master [1] Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager
"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on
why the AcquireCon... The package execution fa... The step failed.
Run -5 Error
Message
Executed as user: AMR\sys_calyp. ...Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp
1984-2005. All rights reserved. Started: 9:10:59 PM Error: 2007-09-14 21:12:23.25 Code: 0xC0202009 Source:
ssis_salgrade Connection manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.
Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005
Description: "Unable to complete login process due to delay in opening server connection". End Error Error: 2007-09-14
21:12:23.25 Code: 0xC020801C Source: Data Flow Task - ssis_salgrade get salgrade [3227] Description: SSIS Error
Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager
"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on
why the AcquireConnection method c. The step failed.I thought i found the solution my self... I changed the delay validation to all the packages to true and the problem dissappeared
Maybe you are looking for
-
Why did all my apps update when I have automatic updates turned off?
Settings/iTunes & App Stores/Automatic Downloads Music Apps Documents I have them all turned OFF so that I can manually update my apps when I choose to. Yesterday there were 11 updates left after I had finished updating the apps I use most often. Tod
-
IDVD5 freezes during disc image creation
iDVD(5.0.1) freezes at the "writing" stage of disc image creation. Video is imported to iMovie. I then make a 58 minute movie which I move to iDVD. After modifying the original iDVD file created by iMovie I "save as">new file name in another location
-
Wrong PO number displaying in check printing (FBZ5)
Dear all, In FBZ5, check printing, we are getting the wrong PO no in the check. Remaining all document nos and amount is displaying correctly. With reference to the PO we are created the invoice receipt and saved perfectly. But in check printing it i
-
Create NRDM structure in dataservices
Hi Experts, I am trying to create a NRDM structure in datasevices, to generate an XML file with tag and its attributes as per the below example. I am creating NRDM structure from a file as per below dig. This structure is giving the following XML out
-
Old camcorder--DV Passthrough--No Onestep!
I have an old camcorder and would like to convert my videos to DVD. However when I use DV passthrough (using my Canon ZR200) It won't get past the insert a DVD....blah blah blah. I was thinking about just buying Pinnacle Moviebox. Would this solve th