Oracle table -Find the job in scheduler - sql

I have a table in oracle which is filled with data from an excel sheet on daily basis. I heard from a colleague that some job in the oracle scheduler has been running dail to update the table. Is there any way to find the exact job?
Thanks in advance

What you can do is to get a list of all scheduled jobs in Oracle using the below query. After that, you would have to check the jobs individually to figure out which job is updating your table.
SELECT *
FROM DBA_SCHEDULER_JOBS;

Related

How to config a schedule query after another schedule has completed in BigQuery

I have 3 tables: A B and C. I scheduled a daily query on A with results appended to B. And I wanna scheduled another daily query on B, the query should run after the previous one had completed. How can I do it? The Big Query can only schedule query at Fix Time.
When the first query has finished, the second query should be trigger and run.
Bigquery is a data warehouse and does not support triggers unfortunately.
I have not used this as just leave 30 mins between scheduled queries but Google cloud appears to offer a solution
https://cloud.google.com/blog/topics/developers-practitioners/how-trigger-cloud-run-actions-bigquery-events

Run a Big Query Schedule everytime a table is updated

So I have this schedule that gets data from some tables and aggregate then into a single table, that I use as a source in a data studio dash, one of these tables (table 1), is updated daily, sometimes more than once, I wanted to know if there is a way to automatically run the schedule every time this table (table1) is updated.
Unfortunately, BigQuery scheduled queries need the parameters of run_time and run_date, so if you want this to be only with BigQuery, you can schedule multiple queries at different times.
Additionally, using a trigger in BigQuery is not possible because this is unsupported.
I recommend you to use a Cloud Run Action that gets the event after any Insert and this creates an event Trigger, so this could do what you are looking for, but without any scheduled queries.

What is the most efficient way to refresh a table in SQL Server having 15M records from Oracle on daily basis?

I am using a LinkedServer in SQL 2012 and refreshing a table from Oracle 9G using below procedure on daily basis. The current records in the table is 15M and it is increasing every day by 2-3K new records and the old records are also deleting and updating randomly. It takes 7-8 hours to complete this job overnight.Considering the table is already optimized on index level at Oracle side, What can be the most efficient way to attempt this?
My current process is below :
Truncate table SQLTable
Select * into SQLTable from openquery (LinkedServerName,'Select * from OracleTable')
It doesn't make sense to truncate 15M rows just for 3000-8000 rows changes.
I would consider using an ETL tool like https://sourceforge.net/projects/pentaho/. You can start with a free community edition.
This tool provides a Spoon tool that basically provides graphical interface to create a workflow. With the Pan tool you can execute the file you create using spoon tool. Basically create a batch file with Pan command and provide .ktr file as an argument. Now, this batch file you can schedule using windows task manager or Unix CRON Job.
With this, you can create a workflow, which can look for changes and only insert or update changes.

SQL Periodic table updates

Good Morning all
I wish to create a table which essentially acts like a view but only updates once a week. Not sure how to start this process...looking at scheduled tasks.
I was thinking essentially it would be a clearing function which clears the table at the start of the week and re-runs the initial SQL command to populate...But unsure and need some advice please.
The reason I am looking at doing a table rather than a view is so I can set up periodically to update tables to create / show trends analysis over time
Thanks in advance
You may also look at using SSIS package and then schedule this as a task

Move data from one table to another every night SQL server

I have this scenario i have a staging table that contains all the record imported from a XML file .Now i want to move this data based on verification like if the record is already in the other table update the record other wise insert the new record. i want to create a job or scheduler in SQL Server that do this for me every night without using any SSIS packages.
Have you tried using the MERGE statement?
SSIS really is an easy way to go with something like this, but if necessary, you can set up a a SQL server agent job. Take a look at this MSDN Article. Basically, write your validation code in a stored procedure, then create a job with a TSQL job step which calls that stored procedure.