Execute Stored procedure automatically daily? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Execute Stored procedure automatically daily?

Hi,
How the stored procedure can be executed automatically on daily basis??
Thanks in advance..
Have a look at Jobs in Books Online- You can set up a job to execute any tSQL code <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ /><br /><br />’I reject your reality and substitute my own’ – Adam Savage
YES JOB is the better option
you can call the sp from the job and then schedule the job as you like —————————————-
http://spaces.msn.com/members/dineshasanka

I think, we can use Windows Scheduler.
This will be better option if you are not using agent running in the server. I use this in 2 of my servers, where I didn’t start my agent, coz it consume my resources. -Johnson
How can you use windows scheduler in this regard and for any scheduling option in SQL SErver SQL Agent is one only best point to handle the process. If the SQLAgent is consuming resources then you must look at the process defined in the jobs, we have many jobs running day-to-day process and never had any issues with SQLAgent. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
What i have done is, 1) Created one Package (which have to use in my job)
2) use the package in dtsfun
3) Put this in a batch file
4) Use the Windows Scheduler (Scheduled Tasks in System Tools) and specify the batch (.bat) file in the Run , and shcedule this tasks according to the time. I hope I have explained the way I did. Secondly, I monitored that, this task is not using the resource as much as SQL Agent is using. But this is solved my purpose without allocating memory for SQL Agent. Please correct me if I am wrong.
John
The steps you’ve defined are clear, no doubt on them.
BTW what is the available memory on Server and how much allocated to SQL SErver?
What kind of memory usage and CPU usage you get when the job runs from SQLAgent? If you’re interested we can proceed further to fine tune the proces from SQLAgent or if you’re happy with current setup then it is upto you… leave it as it is. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Satya, I am Very keen to tune that.. My config on the server is, IBM Netfinity 7100, 4 Processor , 4 GB RAM. My database size is 190 GB (Growing 3-4 GB in a month )configured in RAID 10 for all (DATA, LOG and Index). 2 GB (default )is allocated for SQL, and rest is for OS and JD Edwards (JD Edwards, is in 2 tier architecture model, so no hope to keep it in other server allocate seperate resources). So rest of the 2GB RAM is used by OS and JDE. Coz of this issue, JDE is also using resources with its jobs. So the memory is constrain now, but it will be sort out in sometime coz got budget for new high end servers. Can you tell how we tune the Agent with min utilization… Anyway I can not do it immediatly, coz we have to get the approval from Management, but I can try in test environment definitly. -Johnson

As a test can you collect PERFMON stats and run server side trace to capture the events.
BTW what is exact process that DTS package is handling? Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Actually, that processes is dumping the data from my production server into our cognos server for data modeling (cubes creation) So daily this Scheduled tasks will file from 1 AM onwards, there are 20+ tasks which is pre-scheduled for daily. We have done the PERFMON earlier, anyway let me do once again -Johnson
Then you need monitoring tools from COGNOS side as well, it may be contributing this CPU usage during the process. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
yes Satya, you ar true.. I am aware that, Cognos is consuming huge resource while its populating the cube, but want to monitor, is there anything while dumping the data and its segrigation.. Satya, I think this I will put in our forum when I do the hands on once I get approval.. need to do some prior activity related to that. But surly, I will bother you sir!! thanks in advance
-Johnson
No problem any time you’re welcome, so that time lets start with a new post. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
yes satya, thats the reason, I thought to stop this, coz this thread is started with something else. Satya, can you past any info/link which related SQL Server Audit ( I want to audit one SQL server environment for its Sequirty/tuning etc. I may get some task like that)
-Johnson
http://www.databasejournal.com/features/mssql/article.php/2243271
http://www.sql-server-performance.com/rd_auditing1.asp .. recently I’ve posted some other links as well that is related to similar topic. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Thanks Satya, this will be a good lead to me to go through.. I need more, but I will find my own.. the lead itself is valuable.. -Johnson
]]>