Showing posts with label hourly. Show all posts
Showing posts with label hourly. Show all posts

Wednesday, March 7, 2012

Hourly Scheduling

I have reports that I need to run every hour during the "scheduled" working
day.
Meaning between 8am and 8pm. The only way that I can see to do that is to
create one entry for each hour that I want it to run, meaning 12 scheduled
tasks for each report that I want to run in this manner ...
That could become a maintainence nightmare... Anyone got a better way to do
the same thing?
Thanks,
GaryCan't you create a SQL Server Agent Job Which occurs every 1 hour starting at
8AM and ending at 8PM?
HTH
"Gary Stewart" wrote:
> I have reports that I need to run every hour during the "scheduled" working
> day.
> Meaning between 8am and 8pm. The only way that I can see to do that is to
> create one entry for each hour that I want it to run, meaning 12 scheduled
> tasks for each report that I want to run in this manner ...
> That could become a maintainence nightmare... Anyone got a better way to do
> the same thing?
> Thanks,
> Gary
>
>|||You may create a subcscription for that report and choose hourly
schedule.
Gary Stewart wrote:
> I have reports that I need to run every hour during the "scheduled" working
> day.
> Meaning between 8am and 8pm. The only way that I can see to do that is to
> create one entry for each hour that I want it to run, meaning 12 scheduled
> tasks for each report that I want to run in this manner ...
> That could become a maintainence nightmare... Anyone got a better way to do
> the same thing?
> Thanks,
> Gary

Hourly rates

Please excuse me if this is not a proper forum for the following question:
I am curious about hourly rates/yearly income that some one with following
credentials could get with out a specific industry domain expertise.
Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
active in newsgroups, and few articles in sql server magazine.
I am thinking about becoming the best I can in terms of sql server
programming and wondering how much money I could make.
TIA.
Hi Trisha,
I will let you know MY experience based in UK. I've been doing this since
1996 and used SQL Server from version 1 on OS/2.
It really depends on the following:
1) Who you work for. Having tens years of investment banking experience in a
large US or European city will get you paid a lot more than an MVP who has
worked for the government for ten years. Your employment/client history has
the most significant impact on rates.
2) The MVP award does not have a significant impact on rates. I think this
is because most companies set a budget and rarely extend beyond that. They
want someone experienced enough to do the job, and if they're an MVP, then
it's a bonus. Having said that, the MVP award will tend to keep you employed
during lean times, but it won't push your rates through the glass ceiling.
Some employers haven't even heard of the MVP award, but the awareness is
growing.
3) The same goes for writing a book. I co-authored a book on SQL-DMO, which
was quite a niche area and consequently did not become a best-seller, however
it did sell quite well considering it's niche value. This book did not impact
my rates because of the aforementioned glass ceiling. However, it makes me
more competitive with other candidates in a competitive market.
4) The most significant factors on gaining employment and rates are your
experience, your education - do you have a degree, and most importantly
whether the interviewer likes you or not. I have been turned down a few times
before just because I didn't "click" with the interviewer.
Now, you should really not be in this business for the money. I am certainly
not. I started my career in 1994 in sales and hated every minute of it. I
then took a few months out, did some soul searching and realised that the
work I LOVED was computing. I do this work because I love it - some people
will certainly regard me as a sad git for saying this, but hey, horses for
courses :-) It just so happens that I get reasonably well paid for it, but I
won't get rich in IT, unless I am the employer. Do you have a home network at
home with database servers running on it? I do. I have three machines running
constantly, one of them has eight virtual machines on it with various builds
of SQL Server and Windows Server. This will be a good clue as to how
committed you are.
I admire your aspirations and wish you all the best. Just keep focused and
examine your motivations. The people that "get ahead" long term are the
people that love their work. If you don't love your work, sooner or later you
will get bored and it will show up in the quality of your work, which will
impact your rate, employability, and eventually your happiness.
Good luck!
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
"Trisha" wrote:

> Please excuse me if this is not a proper forum for the following question:
> I am curious about hourly rates/yearly income that some one with following
> credentials could get with out a specific industry domain expertise.
> Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
> active in newsgroups, and few articles in sql server magazine.
> I am thinking about becoming the best I can in terms of sql server
> programming and wondering how much money I could make.
> TIA.
|||I agree completely with Mark Allison's eloquent response...
Additionally, doing well and trying to be the best you can be ( at whatever
you choose ) is an attitude, personality and whether you enjoy the work
thing, regardless of the money... Pick something you love, do it well, and
you will be happy...
If I were in a position where I was very good at SQL, well known in the
industry, had a good job , and made good money but hated the work - it would
be a waste of life - and this is not a trial run...
( Great response Mark, very insightful.)
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Trisha" <trisha@.nospam.nospam> wrote in message
news:BA26333B-757D-415C-BA20-89B523E21150@.microsoft.com...
> Please excuse me if this is not a proper forum for the following question:
> I am curious about hourly rates/yearly income that some one with following
> credentials could get with out a specific industry domain expertise.
> Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
> active in newsgroups, and few articles in sql server magazine.
> I am thinking about becoming the best I can in terms of sql server
> programming and wondering how much money I could make.
> TIA.
|||Mark and Wayne,
Thank you both for your very helpful responses. I do very much enjoy SQL
server programming. For last 10 years I have been mostly involved in front
end vb/c/c++/c#/html/javascript side of things but now I want a slight career
change and do back end - database work 100%.
I hang out here a lot, read the posts, practice them, and learn as much as
possible.
In southern california, a recruiter was paying 90k+/year for a "good" sql
server programmer.
I was wondering what would it take to consistently make 200k/year or is it
out of question. I know my question is relative and it has 'lots of depends'
factors associated with it but I was just wondering out loud.
What kind of actual realistic steps that I can take to SHARPEN my skills
besides JUST READING BOOKS.
TIA...
"Wayne Snyder" wrote:

> I agree completely with Mark Allison's eloquent response...
> Additionally, doing well and trying to be the best you can be ( at whatever
> you choose ) is an attitude, personality and whether you enjoy the work
> thing, regardless of the money... Pick something you love, do it well, and
> you will be happy...
> If I were in a position where I was very good at SQL, well known in the
> industry, had a good job , and made good money but hated the work - it would
> be a waste of life - and this is not a trial run...
> ( Great response Mark, very insightful.)
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Trisha" <trisha@.nospam.nospam> wrote in message
> news:BA26333B-757D-415C-BA20-89B523E21150@.microsoft.com...
>
>
|||To be honest, I find your questions a bit "strange". I fully agree with Mark
and Wayne that it's more important to do something you love doing rather
than doing what pays you the most. When that's said, I'm sure that the most
of us would like to get payed as much as possible for the work we do, but it
depends on a lot of factors (as already mentioned).
If you have been a programmer and hence been in the IT business for 10
years, you should now the level of payment. Eventhough you haven't been a
full time SQL DBA/Programmer, the payment wouldn't be that much different
from other programmers.
There might be a few guys making 200k/year but I'd say they are few - at
least in Europe, and you need to be quite good to get to that level.
The most realistic step to take, it to be real and work with the stuff to
get some experience. Then, in my opinion, a good DBA/SQL Programmer is a
person that not only knows SQL but also has experience in a lot of the
"surrounding" stuff - e.g. has some knowledge about networks, servers, PC's
etc. The more you know, the better you are finding out why things doen't
always behave like you expect. If you are a DBA, it doens't help a lot that
you are very good at SQL scripts, if you can't figure out that it's a
security setting that prevents your users from being able to connect to the
server.
/Steen
Trisha wrote:[vbcol=seagreen]
> Mark and Wayne,
> Thank you both for your very helpful responses. I do very much enjoy
> SQL server programming. For last 10 years I have been mostly involved
> in front end vb/c/c++/c#/html/javascript side of things but now I
> want a slight career change and do back end - database work 100%.
> I hang out here a lot, read the posts, practice them, and learn as
> much as possible.
> In southern california, a recruiter was paying 90k+/year for a "good"
> sql server programmer.
> I was wondering what would it take to consistently make 200k/year or
> is it out of question. I know my question is relative and it has
> 'lots of depends' factors associated with it but I was just wondering
> out loud.
> What kind of actual realistic steps that I can take to SHARPEN my
> skills besides JUST READING BOOKS.
> TIA...
> "Wayne Snyder" wrote:
|||that's exactly why the MCDBA cert is built upon the core four 2000
exams....you need to know the OS upon which the SQL platform is built!
"Steen Persson" wrote:

> To be honest, I find your questions a bit "strange". I fully agree with Mark
> and Wayne that it's more important to do something you love doing rather
> than doing what pays you the most. When that's said, I'm sure that the most
> of us would like to get payed as much as possible for the work we do, but it
> depends on a lot of factors (as already mentioned).
> If you have been a programmer and hence been in the IT business for 10
> years, you should now the level of payment. Eventhough you haven't been a
> full time SQL DBA/Programmer, the payment wouldn't be that much different
> from other programmers.
> There might be a few guys making 200k/year but I'd say they are few - at
> least in Europe, and you need to be quite good to get to that level.
> The most realistic step to take, it to be real and work with the stuff to
> get some experience. Then, in my opinion, a good DBA/SQL Programmer is a
> person that not only knows SQL but also has experience in a lot of the
> "surrounding" stuff - e.g. has some knowledge about networks, servers, PC's
> etc. The more you know, the better you are finding out why things doen't
> always behave like you expect. If you are a DBA, it doens't help a lot that
> you are very good at SQL scripts, if you can't figure out that it's a
> security setting that prevents your users from being able to connect to the
> server.
>
> /Steen
>
> Trisha wrote:
>
>
|||Trisha,
You also need to look at economics. The reason IT staff are reasonably
well paid is because there exists a large demand for them (at the
moment) and a relatively limited supply. I personally don't feel that I
get paid a lot of money, it is a wage that I am comfortable on. Bear in
mind that supply and demand can shift one way or the other depending on
market conditions, oil prices, world peace, the weather, politics, etc.
My wife often remarks to me that I don't seem to have a problem getting
up in the morning (which I don't normally if I haven't been down the
pub), and that is because I enjoy my work. If you spend most of your
waking hours in work, then why not do something you enjoy. It sounds
like you enjoy programming, and if databases float your boat, then
great! Go for it! You will automatically do a good job because you love
it, and then the money will follow, however you will never be rich as a
programmer working for someone else.
If you want to be rich, read something like Rich Dad Poor Dad by Robert
Kiyosaki and act on his advice.
Mark.
Trisha wrote:
> Mark and Wayne,
> Thank you both for your very helpful responses. I do very much enjoy SQL
> server programming. For last 10 years I have been mostly involved in front
> end vb/c/c++/c#/html/javascript side of things but now I want a slight career
> change and do back end - database work 100%.
> I hang out here a lot, read the posts, practice them, and learn as much as
> possible.
> In southern california, a recruiter was paying 90k+/year for a "good" sql
> server programmer.
> I was wondering what would it take to consistently make 200k/year or is it
> out of question. I know my question is relative and it has 'lots of depends'
> factors associated with it but I was just wondering out loud.
> What kind of actual realistic steps that I can take to SHARPEN my skills
> besides JUST READING BOOKS.
> TIA...
>

Hourly rates

Please excuse me if this is not a proper forum for the following question:
I am curious about hourly rates/yearly income that some one with following
credentials could get with out a specific industry domain expertise.
Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
active in newsgroups, and few articles in sql server magazine.
I am thinking about becoming the best I can in terms of sql server
programming and wondering how much money I could make.
TIA.Hi Trisha,
I will let you know MY experience based in UK. I've been doing this since
1996 and used SQL Server from version 1 on OS/2.
It really depends on the following:
1) Who you work for. Having tens years of investment banking experience in a
large US or European city will get you paid a lot more than an MVP who has
worked for the government for ten years. Your employment/client history has
the most significant impact on rates.
2) The MVP award does not have a significant impact on rates. I think this
is because most companies set a budget and rarely extend beyond that. They
want someone experienced enough to do the job, and if they're an MVP, then
it's a bonus. Having said that, the MVP award will tend to keep you employed
during lean times, but it won't push your rates through the glass ceiling.
Some employers haven't even heard of the MVP award, but the awareness is
growing.
3) The same goes for writing a book. I co-authored a book on SQL-DMO, which
was quite a niche area and consequently did not become a best-seller, however
it did sell quite well considering it's niche value. This book did not impact
my rates because of the aforementioned glass ceiling. However, it makes me
more competitive with other candidates in a competitive market.
4) The most significant factors on gaining employment and rates are your
experience, your education - do you have a degree, and most importantly
whether the interviewer likes you or not. I have been turned down a few times
before just because I didn't "click" with the interviewer.
Now, you should really not be in this business for the money. I am certainly
not. I started my career in 1994 in sales and hated every minute of it. I
then took a few months out, did some soul searching and realised that the
work I LOVED was computing. I do this work because I love it - some people
will certainly regard me as a sad git for saying this, but hey, horses for
courses :-) It just so happens that I get reasonably well paid for it, but I
won't get rich in IT, unless I am the employer. Do you have a home network at
home with database servers running on it? I do. I have three machines running
constantly, one of them has eight virtual machines on it with various builds
of SQL Server and Windows Server. This will be a good clue as to how
committed you are.
I admire your aspirations and wish you all the best. Just keep focused and
examine your motivations. The people that "get ahead" long term are the
people that love their work. If you don't love your work, sooner or later you
will get bored and it will show up in the quality of your work, which will
impact your rate, employability, and eventually your happiness.
Good luck!
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
"Trisha" wrote:
> Please excuse me if this is not a proper forum for the following question:
> I am curious about hourly rates/yearly income that some one with following
> credentials could get with out a specific industry domain expertise.
> Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
> active in newsgroups, and few articles in sql server magazine.
> I am thinking about becoming the best I can in terms of sql server
> programming and wondering how much money I could make.
> TIA.|||I agree completely with Mark Allison's eloquent response...
Additionally, doing well and trying to be the best you can be ( at whatever
you choose ) is an attitude, personality and whether you enjoy the work
thing, regardless of the money... Pick something you love, do it well, and
you will be happy...
If I were in a position where I was very good at SQL, well known in the
industry, had a good job , and made good money but hated the work - it would
be a waste of life - and this is not a trial run...
( Great response Mark, very insightful.)
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Trisha" <trisha@.nospam.nospam> wrote in message
news:BA26333B-757D-415C-BA20-89B523E21150@.microsoft.com...
> Please excuse me if this is not a proper forum for the following question:
> I am curious about hourly rates/yearly income that some one with following
> credentials could get with out a specific industry domain expertise.
> Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
> active in newsgroups, and few articles in sql server magazine.
> I am thinking about becoming the best I can in terms of sql server
> programming and wondering how much money I could make.
> TIA.|||Mark and Wayne,
Thank you both for your very helpful responses. I do very much enjoy SQL
server programming. For last 10 years I have been mostly involved in front
end vb/c/c++/c#/html/javascript side of things but now I want a slight career
change and do back end - database work 100%.
I hang out here a lot, read the posts, practice them, and learn as much as
possible.
In southern california, a recruiter was paying 90k+/year for a "good" sql
server programmer.
I was wondering what would it take to consistently make 200k/year or is it
out of question. I know my question is relative and it has 'lots of depends'
factors associated with it but I was just wondering out loud.
What kind of actual realistic steps that I can take to SHARPEN my skills
besides JUST READING BOOKS.
TIA...
"Wayne Snyder" wrote:
> I agree completely with Mark Allison's eloquent response...
> Additionally, doing well and trying to be the best you can be ( at whatever
> you choose ) is an attitude, personality and whether you enjoy the work
> thing, regardless of the money... Pick something you love, do it well, and
> you will be happy...
> If I were in a position where I was very good at SQL, well known in the
> industry, had a good job , and made good money but hated the work - it would
> be a waste of life - and this is not a trial run...
> ( Great response Mark, very insightful.)
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Trisha" <trisha@.nospam.nospam> wrote in message
> news:BA26333B-757D-415C-BA20-89B523E21150@.microsoft.com...
> > Please excuse me if this is not a proper forum for the following question:
> >
> > I am curious about hourly rates/yearly income that some one with following
> > credentials could get with out a specific industry domain expertise.
> >
> > Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
> > active in newsgroups, and few articles in sql server magazine.
> >
> > I am thinking about becoming the best I can in terms of sql server
> > programming and wondering how much money I could make.
> >
> > TIA.
>
>|||To be honest, I find your questions a bit "strange". I fully agree with Mark
and Wayne that it's more important to do something you love doing rather
than doing what pays you the most. When that's said, I'm sure that the most
of us would like to get payed as much as possible for the work we do, but it
depends on a lot of factors (as already mentioned).
If you have been a programmer and hence been in the IT business for 10
years, you should now the level of payment. Eventhough you haven't been a
full time SQL DBA/Programmer, the payment wouldn't be that much different
from other programmers.
There might be a few guys making 200k/year but I'd say they are few - at
least in Europe, and you need to be quite good to get to that level.
The most realistic step to take, it to be real and work with the stuff to
get some experience. Then, in my opinion, a good DBA/SQL Programmer is a
person that not only knows SQL but also has experience in a lot of the
"surrounding" stuff - e.g. has some knowledge about networks, servers, PC's
etc. The more you know, the better you are finding out why things doen't
always behave like you expect. If you are a DBA, it doens't help a lot that
you are very good at SQL scripts, if you can't figure out that it's a
security setting that prevents your users from being able to connect to the
server.
/Steen
Trisha wrote:
> Mark and Wayne,
> Thank you both for your very helpful responses. I do very much enjoy
> SQL server programming. For last 10 years I have been mostly involved
> in front end vb/c/c++/c#/html/javascript side of things but now I
> want a slight career change and do back end - database work 100%.
> I hang out here a lot, read the posts, practice them, and learn as
> much as possible.
> In southern california, a recruiter was paying 90k+/year for a "good"
> sql server programmer.
> I was wondering what would it take to consistently make 200k/year or
> is it out of question. I know my question is relative and it has
> 'lots of depends' factors associated with it but I was just wondering
> out loud.
> What kind of actual realistic steps that I can take to SHARPEN my
> skills besides JUST READING BOOKS.
> TIA...
> "Wayne Snyder" wrote:
>> I agree completely with Mark Allison's eloquent response...
>> Additionally, doing well and trying to be the best you can be ( at
>> whatever you choose ) is an attitude, personality and whether you
>> enjoy the work thing, regardless of the money... Pick something you
>> love, do it well, and you will be happy...
>> If I were in a position where I was very good at SQL, well known in
>> the industry, had a good job , and made good money but hated the
>> work - it would be a waste of life - and this is not a trial run...
>> ( Great response Mark, very insightful.)
>> --
>> Wayne Snyder MCDBA, SQL Server MVP
>> Mariner, Charlotte, NC
>> (Please respond only to the newsgroup.)
>> I support the Professional Association for SQL Server ( PASS) and
>> it's community of SQL Professionals.
>> "Trisha" <trisha@.nospam.nospam> wrote in message
>> news:BA26333B-757D-415C-BA20-89B523E21150@.microsoft.com...
>> Please excuse me if this is not a proper forum for the following
>> question:
>> I am curious about hourly rates/yearly income that some one with
>> following credentials could get with out a specific industry domain
>> expertise.
>> Very excellent technical knowledge,SQL server MVP, MCDBA, written A
>> book, active in newsgroups, and few articles in sql server magazine.
>> I am thinking about becoming the best I can in terms of sql server
>> programming and wondering how much money I could make.
>> TIA.|||that's exactly why the MCDBA cert is built upon the core four 2000
exams....you need to know the OS upon which the SQL platform is built!
"Steen Persson" wrote:
> To be honest, I find your questions a bit "strange". I fully agree with Mark
> and Wayne that it's more important to do something you love doing rather
> than doing what pays you the most. When that's said, I'm sure that the most
> of us would like to get payed as much as possible for the work we do, but it
> depends on a lot of factors (as already mentioned).
> If you have been a programmer and hence been in the IT business for 10
> years, you should now the level of payment. Eventhough you haven't been a
> full time SQL DBA/Programmer, the payment wouldn't be that much different
> from other programmers.
> There might be a few guys making 200k/year but I'd say they are few - at
> least in Europe, and you need to be quite good to get to that level.
> The most realistic step to take, it to be real and work with the stuff to
> get some experience. Then, in my opinion, a good DBA/SQL Programmer is a
> person that not only knows SQL but also has experience in a lot of the
> "surrounding" stuff - e.g. has some knowledge about networks, servers, PC's
> etc. The more you know, the better you are finding out why things doen't
> always behave like you expect. If you are a DBA, it doens't help a lot that
> you are very good at SQL scripts, if you can't figure out that it's a
> security setting that prevents your users from being able to connect to the
> server.
>
> /Steen
>
> Trisha wrote:
> > Mark and Wayne,
> >
> > Thank you both for your very helpful responses. I do very much enjoy
> > SQL server programming. For last 10 years I have been mostly involved
> > in front end vb/c/c++/c#/html/javascript side of things but now I
> > want a slight career change and do back end - database work 100%.
> >
> > I hang out here a lot, read the posts, practice them, and learn as
> > much as possible.
> >
> > In southern california, a recruiter was paying 90k+/year for a "good"
> > sql server programmer.
> >
> > I was wondering what would it take to consistently make 200k/year or
> > is it out of question. I know my question is relative and it has
> > 'lots of depends' factors associated with it but I was just wondering
> > out loud.
> >
> > What kind of actual realistic steps that I can take to SHARPEN my
> > skills besides JUST READING BOOKS.
> >
> > TIA...
> >
> > "Wayne Snyder" wrote:
> >
> >> I agree completely with Mark Allison's eloquent response...
> >>
> >> Additionally, doing well and trying to be the best you can be ( at
> >> whatever you choose ) is an attitude, personality and whether you
> >> enjoy the work thing, regardless of the money... Pick something you
> >> love, do it well, and you will be happy...
> >>
> >> If I were in a position where I was very good at SQL, well known in
> >> the industry, had a good job , and made good money but hated the
> >> work - it would be a waste of life - and this is not a trial run...
> >>
> >> ( Great response Mark, very insightful.)
> >>
> >> --
> >> Wayne Snyder MCDBA, SQL Server MVP
> >> Mariner, Charlotte, NC
> >> (Please respond only to the newsgroup.)
> >>
> >> I support the Professional Association for SQL Server ( PASS) and
> >> it's community of SQL Professionals.
> >> "Trisha" <trisha@.nospam.nospam> wrote in message
> >> news:BA26333B-757D-415C-BA20-89B523E21150@.microsoft.com...
> >> Please excuse me if this is not a proper forum for the following
> >> question:
> >>
> >> I am curious about hourly rates/yearly income that some one with
> >> following credentials could get with out a specific industry domain
> >> expertise.
> >>
> >> Very excellent technical knowledge,SQL server MVP, MCDBA, written A
> >> book, active in newsgroups, and few articles in sql server magazine.
> >>
> >> I am thinking about becoming the best I can in terms of sql server
> >> programming and wondering how much money I could make.
> >>
> >> TIA.
>
>|||Trisha,
You also need to look at economics. The reason IT staff are reasonably
well paid is because there exists a large demand for them (at the
moment) and a relatively limited supply. I personally don't feel that I
get paid a lot of money, it is a wage that I am comfortable on. Bear in
mind that supply and demand can shift one way or the other depending on
market conditions, oil prices, world peace, the weather, politics, etc.
My wife often remarks to me that I don't seem to have a problem getting
up in the morning (which I don't normally if I haven't been down the
pub), and that is because I enjoy my work. If you spend most of your
waking hours in work, then why not do something you enjoy. It sounds
like you enjoy programming, and if databases float your boat, then
great! Go for it! You will automatically do a good job because you love
it, and then the money will follow, however you will never be rich as a
programmer working for someone else.
If you want to be rich, read something like Rich Dad Poor Dad by Robert
Kiyosaki and act on his advice.
Mark.
Trisha wrote:
> Mark and Wayne,
> Thank you both for your very helpful responses. I do very much enjoy SQL
> server programming. For last 10 years I have been mostly involved in front
> end vb/c/c++/c#/html/javascript side of things but now I want a slight career
> change and do back end - database work 100%.
> I hang out here a lot, read the posts, practice them, and learn as much as
> possible.
> In southern california, a recruiter was paying 90k+/year for a "good" sql
> server programmer.
> I was wondering what would it take to consistently make 200k/year or is it
> out of question. I know my question is relative and it has 'lots of depends'
> factors associated with it but I was just wondering out loud.
> What kind of actual realistic steps that I can take to SHARPEN my skills
> besides JUST READING BOOKS.
> TIA...
>

Hourly rates

Please excuse me if this is not a proper forum for the following question:
I am curious about hourly rates/yearly income that some one with following
credentials could get with out a specific industry domain expertise.
Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
active in newsgroups, and few articles in sql server magazine.
I am thinking about becoming the best I can in terms of sql server
programming and wondering how much money I could make.
TIA.Hi Trisha,
I will let you know MY experience based in UK. I've been doing this since
1996 and used SQL Server from version 1 on OS/2.
It really depends on the following:
1) Who you work for. Having tens years of investment banking experience in a
large US or European city will get you paid a lot more than an MVP who has
worked for the government for ten years. Your employment/client history has
the most significant impact on rates.
2) The MVP award does not have a significant impact on rates. I think this
is because most companies set a budget and rarely extend beyond that. They
want someone experienced enough to do the job, and if they're an MVP, then
it's a bonus. Having said that, the MVP award will tend to keep you employed
during lean times, but it won't push your rates through the glass ceiling.
Some employers haven't even heard of the MVP award, but the awareness is
growing.
3) The same goes for writing a book. I co-authored a book on SQL-DMO, which
was quite a niche area and consequently did not become a best-seller, howeve
r
it did sell quite well considering it's niche value. This book did not impac
t
my rates because of the aforementioned glass ceiling. However, it makes me
more competitive with other candidates in a competitive market.
4) The most significant factors on gaining employment and rates are your
experience, your education - do you have a degree, and most importantly
whether the interviewer likes you or not. I have been turned down a few time
s
before just because I didn't "click" with the interviewer.
Now, you should really not be in this business for the money. I am certainly
not. I started my career in 1994 in sales and hated every minute of it. I
then took a few months out, did some soul searching and realised that the
work I LOVED was computing. I do this work because I love it - some people
will certainly regard me as a sad git for saying this, but hey, horses for
courses :-) It just so happens that I get reasonably well paid for it, but
I
won't get rich in IT, unless I am the employer. Do you have a home network a
t
home with database servers running on it? I do. I have three machines runnin
g
constantly, one of them has eight virtual machines on it with various builds
of SQL Server and Windows Server. This will be a good clue as to how
committed you are.
I admire your aspirations and wish you all the best. Just keep focused and
examine your motivations. The people that "get ahead" long term are the
people that love their work. If you don't love your work, sooner or later yo
u
will get bored and it will show up in the quality of your work, which will
impact your rate, employability, and eventually your happiness.
Good luck!
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
"Trisha" wrote:

> Please excuse me if this is not a proper forum for the following question:
> I am curious about hourly rates/yearly income that some one with following
> credentials could get with out a specific industry domain expertise.
> Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
> active in newsgroups, and few articles in sql server magazine.
> I am thinking about becoming the best I can in terms of sql server
> programming and wondering how much money I could make.
> TIA.|||I agree completely with Mark Allison's eloquent response...
Additionally, doing well and trying to be the best you can be ( at whatever
you choose ) is an attitude, personality and whether you enjoy the work
thing, regardless of the money... Pick something you love, do it well, and
you will be happy...
If I were in a position where I was very good at SQL, well known in the
industry, had a good job , and made good money but hated the work - it would
be a waste of life - and this is not a trial run...
( Great response Mark, very insightful.)
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Trisha" <trisha@.nospam.nospam> wrote in message
news:BA26333B-757D-415C-BA20-89B523E21150@.microsoft.com...
> Please excuse me if this is not a proper forum for the following question:
> I am curious about hourly rates/yearly income that some one with following
> credentials could get with out a specific industry domain expertise.
> Very excellent technical knowledge,SQL server MVP, MCDBA, written A book,
> active in newsgroups, and few articles in sql server magazine.
> I am thinking about becoming the best I can in terms of sql server
> programming and wondering how much money I could make.
> TIA.|||Mark and Wayne,
Thank you both for your very helpful responses. I do very much enjoy SQL
server programming. For last 10 years I have been mostly involved in front
end vb/c/c++/c#/html/javascript side of things but now I want a slight caree
r
change and do back end - database work 100%.
I hang out here a lot, read the posts, practice them, and learn as much as
possible.
In southern california, a recruiter was paying 90k+/year for a "good" sql
server programmer.
I was wondering what would it take to consistently make 200k/year or is it
out of question. I know my question is relative and it has 'lots of depends'
factors associated with it but I was just wondering out loud.
What kind of actual realistic steps that I can take to SHARPEN my skills
besides JUST READING BOOKS.
TIA...
"Wayne Snyder" wrote:

> I agree completely with Mark Allison's eloquent response...
> Additionally, doing well and trying to be the best you can be ( at whateve
r
> you choose ) is an attitude, personality and whether you enjoy the work
> thing, regardless of the money... Pick something you love, do it well, and
> you will be happy...
> If I were in a position where I was very good at SQL, well known in the
> industry, had a good job , and made good money but hated the work - it wou
ld
> be a waste of life - and this is not a trial run...
> ( Great response Mark, very insightful.)
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Trisha" <trisha@.nospam.nospam> wrote in message
> news:BA26333B-757D-415C-BA20-89B523E21150@.microsoft.com...
>
>|||To be honest, I find your questions a bit "strange". I fully agree with Mark
and Wayne that it's more important to do something you love doing rather
than doing what pays you the most. When that's said, I'm sure that the most
of us would like to get payed as much as possible for the work we do, but it
depends on a lot of factors (as already mentioned).
If you have been a programmer and hence been in the IT business for 10
years, you should now the level of payment. Eventhough you haven't been a
full time SQL DBA/Programmer, the payment wouldn't be that much different
from other programmers.
There might be a few guys making 200k/year but I'd say they are few - at
least in Europe, and you need to be quite good to get to that level.
The most realistic step to take, it to be real and work with the stuff to
get some experience. Then, in my opinion, a good DBA/SQL Programmer is a
person that not only knows SQL but also has experience in a lot of the
"surrounding" stuff - e.g. has some knowledge about networks, servers, PC's
etc. The more you know, the better you are finding out why things doen't
always behave like you expect. If you are a DBA, it doens't help a lot that
you are very good at SQL scripts, if you can't figure out that it's a
security setting that prevents your users from being able to connect to the
server.
/Steen
Trisha wrote:[vbcol=seagreen]
> Mark and Wayne,
> Thank you both for your very helpful responses. I do very much enjoy
> SQL server programming. For last 10 years I have been mostly involved
> in front end vb/c/c++/c#/html/javascript side of things but now I
> want a slight career change and do back end - database work 100%.
> I hang out here a lot, read the posts, practice them, and learn as
> much as possible.
> In southern california, a recruiter was paying 90k+/year for a "good"
> sql server programmer.
> I was wondering what would it take to consistently make 200k/year or
> is it out of question. I know my question is relative and it has
> 'lots of depends' factors associated with it but I was just wondering
> out loud.
> What kind of actual realistic steps that I can take to SHARPEN my
> skills besides JUST READING BOOKS.
> TIA...
> "Wayne Snyder" wrote:
>|||that's exactly why the MCDBA cert is built upon the core four 2000
exams....you need to know the OS upon which the SQL platform is built!
"Steen Persson" wrote:

> To be honest, I find your questions a bit "strange". I fully agree with Ma
rk
> and Wayne that it's more important to do something you love doing rather
> than doing what pays you the most. When that's said, I'm sure that the mos
t
> of us would like to get payed as much as possible for the work we do, but
it
> depends on a lot of factors (as already mentioned).
> If you have been a programmer and hence been in the IT business for 10
> years, you should now the level of payment. Eventhough you haven't been a
> full time SQL DBA/Programmer, the payment wouldn't be that much different
> from other programmers.
> There might be a few guys making 200k/year but I'd say they are few - at
> least in Europe, and you need to be quite good to get to that level.
> The most realistic step to take, it to be real and work with the stuff to
> get some experience. Then, in my opinion, a good DBA/SQL Programmer is a
> person that not only knows SQL but also has experience in a lot of the
> "surrounding" stuff - e.g. has some knowledge about networks, servers, PC'
s
> etc. The more you know, the better you are finding out why things doen't
> always behave like you expect. If you are a DBA, it doens't help a lot tha
t
> you are very good at SQL scripts, if you can't figure out that it's a
> security setting that prevents your users from being able to connect to th
e
> server.
>
> /Steen
>
> Trisha wrote:
>
>|||Trisha,
You also need to look at economics. The reason IT staff are reasonably
well paid is because there exists a large demand for them (at the
moment) and a relatively limited supply. I personally don't feel that I
get paid a lot of money, it is a wage that I am comfortable on. Bear in
mind that supply and demand can shift one way or the other depending on
market conditions, oil prices, world peace, the weather, politics, etc.
My wife often remarks to me that I don't seem to have a problem getting
up in the morning (which I don't normally if I haven't been down the
pub), and that is because I enjoy my work. If you spend most of your
waking hours in work, then why not do something you enjoy. It sounds
like you enjoy programming, and if databases float your boat, then
great! Go for it! You will automatically do a good job because you love
it, and then the money will follow, however you will never be rich as a
programmer working for someone else.
If you want to be rich, read something like Rich Dad Poor Dad by Robert
Kiyosaki and act on his advice.
Mark.
Trisha wrote:
> Mark and Wayne,
> Thank you both for your very helpful responses. I do very much enjoy SQL
> server programming. For last 10 years I have been mostly involved in front
> end vb/c/c++/c#/html/javascript side of things but now I want a slight car
eer
> change and do back end - database work 100%.
> I hang out here a lot, read the posts, practice them, and learn as much as
> possible.
> In southern california, a recruiter was paying 90k+/year for a "good" sql
> server programmer.
> I was wondering what would it take to consistently make 200k/year or is it
> out of question. I know my question is relative and it has 'lots of depend
s'
> factors associated with it but I was just wondering out loud.
> What kind of actual realistic steps that I can take to SHARPEN my skills
> besides JUST READING BOOKS.
> TIA...
>

Hourly Log Backups... restore proceedure

Hello all,
I am very to sql and still learning so please bear with what may be simple
questions.
I have a SqlDataBase that is at around 2.5GB's my log file was growing to
3GB each day. My maintenance job#1 happens overnight and does everything -
optimize, backup data and log files to disk etc. This backup goes to tape at
4:00AM with the complete server backup . I have another complete database
and log backup that goes direct to a different tape at 4:00PM.
This morning purged the log and shrunk the database to start from a clean
slate Database at 2.5GB's log started at close to nothing. I have setup an
hourly backup of the LOG FILE ONLY to a separate disk keeping 4 hours worth
of logs. I am now looking at the backups and they are 6264KB, 3952KB,
7036KB, 3313KB over the last four hours. We are not busy today but this does
not seem possible does this make sense?
My Question is this: given the proceedure above if the server blew up how do
I get a complete restore of the database... should my hourly backups include
the database as well as the transaction log?
MMaureen,
If you have not already done so, you should read:
Designing a Backup and Restore Strategy
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad
_bkprst_63eh.asp
In brief,
1. 3 to 7 meg of log file in a couple of hours is not very much.
2. Backup of the transactions is how you keep the log from growing. (Except
for simple recovery model)
3. If you have a backup of the database and the hour transaction logs you
would restore the same way:
Restore Database, Restore Log 1, Restore Log 2, ..., Restore Log N.
You should definitely do a trial disaster recovery to learn whether your
whole process is as realiable as you need.
Russell Fields
"Maureen" <nosend2me@.hotmail.com> wrote in message
news:ehBJYtNwDHA.1600@.TK2MSFTNGP10.phx.gbl...
> Hello all,
> I am very to sql and still learning so please bear with what may be simple
> questions.
> I have a SqlDataBase that is at around 2.5GB's my log file was growing to
> 3GB each day. My maintenance job#1 happens overnight and does everything -
> optimize, backup data and log files to disk etc. This backup goes to tape
at
> 4:00AM with the complete server backup . I have another complete database
> and log backup that goes direct to a different tape at 4:00PM.
> This morning purged the log and shrunk the database to start from a clean
> slate Database at 2.5GB's log started at close to nothing. I have setup an
> hourly backup of the LOG FILE ONLY to a separate disk keeping 4 hours
worth
> of logs. I am now looking at the backups and they are 6264KB, 3952KB,
> 7036KB, 3313KB over the last four hours. We are not busy today but this
does
> not seem possible does this make sense?
> My Question is this: given the proceedure above if the server blew up how
do
> I get a complete restore of the database... should my hourly backups
include
> the database as well as the transaction log?
> M
>|||Russell,
Thank for your post. If I understand you correctly To restore I need the
last DB Backup PLUS all LOG backups. In my case if the server failed at 1:49
PM I would need:
4:00 AM Complete database backup
PLUS [8:00AM Logbackup]
PLUS [9:00AM Logbackup]
PLUS [10:00AM Logbackup]
PLUS [11:00AM Logbackup]
PLUS [12:00PM Logbackup]
PLUS [1:00PM Logbackup]
And I would be good as of 1:00PM and I loose 49 minutes of the day. If I
have only the last four hours of logs... I am in trouble, is this correct?
My options are to either keep all of the hourly logs or do additional
database backups. I was actually surprised that the log backups are soooo
small given that the may daily log growth is 3GB I now seem to understand
that log backups must be considered as "A SET" since the last database
backup.
Am I close to understanding this correctly?
"Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
news:eNqVj3NwDHA.1060@.TK2MSFTNGP12.phx.gbl...
> Maureen,
> If you have not already done so, you should read:
> Designing a Backup and Restore Strategy
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad
> _bkprst_63eh.asp
> In brief,
> 1. 3 to 7 meg of log file in a couple of hours is not very much.
> 2. Backup of the transactions is how you keep the log from growing.
(Except
> for simple recovery model)
> 3. If you have a backup of the database and the hour transaction logs you
> would restore the same way:
> Restore Database, Restore Log 1, Restore Log 2, ..., Restore Log N.
> You should definitely do a trial disaster recovery to learn whether your
> whole process is as realiable as you need.
> Russell Fields
> "Maureen" <nosend2me@.hotmail.com> wrote in message
> news:ehBJYtNwDHA.1600@.TK2MSFTNGP10.phx.gbl...
> > Hello all,
> >
> > I am very to sql and still learning so please bear with what may be
simple
> > questions.
> >
> > I have a SqlDataBase that is at around 2.5GB's my log file was growing
to
> > 3GB each day. My maintenance job#1 happens overnight and does
everything -
> > optimize, backup data and log files to disk etc. This backup goes to
tape
> at
> > 4:00AM with the complete server backup . I have another complete
database
> > and log backup that goes direct to a different tape at 4:00PM.
> >
> > This morning purged the log and shrunk the database to start from a
clean
> > slate Database at 2.5GB's log started at close to nothing. I have setup
an
> > hourly backup of the LOG FILE ONLY to a separate disk keeping 4 hours
> worth
> > of logs. I am now looking at the backups and they are 6264KB, 3952KB,
> > 7036KB, 3313KB over the last four hours. We are not busy today but this
> does
> > not seem possible does this make sense?
> >
> > My Question is this: given the proceedure above if the server blew up
how
> do
> > I get a complete restore of the database... should my hourly backups
> include
> > the database as well as the transaction log?
> >
> > M
> >
> >
>|||Maureen,
Some comments in-line below.
Russell
> Thank for your post. If I understand you correctly To restore I need the
> last DB Backup PLUS all LOG backups. In my case if the server failed at
1:49
> PM I would need:
> 4:00 AM Complete database backup
> PLUS [8:00AM Logbackup]
> PLUS [9:00AM Logbackup]
> PLUS [10:00AM Logbackup]
> PLUS [11:00AM Logbackup]
> PLUS [12:00PM Logbackup]
> PLUS [1:00PM Logbackup]
> And I would be good as of 1:00PM and I loose 49 minutes of the day.
Correct. You would be able to restore each of the logs serially and get
back to 1:00 PM. (So don't throw away your logs.) With regard to the last
49 minutes, BACKUP... NO_TRUNCATE is for backing up the log of a damaged
database, so it is sometimes possible to recover those last minutes as well.
There are more details in the Books Online.
> If I have only the last four hours of logs... I am in trouble, is this
correct?
> My options are to either keep all of the hourly logs or do additional
> database backups. I was actually surprised that the log backups are soooo
> small given that the may daily log growth is 3GB I now seem to understand
> that log backups must be considered as "A SET" since the last database
> backup.
Yes, every log since the last database backup is a "set" that is needed to
restore the database to current. (Read the whole section on Backing Up and
Restoring Databases in the BOL.)
Also, I suspect that the major growth in your log may be caused by your
nighttime maintenance tasks.
> Am I close to understanding this correctly?
Yes. Keep learning and it will all make good sense.
> "Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
> news:eNqVj3NwDHA.1060@.TK2MSFTNGP12.phx.gbl...
> > Maureen,
> >
> > If you have not already done so, you should read:
> > Designing a Backup and Restore Strategy
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad
> > _bkprst_63eh.asp
> >
> > In brief,
> > 1. 3 to 7 meg of log file in a couple of hours is not very much.
> > 2. Backup of the transactions is how you keep the log from growing.
> (Except
> > for simple recovery model)
> > 3. If you have a backup of the database and the hour transaction logs
you
> > would restore the same way:
> > Restore Database, Restore Log 1, Restore Log 2, ..., Restore Log N.
> >
> > You should definitely do a trial disaster recovery to learn whether your
> > whole process is as realiable as you need.
> >
> > Russell Fields
> >
> > "Maureen" <nosend2me@.hotmail.com> wrote in message
> > news:ehBJYtNwDHA.1600@.TK2MSFTNGP10.phx.gbl...
> > > Hello all,
> > >
> > > I am very to sql and still learning so please bear with what may be
> simple
> > > questions.
> > >
> > > I have a SqlDataBase that is at around 2.5GB's my log file was growing
> to
> > > 3GB each day. My maintenance job#1 happens overnight and does
> everything -
> > > optimize, backup data and log files to disk etc. This backup goes to
> tape
> > at
> > > 4:00AM with the complete server backup . I have another complete
> database
> > > and log backup that goes direct to a different tape at 4:00PM.
> > >
> > > This morning purged the log and shrunk the database to start from a
> clean
> > > slate Database at 2.5GB's log started at close to nothing. I have
setup
> an
> > > hourly backup of the LOG FILE ONLY to a separate disk keeping 4 hours
> > worth
> > > of logs. I am now looking at the backups and they are 6264KB, 3952KB,
> > > 7036KB, 3313KB over the last four hours. We are not busy today but
this
> > does
> > > not seem possible does this make sense?
> > >
> > > My Question is this: given the proceedure above if the server blew up
> how
> > do
> > > I get a complete restore of the database... should my hourly backups
> > include
> > > the database as well as the transaction log?
> > >
> > > M
> > >
> > >
> >
> >
>

Hourly Data

Hi,

I am trying to get total transactions for Cashiers on an hourly basis from my SQL Database. All the data is in the DB, but I have never ran a query that Counts transaction numbers per hour. I can get the total transactions per Cashier for the day, but not per hour.

Does someone have an answer for me?

Thanks

Lawrence

Assuming that you have a DATETIME column that indicates both the date and time that the row was inserted then you can use the example below as a template. The query will return a rowcount for each hour of the current day in which a row was inserted.

Chris

SELECT DATEPART(HOUR, MyTable.MyDateField) AS Hour, COUNT(*) AS [RowCount]

FROM MyTable

WHERE MyTable.MyDateField >= CAST(CONVERT(VARCHAR(11), GETDATE(), 106) AS DATETIME)

GROUP BY DATEPART(HOUR, MyTable.MyDateField)

|||

Thanks Chris,

I modified as needed and it worked perfect.

|||

Chris,

I was trying this query on a Weekly basis, but that did not work. How do I get it to work over a long period of time?

Thanks Chris

|||

Would you expect to see the results broken down by day, or would you want to see the total number of rows for the 3 o'clock to 4 o'clock period (for example) for all days represented by a single row?

e.g.

Either:

Day 1, Hour 3, 564

Day 2, Hour 3, 989

Day 3, Hour 3, 43

etc...

or a single row for hour 3 for all three days:

Hour 3, 1596

Chris

|||

Chris,

What I currently have is:

Cashier A: Hour :9 Total Transactions: 32

10 50

11 63 And so on. It would be nice if I could do this as follows:

Day 1: Hour :9 Total Transactions: 32

10 50

11 63

Day 2: Hour :9 Total Transactions: 32

10 50

11 63

Only if it is possible. I am using this in a crystal report, so I can group inside the report, but don't know how to get the data over a longer period than 1 day.

Thanks for the help Chris.

|||

You can simply extend the GROUP BY and SELECT lists to include the year, month and day - see the example below. @.MyDate is the earliest date on which you wish to report.

Chris

DECLARE @.MyDate DATETIME

SET @.MyDate = GETDATE()

SELECT DATEPART(YEAR, MyTable.MyDateField) AS [Year],

DATEPART(MONTH, MyTable.MyDateField) AS [Month],

DATEPART(DAY, MyTable.MyDateField) AS [Day],

DATEPART(HOUR, MyTable.MyDateField) AS [Hour],

COUNT(*) AS [RowCount]

FROM MyTable

WHERE MyTable.MyDateField >= CAST(CONVERT(VARCHAR(11), @.MyDate, 106) AS DATETIME)

GROUP BY DATEPART(YEAR, MyTable.MyDateField),

DATEPART(MONTH, MyTable.MyDateField),

DATEPART(DAY, MyTable.MyDateField),

DATEPART(HOUR, MyTable.MyDateField)

ORDER BY 1, 2, 3, 4

|||This is great! Thanks Chris!! This was very helpfull!

Hourly batch process locking my database

Hello everyone,

I have around 20 reports in an ASP web-application which connects to a
SQL Server 2000 dB, executes stored procedures based on input
parameters and returns the data in a nice tabular format.

The data which is used in these reports actually originates from a 3rd
party accounting application called Exchequer. I have written a VB
application (I call it the extractor) which extracts data from
Exchequer and dumps the same into the SQL Server dB every hour. The
running time for the extractor is an average of 10 minutes. During
these 10 minutes, while the extractor seems to run happily, my ASP
web-application which queries the same dB that the extractor
application is updating becomes dead slow.

Is there anyway I can get the extractor to be nice to SQL Server and
not take up all its resources so that the ASP web-application users do
not have to contend with a very very slow application during those
times?

I am using a DSN to connect to the dB from the server that runs the
web-application and well as the other server which runs extractor.
Connection pooling has been enabled on both (using the ODBC
Administrator). The Detach Database dialog gives me a list of open
connections to the dB. I have been monitoring the same and I have
noted 10-15 open connections at most times, even during the execution
of extractor.

All connection objects in the ASP as well as VB applications are
closed and then set to nothing.

This system has been in use from 2002. My Data file has grown to 450MB
and my Transaction Log is close to 2GB. Can the Transaction Log be a
problem. For some reason, the size of the Transaction Log does not go
down even after a complete dB backup is done. Once a complete dB
backup is done, doesn't the Transaction Log lose its significance and
can be actually deleted? Anyway this is another post I'm doing today
to the group.

In the extractor program,
1) I create a temporary table
2) I create an empty recordset out of the table
3) I loop through the Exchequer records using Exchequer's APIs, adding
records into the recordset of the temporary table as I go along.
4) I do an UpdateBatch of the Recordset intermitently
5) I open an SQL Transaction
6) I delete all records from the main table
7) I run a INSERT INTO main_table SELECT * FROM #temp_table
8) I commit the transaction

I hope that the information is sufficient

Thanks
SamSam (simantahandique@.indiatimes.com) writes:
> Is there anyway I can get the extractor to be nice to SQL Server and
> not take up all its resources so that the ASP web-application users do
> not have to contend with a very very slow application during those
> times?

There probably is, but it's not that there is a low-priority setting.
You simply will have to analyse in what way the extractor is slowing
the rest down. It could be blocking, it could be that the extractor
consumes a lot of CPU. Indeed during these steps:

> 5) I open an SQL Transaction
> 6) I delete all records from the main table
> 7) I run a INSERT INTO main_table SELECT * FROM #temp_table
> 8) I commit the transaction

The other processes are likely to be blocked, as the main table is
being reloaded.

I don't think you said how much data that is loaded each time, but it is
not impossible that here are possibilities for improvements. In step 6,
you could use TRUNCATE TABLE to empty the table, this is faster than using
the DELETE statement. TRUNCATE TABLE will not work if the table has
foreign keys. Also, the extractor must be running as dbo to have permission.

Then again, does data really change that wildly? Maybe you are better off
loading deltas only?

Also: you load the data through a recordset. You are likely to get better
performance with bulk-load operations.

> This system has been in use from 2002. My Data file has grown to 450MB
> and my Transaction Log is close to 2GB. Can the Transaction Log be a
> problem. For some reason, the size of the Transaction Log does not go
> down even after a complete dB backup is done. Once a complete dB
> backup is done, doesn't the Transaction Log lose its significance and
> can be actually deleted?

Well, someone has to make that decision, and SQL Server is not doing it
behind your back. You need to backup the transaction log as well to
keep it down in size. The transaction log is kept so that you can back
it up and make an up-to-the point recovery.

Judging from the description of the database, it sounds that you might
be interested in setting the database in simple recovery. This means
that you cannot perform up-to-the-point recovery, only restore from
the most recent backup. The flip side is that SQL Server will regularly
truncate the transaction log from all committed transaction.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thank you for your post. A couple of points.

Erland Sommarskog <esquel@.sommarskog.se> wrote in message news:<Xns952F720586F5AYazorman@.127.0.0.1>...
> Then again, does data really change that wildly? Maybe you are better off
> loading deltas only?
I run the extractor every hour to synchronize data from the past 7
days from Exchequer. This is very much the requirement, so I do not
have any choice there. This results on an average 10,000 records to be
moved into the main_table from the #temp_table, which is when the
dead-lock happens. Does this information help you in any way to
suggest some improvements?

I was thinking of running two parallel dBs in some sort of a
round-robin load balanced setup. (I'm sure the "round-robin load
balanced" term is completely incorrect to describe the setup. But I am
using it for lack of a better phrase to describe my plan) In a typical
scenario, the Extractor will run on dB1. The Intranet web-application
will be connected to dB2. Once the extractor completes its execution,
it can alter the connection string in the conf file for my Intranet
web-application so that the Intranet connects to the updated dB1
henceforth. The next time the extractor executes, it will update dB2
instead of dB1 and switch the Intranet back to dB2 after its
execution, and so on. The only problem is that the dB has around 20
tables out of which only 6 are being updated by Extractor. How do I
synchronize the other 14 tables between dB1 and db2? Does SQL Server
provide any facility for that?

> Also: you load the data through a recordset. You are likely to get better
> performance with bulk-load operations.
What are these bulk-load operations? Are they a group of SQL Commands?
If you can point me to the right place in the SQL Server help file, I
can read up from there.

> Judging from the description of the database, it sounds that you might
> be interested in setting the database in simple recovery. This means
> that you cannot perform up-to-the-point recovery, only restore from
> the most recent backup. The flip side is that SQL Server will regularly
> truncate the transaction log from all committed transaction.
I just enquired with the administration team. They are using a
third-party software called Backup Exec from Veritas for all backup
activities. The backup software uses some thing it calls as SQL Server
agents to backup the dB. I'm not sure if these SQL Server agents would
cause the transaction log to get truncated once they are done with the
backups.
If I use a simple recovery model, is the transaction log table still
used by the dB? Would SQL statements which have a BEGIN TRANS use the
Transaction Log? Once the transaction is committed in this case, does
it automatically truncate the Transaction Log and thus keep its file
size in check?
These questions may been answered in the previous post. I'm sorry if
I'm repeating the same question. But I could not understand the last
few sentences completely. Especially, when it was mentioned thus: "The
flip side is that ...". Why do you say it is a "flip" side?

Thanks and regards,
Sam|||Just a suggestion for you. It sounds similar to something we do in
here, so it may be worth a thought.

We have to extract a large number of records from several tables. From
this we need to perform some complex calculations and play around with
data formatting to get the data into a required output which is a
single table. We need to do this every 10 minutes with no longer than
3 mins taken up for the processing. Locking users is a major concern,
as previous methods used directly on the 'live' tables caused us
problems.

What we found worked best for us was to have a database in which we
could store the structure of the tables we were copying (specifically
just the fields we needed). Using a DTS package and SP's, we extract
the data from the master db into CSV files (very quick to do this -
for 1/2 million records between all of the tables, this takes about 1
min to export and import) and re-import the data into the copied
structure in the new database. We then perform all of the calculations
on these tables as opposed to the master 'live' ones.

I know it probably seems daft exporting and importing, but it's the
quickest way of getting the data without causing the users problems.
SQL server can easily handle the workload on the data, but we were
causing too many problems with locking. By doing this, we have
improved the speed dramatically.

The advantages are that you can take the data as read only and reduce
locking (although this will be minimal) and speed of export and
import.

A simple scheduled task runs this for us every 10 minutes.

If you get a chance, try this and see how it performs against your
normal method, it may prove quick enough for you to take further.

Hope that helps, let me know if you need more info.

Ryan|||Sam (simantahandique@.indiatimes.com) writes:
> Erland Sommarskog <esquel@.sommarskog.se> wrote in message
> news:<Xns952F720586F5AYazorman@.127.0.0.1>...
>>
>> Then again, does data really change that wildly? Maybe you are better off
>> loading deltas only?
>>
> I run the extractor every hour to synchronize data from the past 7
> days from Exchequer. This is very much the requirement, so I do not
> have any choice there. This results on an average 10,000 records to be
> moved into the main_table from the #temp_table, which is when the
> dead-lock happens. Does this information help you in any way to
> suggest some improvements?

Not really. If I understood your previous post, you are once an hour
flushing the target database, and reloads everything from Exchequer. This
sounds very ineffecient to me. Is there no way to find out what has
changed, and load only the changes?

> I was thinking of running two parallel dBs in some sort of a
> round-robin load balanced setup.
> ...
> The only problem is that the dB has around 20 tables out of which only 6
> are being updated by Extractor. How do I synchronize the other 14 tables
> between dB1 and db2? Does SQL Server provide any facility for that?

You could use triggers for this, although you need to take some care that
you don't trigger forth and back.

However, having two databases is a bit overkill. It might be possible
to do this with two tables that you rename once an hour. Not that this
is particularly exciting. (Loading only deltas still seems like the best
bet.)

> What are these bulk-load operations? Are they a group of SQL Commands?
> If you can point me to the right place in the SQL Server help file, I
> can read up from there.

There are several methods to bulk-load:

o BCP, which is a command-line tool.
o BULK INSERT which is an SQL command.
o There are bulk-copy APIs both in OLE DB and ODBC.
o DTS.

The easiest to use in my opinion is BCP. But these ways have many things
in common, including how you specify how the data to import looks like.
(With the reservation for DTS that I don't know much about.)

With bulk-load, you could get all data into a staging table, and then
work from there. Preferably set-based, and not one-by-one processing
like in ADO.

> I just enquired with the administration team. They are using a
> third-party software called Backup Exec from Veritas for all backup
> activities. The backup software uses some thing it calls as SQL Server
> agents to backup the dB. I'm not sure if these SQL Server agents would
> cause the transaction log to get truncated once they are done with the
> backups.

I don't know about Backup Exec, you will have to sort that out with
your admin people. But I would guess, that it's a configuration thing
whether you also backup the log with Backup Exec.

Then again... You said, 10000 rows on average each time. If I assume
an average row size of 500 bytes, this means that you insert and delete
10000 * 500 * 2 * 24 = 240.000.000 bytes a day. If your transaction log
never had been truncated since 2002, you would have a terabyte transaction
log by now. So I would guess that it is backed up after all.

> If I use a simple recovery model, is the transaction log table still
> used by the dB? Would SQL statements which have a BEGIN TRANS use the
> Transaction Log? Once the transaction is committed in this case, does
> it automatically truncate the Transaction Log and thus keep its file
> size in check?

More or less, yes. That is, transaction atomicity is still maintained,
so that a transaction can be rolled back (or forward). The log is never
truncated past the oldest active open transaction. The actual truncation
does not really happen with commit, but by the checkpointing process
which runs about once minute or so. But that's really nothing you have
to bother about.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Hourly Average

Apologies for the simplicity of the question, but it reflects my
capabilities! I have the following sample fields coming from different
tables:

Location
TimeDate (timestamp)
Data

I need to return the average of Data per Location per HOUR.

Thanks.I believe this will do it.

SELECT Location,
dateadd(hour,datediff(hour,0,TimeDate),0) as Hourly,
avg(Data) as AvgData
FROM ....
GROUP BY
Location,
dateadd(hour,datediff(hour,0,TimeDate),0)

Roy Harvey
Beacon Falls, CT

On 17 Aug 2006 09:31:32 -0700, "Compliance" <comcontrol@.aol.com>
wrote:

Quote:

Originally Posted by

>Apologies for the simplicity of the question, but it reflects my
>capabilities! I have the following sample fields coming from different
>tables:
>
>Location
>TimeDate (timestamp)
>Data
>
>I need to return the average of Data per Location per HOUR.
>
>Thanks.

|||Roy:

Thanks for the reply! I have run this and am getting a syntax error on
the second line which says there is incorrect syntax near the '(' . I
played with spacing but could not resolve. Do you have any tips?
Also, is it inappropriate

Roy Harvey wrote:

Quote:

Originally Posted by

I believe this will do it.
>
SELECT Location,
dateadd(hour,datediff(hour,0,TimeDate),0) as Hourly,
avg(Data) as AvgData
FROM ....
GROUP BY
Location,
dateadd(hour,datediff(hour,0,TimeDate),0)
>
Roy Harvey
Beacon Falls, CT
>
On 17 Aug 2006 09:31:32 -0700, "Compliance" <comcontrol@.aol.com>
wrote:
>

Quote:

Originally Posted by

Apologies for the simplicity of the question, but it reflects my
capabilities! I have the following sample fields coming from different
tables:

Location
TimeDate (timestamp)
Data

I need to return the average of Data per Location per HOUR.

Thanks.

|||I checked the syntax and what I posted seems clean, other than the
lack of the FROM clause. I adapted it to a meaningess example using
an actual table:

SELECT id,
dateadd(hour,datediff(hour,0,crdate),0) as Hourly,
avg(schema_ver) as AvgData
FROM sysobjects
GROUP BY
id,
dateadd(hour,datediff(hour,0,crdate),0)

If you can't find the problem, past the exact code that is not
executing into your reply.

Roy Harvey
Beacon Falls, CT

On 17 Aug 2006 11:24:46 -0700, "Compliance" <comcontrol@.aol.com>
wrote:

Quote:

Originally Posted by

>Roy:
>
>Thanks for the reply! I have run this and am getting a syntax error on
>the second line which says there is incorrect syntax near the '(' . I
>played with spacing but could not resolve. Do you have any tips?
>Also, is it inappropriate
>
>Roy Harvey wrote:

Quote:

Originally Posted by

>I believe this will do it.
>>
>SELECT Location,
> dateadd(hour,datediff(hour,0,TimeDate),0) as Hourly,
> avg(Data) as AvgData
> FROM ....
> GROUP BY
> Location,
> dateadd(hour,datediff(hour,0,TimeDate),0)
>>
>Roy Harvey
>Beacon Falls, CT
>>
>On 17 Aug 2006 09:31:32 -0700, "Compliance" <comcontrol@.aol.com>
>wrote:
>>

Quote:

Originally Posted by

>Apologies for the simplicity of the question, but it reflects my
>capabilities! I have the following sample fields coming from different
>tables:
>
>Location
>TimeDate (timestamp)
>Data
>
>I need to return the average of Data per Location per HOUR.
>
>Thanks.

|||On Thu, 17 Aug 2006 12:02:49 -0700, you wrote:

Quote:

Originally Posted by

SELECT tblRecord.HistAt
dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,


On Thu, 17 Aug 2006 12:02:49 -0700, "Compliance" <comcontrol@.aol.com>
wrote:

Quote:

Originally Posted by

SELECT tblRecord.HistAt
dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,


There is a comma missing at the end of the first line.

Roy Harvey
Beacon Falls, CT|||My mistake...thanks. Now I am getting the following back, but its not
quite correct. See, unless I place the DateTime field in the GROUPBY I
get an error:

Quote:

Originally Posted by

>[Error] Script lines: 1-9 --------


Column 'Date/Time' is invalid in the select list because it is not
contained in either an aggregate function or the GROUP BY clause.

Quote:

Originally Posted by

>


So when my data comes back i get the actual TimeDate and the new
Hourly, but not the summarized hourly average (AvgData) alone:

DateTime Hourly AvgData
Name
------- -------
------ ----
7/25/2006 9:30:06 PM 7/25/2006 9:00:00 PM 82.80000 1Name
7/25/2006 9:32:03 PM 7/25/2006 9:00:00 PM 82.40000 1Name
7/25/2006 9:34:09 PM 7/25/2006 9:00:00 PM 82.09999 1TName

Thanks again.

Roy Harvey wrote:

Quote:

Originally Posted by

On Thu, 17 Aug 2006 12:02:49 -0700, you wrote:
>

Quote:

Originally Posted by

SELECT tblRecord.HistAt
dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,


On Thu, 17 Aug 2006 12:02:49 -0700, "Compliance" <comcontrol@.aol.com>
wrote:
>

Quote:

Originally Posted by

SELECT tblRecord.HistAt
dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,


>
There is a comma missing at the end of the first line.

Roy Harvey
Beacon Falls, CT

|||Got it working now...I was retuening the DateTime data in the Select so
it was just giving me what I asked for.

Thanks Very Much Roy.

Compliance wrote:

Quote:

Originally Posted by

My mistake...thanks. Now I am getting the following back, but its not
quite correct. See, unless I place the DateTime field in the GROUPBY I
get an error:
>

Quote:

Originally Posted by

[Error] Script lines: 1-9 --------


Column 'Date/Time' is invalid in the select list because it is not
contained in either an aggregate function or the GROUP BY clause.
>
So when my data comes back i get the actual TimeDate and the new
Hourly, but not the summarized hourly average (AvgData) alone:
>
DateTime Hourly AvgData
Name
------- -------
------ ----
7/25/2006 9:30:06 PM 7/25/2006 9:00:00 PM 82.80000 1Name
7/25/2006 9:32:03 PM 7/25/2006 9:00:00 PM 82.40000 1Name
7/25/2006 9:34:09 PM 7/25/2006 9:00:00 PM 82.09999 1TName
>
>
Thanks again.
>
Roy Harvey wrote:

Quote:

Originally Posted by

On Thu, 17 Aug 2006 12:02:49 -0700, you wrote:

Quote:

Originally Posted by

SELECT tblRecord.HistAt
dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,


On Thu, 17 Aug 2006 12:02:49 -0700, "Compliance" <comcontrol@.aol.com>
wrote:

Quote:

Originally Posted by

SELECT tblRecord.HistAt
dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,


There is a comma missing at the end of the first line.

Roy Harvey
Beacon Falls, CT

|||Got it working now...I was retuening the DateTime data in the Select so
it was just giving me what I asked for.

Thanks Very Much Roy.

Compliance wrote:

Quote:

Originally Posted by

My mistake...thanks. Now I am getting the following back, but its not
quite correct. See, unless I place the DateTime field in the GROUPBY I
get an error:
>

Quote:

Originally Posted by

[Error] Script lines: 1-9 --------


Column 'Date/Time' is invalid in the select list because it is not
contained in either an aggregate function or the GROUP BY clause.
>
So when my data comes back i get the actual TimeDate and the new
Hourly, but not the summarized hourly average (AvgData) alone:
>
DateTime Hourly AvgData
Name
------- -------
------ ----
7/25/2006 9:30:06 PM 7/25/2006 9:00:00 PM 82.80000 1Name
7/25/2006 9:32:03 PM 7/25/2006 9:00:00 PM 82.40000 1Name
7/25/2006 9:34:09 PM 7/25/2006 9:00:00 PM 82.09999 1TName
>
>
Thanks again.
>
Roy Harvey wrote:

Quote:

Originally Posted by

On Thu, 17 Aug 2006 12:02:49 -0700, you wrote:

Quote:

Originally Posted by

SELECT tblRecord.HistAt
dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,


On Thu, 17 Aug 2006 12:02:49 -0700, "Compliance" <comcontrol@.aol.com>
wrote:

Quote:

Originally Posted by

SELECT tblRecord.HistAt
dateadd(hour,datediff(hour,0,HistAt),0) as Hourly,


There is a comma missing at the end of the first line.

Roy Harvey
Beacon Falls, CT