Finding script associated with Oracle Backup Job - database

I am using Oracle Enterprise Manager to view the database jobs scheduled to run. When I look at the task associated with that job, all I see is "Run OS Command". How do I find out what script is being run for the job?

Try looking at the job definition in the Job Library and the parameters tab in the job.

Related

How to start SQL Server Agent etl job after complete Oracle process

I have Oracle source and SQL Server. Every day at 12.00 AM Oracle data populate for oracle database tables, after that sql server agent jobs run manually by me after Oracle Data Extraction completed. for SQL Server databases, I want to automate this process. when oracle data population completed i need to run sql server agent jobs automatically, how can i do this.
You write a little program that will monitor the oracle process and when it "sees" that is has completed (probably successfully - you skipped that part) it starts the sql server job. Now - how do you do that? How do you know that the process both completed and successfully? Go figure it out based on what functionality Oracle offers and (perhaps) the characteristics of the output that signify success.
Perhaps you can vastly simplify things and schedule some sort of "do it" job that will look for "good" output. Schedule it for a time that is more than sufficient for the oracle process to complete. Do some checking and if things look good, start the other job.

what is the difference between SQL Job and Windows Task Scheduler?

what is the difference between SQL Job and Windows Task Scheduler ?
AS I can add SQL Queries in both sides ... what is the difference ??
SQLJobs operate in the context of SQLServer Agent which is a part of SQLServer,Scheduling something related to SQLServer like running a query ,maintenance tasks through SQLserver jobs is very easy..
Whereas task scheduler comes with operating system and you can also schedule tasks,but very difficult to schedule any thing related to sql server,since you have to take care of authentication and many factors
Job is basic increment any work flow and task is specific steps to complete the job, we can say job is Forrest and tree is task. and you can set job without task but not possible to set up task without job.

Schedule a stored procedure to run periodically?

I need to run a task to update a table, periodically, using a stored procedure. Could you let me know if it is possible to schedule periodic tasks and to run any system command within stored procedure?
You can use SQL Server Agent to create jobs that run at regularly-scheduled intervals. One of the job step types is executing a stored procedure.
I use a 3rd party tool for my schedules. To be honest, it's not a great deal better than Sql Server Agent, but there are few perks to it. It's called
System Scheduler.

SQL Server: should I use an "Agent Job" or a "Maintenance Plan" to delete old data?

I'm looking for a way to periodically (e.g. weekly) run some SQL statements in a database to delete old data. As far as I can see, there are (at least) two ways to do this:
using a "Maintenance Plan" and a "Execute T-SQL Statement Task"
using an "SQL Server Agent Job" and specify the statements in a "Step" of that job
My question is: what is the difference between these two possibilities and which one should I use for my task?
It's not really an either/or choice; there's some overlap.
Think of a Maintenance Plan as a collection of steps to "do something" to your databases; those steps are encapsulated into a plan which needs to be scheduled to run.
The SQL Server Agent is the service that periodically runs jobs; a job is anything that is scheduled to run. A Maintenance Plan is a job.
When you schedule a Maintenance Plan to run, you are actually creating a job (or jobs; thanks DJ) for the SQL Server Agent to run periodically.
Now, as to choosing which way is best (to go through the Maintenance Plan wizard or directly through the Agent), I would say that for most databases, the Maintenance Plan Wizard is suffecient. You may want to add additional steps to the job(s) created by the Maintenance Plan, but that depends on your environment.
Does that make sense?

Determine if a specific Windows application is running using SQL Server 2005

I need to determine if a specific application is running from a SQL Server 2005 job. The issue is that one of our applications we use to send data will hang, causing problems with any subsequent jobs that invokes it. If I can also obtain the CPU time, I can determine if it's likely a hung process.
A list of running applications would be good, but being able to lookup a specific executable name with the CPU time would be fantastic!
Any application launched by a job step will show as being run by the same logon account as the SQL Server Agent. Use a specific service account for the SQL Server Agent that won't be used for any other services. This willallow you to monitor the applications launched from by a job using Task Manager, Performance Monitor, etc.
Try opening the SQL Server Activity Monitor. You can also get some of the information from the stored proc sp_who2.
Have the job run an external script (batch file, KSH script) instead of a TSQL script.
I think the best approach is to run SQL Server Profiler as well as performance monitor and wait for the specified job to run. Then import the perfmon stats into profiler. You can do this from SQL Server profiler by going to File–> Import Performance Data… and point it to your Performance Monitor logs.
You should be able to choose the Process(all) counter to give you a list of all running processes, as well as getting CPU time for the processes. You can then correlate this to the application name and/or hostname from the Profiler logs to see whats going on.
I use the (free) replacement to task manager "Process Explorer" to get a better look at exe's and their dependencies.
Might be worth monitoring your issue with this.
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Resources