Showing posts with label tasks. Show all posts
Showing posts with label tasks. Show all posts

Sunday, March 25, 2012

Advice Needed

I need to set up a table to define times when tasks will run. It needs to
allow for multiple times per day and if the task should run on the wends.
Once the task has run once for the specified service window for that time of
day I need to prevent the task from running again. I do not have a lot of
SQL experience and was wondering the best way to set up the table structure
might be. Any thoughts, examples or links would be greatly appreciated.
Thank you.>> I need to set up a table to define times when tasks will run. It needs t
o allow for multiple times per day and if the task should run on the wend
s. <<
CREATE TABLE TaskSchedule
(task_name CHAR(20) NOT NULL,
task_time DATETIME NOT NULL,
PRIMARY KEY (task_name, task_time),
.);
Just fill in the schedule for each task.
Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
events. What were you thinking about doing? We do not compute things
in SQL; we put them in tables and do joins.|||I'm wondering why you need a table. If the tasks are SQL Scripts, then just
run a scheduled DTS job or Store Procedure. You can create jobs to run at
the specific times and they would only run once. Plus you can have failure
emails if the job fails and will contact you.
"--CELKO--" wrote:

> CREATE TABLE TaskSchedule
> (task_name CHAR(20) NOT NULL,
> task_time DATETIME NOT NULL,
> PRIMARY KEY (task_name, task_time),
> ..);
> Just fill in the schedule for each task.
>
> Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
> events. What were you thinking about doing? We do not compute things
> in SQL; we put them in tables and do joins.
>|||Not sure myself becuase of my limited experience. I do know that I need the
ability to have my sproc run more then once in a day, possibly different
times on different days, and the ability to skip wends. Can I do all
this using a scheduled DTS job or sproc? Thank you.
"Darren" <Darren@.discussions.microsoft.com> wrote in message
news:9AE28789-D43D-422F-B185-D682C5BF289A@.microsoft.com...
> I'm wondering why you need a table. If the tasks are SQL Scripts, then
> just
> run a scheduled DTS job or Store Procedure. You can create jobs to run at
> the specific times and they would only run once. Plus you can have
> failure
> emails if the job fails and will contact you.
> "--CELKO--" wrote:
>|||Yes you can run the job except for the wends. In Enterprise Manager, go
to the Managment Folder, Expand SQL Server Agent, and you will see the jobs
section. Create a new job and in the Schedules tab create a new schedule an
d
you will see the options you can do. Good luck.
Darren
"Code Boy" wrote:

> Not sure myself becuase of my limited experience. I do know that I need t
he
> ability to have my sproc run more then once in a day, possibly different
> times on different days, and the ability to skip wends. Can I do all
> this using a scheduled DTS job or sproc? Thank you.
>
> "Darren" <Darren@.discussions.microsoft.com> wrote in message
> news:9AE28789-D43D-422F-B185-D682C5BF289A@.microsoft.com...
>
>sql

Advice Needed

I need to set up a table to define times when tasks will run. It needs to
allow for multiple times per day and if the task should run on the weekends.
Once the task has run once for the specified service window for that time of
day I need to prevent the task from running again. I do not have a lot of
SQL experience and was wondering the best way to set up the table structure
might be. Any thoughts, examples or links would be greatly appreciated.
Thank you.
>> I need to set up a table to define times when tasks will run. It needs to allow for multiple times per day and if the task should run on the weekends. <<
CREATE TABLE TaskSchedule
(task_name CHAR(20) NOT NULL,
task_time DATETIME NOT NULL,
PRIMARY KEY (task_name, task_time),
..);
Just fill in the schedule for each task.
[vbcol=seagreen]
Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
events. What were you thinking about doing? We do not compute things
in SQL; we put them in tables and do joins.
|||I'm wondering why you need a table. If the tasks are SQL Scripts, then just
run a scheduled DTS job or Store Procedure. You can create jobs to run at
the specific times and they would only run once. Plus you can have failure
emails if the job fails and will contact you.
"--CELKO--" wrote:

> CREATE TABLE TaskSchedule
> (task_name CHAR(20) NOT NULL,
> task_time DATETIME NOT NULL,
> PRIMARY KEY (task_name, task_time),
> ..);
> Just fill in the schedule for each task.
>
> Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
> events. What were you thinking about doing? We do not compute things
> in SQL; we put them in tables and do joins.
>
|||Not sure myself becuase of my limited experience. I do know that I need the
ability to have my sproc run more then once in a day, possibly different
times on different days, and the ability to skip weekends. Can I do all
this using a scheduled DTS job or sproc? Thank you.
"Darren" <Darren@.discussions.microsoft.com> wrote in message
news:9AE28789-D43D-422F-B185-D682C5BF289A@.microsoft.com...[vbcol=seagreen]
> I'm wondering why you need a table. If the tasks are SQL Scripts, then
> just
> run a scheduled DTS job or Store Procedure. You can create jobs to run at
> the specific times and they would only run once. Plus you can have
> failure
> emails if the job fails and will contact you.
> "--CELKO--" wrote:
|||Yes you can run the job except for the weekends. In Enterprise Manager, go
to the Managment Folder, Expand SQL Server Agent, and you will see the jobs
section. Create a new job and in the Schedules tab create a new schedule and
you will see the options you can do. Good luck.
Darren
"Code Boy" wrote:

> Not sure myself becuase of my limited experience. I do know that I need the
> ability to have my sproc run more then once in a day, possibly different
> times on different days, and the ability to skip weekends. Can I do all
> this using a scheduled DTS job or sproc? Thank you.
>
> "Darren" <Darren@.discussions.microsoft.com> wrote in message
> news:9AE28789-D43D-422F-B185-D682C5BF289A@.microsoft.com...
>
>

Advice Needed

I need to set up a table to define times when tasks will run. It needs to
allow for multiple times per day and if the task should run on the weekends.
Once the task has run once for the specified service window for that time of
day I need to prevent the task from running again. I do not have a lot of
SQL experience and was wondering the best way to set up the table structure
might be. Any thoughts, examples or links would be greatly appreciated.
Thank you.>> I need to set up a table to define times when tasks will run. It needs t
o allow for multiple times per day and if the task should run on the weekend
s. <<
CREATE TABLE TaskSchedule
(task_name CHAR(20) NOT NULL,
task_time DATETIME NOT NULL,
PRIMARY KEY (task_name, task_time),
.);
Just fill in the schedule for each task.
[vbcol=seagreen]
Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
events. What were you thinking about doing? We do not compute things
in SQL; we put them in tables and do joins.|||I'm wondering why you need a table. If the tasks are SQL Scripts, then just
run a scheduled DTS job or Store Procedure. You can create jobs to run at
the specific times and they would only run once. Plus you can have failure
emails if the job fails and will contact you.
"--CELKO--" wrote:

> CREATE TABLE TaskSchedule
> (task_name CHAR(20) NOT NULL,
> task_time DATETIME NOT NULL,
> PRIMARY KEY (task_name, task_time),
> ..);
> Just fill in the schedule for each task.
>
> Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
> events. What were you thinking about doing? We do not compute things
> in SQL; we put them in tables and do joins.
>|||Not sure myself becuase of my limited experience. I do know that I need the
ability to have my sproc run more then once in a day, possibly different
times on different days, and the ability to skip weekends. Can I do all
this using a scheduled DTS job or sproc? Thank you.
"Darren" <Darren@.discussions.microsoft.com> wrote in message
news:9AE28789-D43D-422F-B185-D682C5BF289A@.microsoft.com...[vbcol=seagreen]
> I'm wondering why you need a table. If the tasks are SQL Scripts, then
> just
> run a scheduled DTS job or Store Procedure. You can create jobs to run at
> the specific times and they would only run once. Plus you can have
> failure
> emails if the job fails and will contact you.
> "--CELKO--" wrote:
>|||Yes you can run the job except for the weekends. In Enterprise Manager, go
to the Managment Folder, Expand SQL Server Agent, and you will see the jobs
section. Create a new job and in the Schedules tab create a new schedule an
d
you will see the options you can do. Good luck.
Darren
"Code Boy" wrote:

> Not sure myself becuase of my limited experience. I do know that I need t
he
> ability to have my sproc run more then once in a day, possibly different
> times on different days, and the ability to skip weekends. Can I do all
> this using a scheduled DTS job or sproc? Thank you.
>
> "Darren" <Darren@.discussions.microsoft.com> wrote in message
> news:9AE28789-D43D-422F-B185-D682C5BF289A@.microsoft.com...
>
>

Advice Needed

I need to set up a table to define times when tasks will run. It needs to
allow for multiple times per day and if the task should run on the weekends.
Once the task has run once for the specified service window for that time of
day I need to prevent the task from running again. I do not have a lot of
SQL experience and was wondering the best way to set up the table structure
might be. Any thoughts, examples or links would be greatly appreciated.
Thank you.>> I need to set up a table to define times when tasks will run. It needs to allow for multiple times per day and if the task should run on the weekends. <<
CREATE TABLE TaskSchedule
(task_name CHAR(20) NOT NULL,
task_time DATETIME NOT NULL,
PRIMARY KEY (task_name, task_time),
..);
Just fill in the schedule for each task.
>> Once the task has run once for the specified service window for that time of day I need to prevent the task from running again. <<
Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
events. What were you thinking about doing? We do not compute things
in SQL; we put them in tables and do joins.|||I'm wondering why you need a table. If the tasks are SQL Scripts, then just
run a scheduled DTS job or Store Procedure. You can create jobs to run at
the specific times and they would only run once. Plus you can have failure
emails if the job fails and will contact you.
"--CELKO--" wrote:
> >> I need to set up a table to define times when tasks will run. It needs to allow for multiple times per day and if the task should run on the weekends. <<
> CREATE TABLE TaskSchedule
> (task_name CHAR(20) NOT NULL,
> task_time DATETIME NOT NULL,
> PRIMARY KEY (task_name, task_time),
> ..);
> Just fill in the schedule for each task.
> >> Once the task has run once for the specified service window for that time of day I need to prevent the task from running again. <<
> Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
> events. What were you thinking about doing? We do not compute things
> in SQL; we put them in tables and do joins.
>|||Not sure myself becuase of my limited experience. I do know that I need the
ability to have my sproc run more then once in a day, possibly different
times on different days, and the ability to skip weekends. Can I do all
this using a scheduled DTS job or sproc? Thank you.
"Darren" <Darren@.discussions.microsoft.com> wrote in message
news:9AE28789-D43D-422F-B185-D682C5BF289A@.microsoft.com...
> I'm wondering why you need a table. If the tasks are SQL Scripts, then
> just
> run a scheduled DTS job or Store Procedure. You can create jobs to run at
> the specific times and they would only run once. Plus you can have
> failure
> emails if the job fails and will contact you.
> "--CELKO--" wrote:
>> >> I need to set up a table to define times when tasks will run. It
>> >> needs to allow for multiple times per day and if the task should run
>> >> on the weekends. <<
>> CREATE TABLE TaskSchedule
>> (task_name CHAR(20) NOT NULL,
>> task_time DATETIME NOT NULL,
>> PRIMARY KEY (task_name, task_time),
>> ..);
>> Just fill in the schedule for each task.
>> >> Once the task has run once for the specified service window for that
>> >> time of day I need to prevent the task from running again. <<
>> Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
>> events. What were you thinking about doing? We do not compute things
>> in SQL; we put them in tables and do joins.
>>|||Yes you can run the job except for the weekends. In Enterprise Manager, go
to the Managment Folder, Expand SQL Server Agent, and you will see the jobs
section. Create a new job and in the Schedules tab create a new schedule and
you will see the options you can do. Good luck.
Darren
"Code Boy" wrote:
> Not sure myself becuase of my limited experience. I do know that I need the
> ability to have my sproc run more then once in a day, possibly different
> times on different days, and the ability to skip weekends. Can I do all
> this using a scheduled DTS job or sproc? Thank you.
>
> "Darren" <Darren@.discussions.microsoft.com> wrote in message
> news:9AE28789-D43D-422F-B185-D682C5BF289A@.microsoft.com...
> > I'm wondering why you need a table. If the tasks are SQL Scripts, then
> > just
> > run a scheduled DTS job or Store Procedure. You can create jobs to run at
> > the specific times and they would only run once. Plus you can have
> > failure
> > emails if the job fails and will contact you.
> >
> > "--CELKO--" wrote:
> >
> >> >> I need to set up a table to define times when tasks will run. It
> >> >> needs to allow for multiple times per day and if the task should run
> >> >> on the weekends. <<
> >>
> >> CREATE TABLE TaskSchedule
> >> (task_name CHAR(20) NOT NULL,
> >> task_time DATETIME NOT NULL,
> >> PRIMARY KEY (task_name, task_time),
> >> ..);
> >>
> >> Just fill in the schedule for each task.
> >>
> >> >> Once the task has run once for the specified service window for that
> >> >> time of day I need to prevent the task from running again. <<
> >>
> >> Use a query with "task_time >= CURRENT_TIMESTAMP" so you ignore past
> >> events. What were you thinking about doing? We do not compute things
> >> in SQL; we put them in tables and do joins.
> >>
> >>
>
>sql

Sunday, February 12, 2012

Administrative Tasks

Can anybody tel me what are the most administrative tasks/strategy. What do professional administrators to maintain sql databases.

I hope for your answer. michael

Sorry, it's not clear what you're asking. Have you read SQL Server Books Online yet?

Administrative Tasks

Hi
Can somebody please point me to good URL or may be some scripts that I can
use to execute as part of DB health check.
Also, I would like to see if the DB is well designed or thought of while it
was created; I know its a wide subject, but I will be happy to get started
with some script that you guys have been using in your environment.
TIA
PPHi
You may want to read up on maintenance plans in Books online along with
other procedures such as the DBCC commands. Also check out the article
http://www.sqlservercentral.com/col...enanceplans.asp s
well as the other scripts/articles on this site. If you want to do things
yourself you may want to look at what the expressmaint procedure at
http://www.sqldbatips.com/code.asp does.
John
"PP" wrote:

> Hi
> Can somebody please point me to good URL or may be some scripts that I can
> use to execute as part of DB health check.
> Also, I would like to see if the DB is well designed or thought of while i
t
> was created; I know its a wide subject, but I will be happy to get started
> with some script that you guys have been using in your environment.
> TIA
> PP|||SQL Server 2000 Administrator's Pocket Consultant
http://www.microsoft.com/technet/pr...in/sqlops0.mspx
SQL Server 2000 Resource Kit
http://www.microsoft.com/technet/pr...it/default.mspx
Microsoft SQL Server Developer Center - Architecture and Design
http://msdn.microsoft.com/sql/learn/arch/
SQL-Server-Performance.Com
http://www.sql-server-performance.com/
"PP" <PP@.discussions.microsoft.com> wrote in message
news:AA0FF976-9140-42B6-BDF4-8A741D03DAF5@.microsoft.com...
> Hi
> Can somebody please point me to good URL or may be some scripts that I can
> use to execute as part of DB health check.
> Also, I would like to see if the DB is well designed or thought of while
> it
> was created; I know its a wide subject, but I will be happy to get started
> with some script that you guys have been using in your environment.
> TIA
> PP

Administrative tasks

Dear Friends
I want to do the following for my sql server kindly
suggest how i can do the same.
- Check the SQL cluster set-up and suggest
adpatations/improvements or additionnal hardware
requirements
- Check RAM caching
- Analyse partitionng options and make suggestion
- Identify performance issues and suggest
adapatations/improvements indexes, index views
- Create an adequate maintenance plan.
Thanks and best regards
Sharad1) Hire a qualified DBA
OR
2) Become a qualified DBA
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Sharad" <niitmalad@.yahoo.co.in> wrote in message
news:10df01c4cbd2$f0ce9e60$a501280a@.phx.gbl...
> Dear Friends
> I want to do the following for my sql server kindly
> suggest how i can do the same.
> - Check the SQL cluster set-up and suggest
> adpatations/improvements or additionnal hardware
> requirements
> - Check RAM caching
> - Analyse partitionng options and make suggestion
> - Identify performance issues and suggest
> adapatations/improvements indexes, index views
> - Create an adequate maintenance plan.
> Thanks and best regards
> Sharad|||Sharad,
That's not likely a list of tasks that someone can answer in
a newsgroup posting. You can find some maintenance and
monitoring guidelines in the Operations Guide at:
http://www.microsoft.com/TechNet/pr...in/sqlops0.mspx
You can find some performance monitoring and tuning articles
at:
http://www.sql-server-performance.com/
-Sue
On Tue, 16 Nov 2004 03:53:51 -0800, "Sharad"
<niitmalad@.yahoo.co.in> wrote:

>Dear Friends
>I want to do the following for my sql server kindly
>suggest how i can do the same.
>- Check the SQL cluster set-up and suggest
>adpatations/improvements or additionnal hardware
>requirements
>- Check RAM caching
>- Analyse partitionng options and make suggestion
>- Identify performance issues and suggest
>adapatations/improvements indexes, index views
>- Create an adequate maintenance plan.
>Thanks and best regards
>Sharad

Thursday, February 9, 2012

Admin Performance Issues, Large amount of DBs

I have a large amout of dbs (150) on my SQL Server and when using the enterprise manager to do administrational tasks like Backup, Restore etc. it takes 1.5 hour to open the Database folder. Server is 2xP4, 3Gb RAM. Any ideas on how to manage this number of dbs on the same server and instance of SQL.
Cheers!Use scripts ?

-PatP|||If you can run utilities on server itself, register server as "(LOCAL)" which is local named pipes. Also make sure "Enable shared memory protocol" is checked in Client Network Utility on server.

Otherwise if you can not use server console to run utilities make sure you use TCP/IP protocol.

Hans.