How can I know the relation of Scheduled Jobs and DTS - sql-server-2000

I am using SQL Server 2000. How can I know which DTS has scheduled and the scheduled jobs is pointed to which DTS easily?

I am using SQL Server 2000. How can I know which DTS has scheduled and the scheduled jobs is pointed to which DTS easily?
That's not supported.
However, you can see scheduled linked and the jobs from DTS isn't scheduled in which database that are stored with. When R:Base stores permanently if it's rescheduled (with SP3), but might require administrative rights. So try that.

Related

what to setup in SQL profiler to investigate SSAS Cube synchronization job hang?

I am using SSIS job to process the ssas DB(cube, dim, partition etc) in source server and XMLA script in the same SSIS package to synchronize the SSAS DB from source server to destination server. This SSIS job is deployed and get initiated daily on source server.
This was running fine since years, but recently SSAS DB Synchronization is getting hang and not stopping/completing even after 3-4 hours. Generally it takes 30 minutes to complete. then I need to kill the job and manually sync the SSAS DB using synchronization wizard at destination server.
any way to figure out the real problem? what events to setup in SQL profiler to catch this issue while ssas db sync? or any other way?Also SQL Profiler should be run against source server or destination server?
Please help/guide/suggest. Thanks

Schedule/Edit Maintenance Tasks for SQL Express (No Maintenance Plan Wizard)

I am using SQL Server 11.0.6251 Express (SQL Server 2012 Express). I have some software that logs data to the database continuously. However, there are some maintenance tasks that are performed on the database every so often. Whenever this happens, there are some data points that don't get logged.
I want to reschedule and configure these maintenance tasks so that I can recreate the problem and troubleshoot the software so that I don't lose any more data points.
I am aware that an easy way to do this is to just upgrade SQL Server so that I have the maintenance plan wizard and SQL Server agent. I just want to see if any of you SQL gurus out there know a way around this problem!
I've also looked into how scripts and using the Windows Task Scheduler can help create maintenance plans, but I'm not sure how to use that to edit existing maintenance tasks.
Is there any way to edit and re-schedule current Maintenance Tasks for SQL Server Express?

How can I schedule a SQL job in Microsoft Azure SQL Database?

I have one SQL Agent maintenance job which checks the index fragmentation within a database and rebuilds indexes if required.
This is running well in my test server (Microsoft Sql Server 2012). But my production server is in Azure. Now I want to schedule that job to Azure.
SQL Agent does not exist in Azure SQL Database so how can I schedule a SQL job in Azure DB?
Since this question was first asked, there is now another alternative to handle this problem:
Azure Functions
Here are a couple of examples that could easily be modified to call a stored procedure that rebuilds your indexes
Create a function in Azure that is triggered by a timer
Use Azure Functions to connect to an Azure SQL Database
Also see
How to maintain Azure SQL Indexes and Statistics - this page has an example stored procedure for rebuilding your indexes that you can download.
Reorganize and Rebuild Indexes
A few things to keep in mind with Azure functions
They are built on top of Azure Web Jobs SDK and offer additional functionality
There are two different pricing models:
App Service plan (attach it to an existing plan)
Predictable cost model
It puts extra load on the same VM used by your web site
Consumption plan
You get some free processing every month
The default maximum run time is 5 minutes to prevent billing problems, but it can be changed via the host.json file.
Edit September 5, 2021 to add additional information
It should be noted that if you need SQL Agent, you have another option now. I would suggest reading up on Azure SQL Managed Instances. You can see a comparison of Azure SQL to Azure SQL Managed instance here in the Microsoft Documentation. With Azure SQL Managed Instances, your transition to the cloud could be a lot simpler since a lot of the on-premise features you are used to are already there (including SQL Server Agent, DB Mail, etc.).
This feature has been rejected by Microsoft (link no longer available).
To quote their response:
Today in Azure there are several alternatives,
SQL Database Elastic Jobs
https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-jobs-overview
The Azure job scheduler
http://www.windowsazure.com/en-us/services/scheduler/
The new
preview of Azure Automation
http://azure.microsoft.com/en-us/services/automation/.
SQL Server
in a VM
Option 1 requires an additional dedicated cloud service, which increases cost. Option 2 is free (I think) as long as you don't run more than once per hour.
Azure SQL does not support sql jobs. From documentation:
Microsoft Azure SQL Database does not support SQL Server Agent or
jobs. You can, however, run SQL Server Agent on your on-premise SQL
Server and connect to Microsoft Azure SQL Database.
WebJobs: If you have a website you can create webjob and run it on schedule. See more here
Other alternatives - Scheduling job on SQL Azure
Another option is rovergo, a service that allows you to schedule sql jobs with a cron expression. This is nice because you don't have to create a web job or azure function. You can simply schedule a sql script.
(I'm a developer on rovergo)
You can use Azure automation to schedule jobs on an Azure-DB like the on premise SQL Agent.
See https://azure.microsoft.com/nl-nl/blog/azure-automation-your-sql-agent-in-the-cloud/ for more information.
Available for a couple of years now, Elastic Jobs for azure db...
docs:
https://learn.microsoft.com/en-us/azure/azure-sql/database/job-automation-overview?view=azuresql
tutorial:
https://www.youtube.com/watch?v=JIMgqkXZFOQ
Currently seems to use the 2017 version of the sqlagent sp (or a close approximation), but elastic links are now already pointing to SQL2022 preview which contains a newer version of the agent sps

Best way to sync SQL 2000 and 2005 databases

I have a production database in SQL 2000 and a SQL 2005 instance will be installed in a new server. I would like to have an updated copy of one SQL 2000 database in my SQL 2005 at anytime.
What is the best way to implement database sync between this two SQL versions?
You can create an SSIS package to do this and schedule it as a job.
Or if this is development machine that you want to keep you can do all the development on the 2005 database in scripts kept in source control (which is of course what you should be doing), then you take the most recent backup, restore it to the database and run any change scripts you need.
Or use Red_gate's SQL data compare. It costs money but its worth it.
if "anytime" means you need the data to be updated as soon as it changes, i would think about triggering the tables on the 2000 server to mirror the operation on the 2005 server.
or, a DTS on the 2000 server might do the job, but i have no experience with those (they are also deprecated if i'm not mistaken).
or, some scheduled jobs might keep data in sync between the servers (but they'll be out of sync until the next job run)
hope this helps, myself i'd go with triggering since it's a "set and forget" approach.

SQL 2008 R2 - Time-Based Triggers?

Is it possible to have a stored procedure or set of SQL code run periodically by specifying a time-based trigger in SQL Server?
Not directly, but look at SQL Jobs.
A job is a specified series of operations performed sequentially by SQL Server Agent. A job can perform a wide range of activities, including running Transact-SQL scripts, command-line applications, Microsoft ActiveX scripts, Integration Services packages, Analysis Services commands and queries, or Replication tasks. Jobs can run repetitive tasks or those that can be scheduled, and they can automatically notify users of job status by generating alerts, thereby greatly simplifying SQL Server administration.
(emphasis mine)
You can use a SQL Agent job. IF you have a requirement to run on Express editions, that lack SQL Agent, you can use dialog timers and activation.
You can use a SQL job to run any SQL on a schedule. If you are needing to do something a little more dynamic you can control the jobs (creation, scheduling, removing etc) from SQL itself. This provides an immense amount of flexibility.
Some more info on controlling jobs with TSQL here.