Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Wednesday, March 28, 2012

Scheduling MSSQL Databases Daily Backup

Hi -
I want to Schedule Daily Backup of MSSQL Databases .. How can i do it .. How can i schedule it so that it get backuped everyday automatically at desired time.
Kind RegardsYou need to read up on Maintenance Plans on BOL. How yoyur databases are setup and each applications recovery requirements in order to setup the backups properly. Also read up on Recovery Plans.|||You can use the SQL Server Agent Utility (available through Enterprise Manager) to schedule jobs to run at regular times. The Maintenance Plan wizard merely creates the jobs for you (and also provides a convenient method of grouping databases upon which to perform identical maintenance).

blindman

Monday, March 12, 2012

scheduled delete performance cost

What would be the performance cost if I deleted all the rows from a table in MSSQL every 5 minutes?

I'm doing this to keep track of whos online. Every time a user goes to a new page they get logged into a table called WhosOnline. Every 5 minutes the log will get deleted.

What would be the performance cost of this and if its high, does anyone know a better way to keep track of whos Online?Forget it, I figured out how to do it. SessionID & UserName in a database.

Saturday, February 25, 2012

schedule database growth for midnight.

Hi Everybody
My MSSQL 2000 8.00.818 database stores large amounts of binary data
and can be gigabytes in size. When the databases automatically grow,
they can take a while. This causes web pages which are waiting for
results from queries, to fail. Growth has been set to 1% to decrease
grow time. But I want to know if it is possible to set a schedule to
run at night, to make sure there is at least 10% free space. Can this
be done?
Why don't you just increase the database size by a LOT once, anticipating
long-term growth, instead of trying to predict reactionary growth?
"geist3" <jcockrell@.gmail.com> wrote in message
news:1184679861.142847.322970@.z28g2000prd.googlegr oups.com...
> Hi Everybody
> My MSSQL 2000 8.00.818 database stores large amounts of binary data
> and can be gigabytes in size. When the databases automatically grow,
> they can take a while. This causes web pages which are waiting for
> results from queries, to fail. Growth has been set to 1% to decrease
> grow time. But I want to know if it is possible to set a schedule to
> run at night, to make sure there is at least 10% free space. Can this
> be done?
>
|||I agree 100% with Aaron in that you should make it as large as you think it
needs to be for quite some time. In any case you can schedule growth by
using a standard SQL Agent job and ALTER DATABASE command. And don't set the
auto growth to a %. Use a fixed amount in MB or GB that you know can grow in
well under the timeout period. A percentage is useless as the size gets
larger each time the db grows and you no longer have control in how long
each one takes.
Andrew J. Kelly SQL MVP
"geist3" <jcockrell@.gmail.com> wrote in message
news:1184679861.142847.322970@.z28g2000prd.googlegr oups.com...
> Hi Everybody
> My MSSQL 2000 8.00.818 database stores large amounts of binary data
> and can be gigabytes in size. When the databases automatically grow,
> they can take a while. This causes web pages which are waiting for
> results from queries, to fail. Growth has been set to 1% to decrease
> grow time. But I want to know if it is possible to set a schedule to
> run at night, to make sure there is at least 10% free space. Can this
> be done?
>
|||Put me down for third on the "be proactive" side. Just make the darn
database HUGE once. This will also avoid disk file fragmentation and lead
to better performance in the long run, as well as providing free space so
that index maintenance can lay data back down in sequential order - again
improving performance.
TheSQLGuru
President
Indicium Resources, Inc.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:ORghqCIyHHA.4276@.TK2MSFTNGP05.phx.gbl...
>I agree 100% with Aaron in that you should make it as large as you think it
>needs to be for quite some time. In any case you can schedule growth by
>using a standard SQL Agent job and ALTER DATABASE command. And don't set
>the auto growth to a %. Use a fixed amount in MB or GB that you know can
>grow in well under the timeout period. A percentage is useless as the size
>gets larger each time the db grows and you no longer have control in how
>long each one takes.
> --
> Andrew J. Kelly SQL MVP
> "geist3" <jcockrell@.gmail.com> wrote in message
> news:1184679861.142847.322970@.z28g2000prd.googlegr oups.com...
>

schedule database growth for midnight.

Hi Everybody
My MSSQL 2000 8.00.818 database stores large amounts of binary data
and can be gigabytes in size. When the databases automatically grow,
they can take a while. This causes web pages which are waiting for
results from queries, to fail. Growth has been set to 1% to decrease
grow time. But I want to know if it is possible to set a schedule to
run at night, to make sure there is at least 10% free space. Can this
be done?Why don't you just increase the database size by a LOT once, anticipating
long-term growth, instead of trying to predict reactionary growth?
"geist3" <jcockrell@.gmail.com> wrote in message
news:1184679861.142847.322970@.z28g2000prd.googlegroups.com...
> Hi Everybody
> My MSSQL 2000 8.00.818 database stores large amounts of binary data
> and can be gigabytes in size. When the databases automatically grow,
> they can take a while. This causes web pages which are waiting for
> results from queries, to fail. Growth has been set to 1% to decrease
> grow time. But I want to know if it is possible to set a schedule to
> run at night, to make sure there is at least 10% free space. Can this
> be done?
>|||I agree 100% with Aaron in that you should make it as large as you think it
needs to be for quite some time. In any case you can schedule growth by
using a standard SQL Agent job and ALTER DATABASE command. And don't set the
auto growth to a %. Use a fixed amount in MB or GB that you know can grow in
well under the timeout period. A percentage is useless as the size gets
larger each time the db grows and you no longer have control in how long
each one takes.
Andrew J. Kelly SQL MVP
"geist3" <jcockrell@.gmail.com> wrote in message
news:1184679861.142847.322970@.z28g2000prd.googlegroups.com...
> Hi Everybody
> My MSSQL 2000 8.00.818 database stores large amounts of binary data
> and can be gigabytes in size. When the databases automatically grow,
> they can take a while. This causes web pages which are waiting for
> results from queries, to fail. Growth has been set to 1% to decrease
> grow time. But I want to know if it is possible to set a schedule to
> run at night, to make sure there is at least 10% free space. Can this
> be done?
>|||Put me down for third on the "be proactive" side. Just make the darn
database HUGE once. This will also avoid disk file fragmentation and lead
to better performance in the long run, as well as providing free space so
that index maintenance can lay data back down in sequential order - again
improving performance.
TheSQLGuru
President
Indicium Resources, Inc.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:ORghqCIyHHA.4276@.TK2MSFTNGP05.phx.gbl...
>I agree 100% with Aaron in that you should make it as large as you think it
>needs to be for quite some time. In any case you can schedule growth by
>using a standard SQL Agent job and ALTER DATABASE command. And don't set
>the auto growth to a %. Use a fixed amount in MB or GB that you know can
>grow in well under the timeout period. A percentage is useless as the size
>gets larger each time the db grows and you no longer have control in how
>long each one takes.
> --
> Andrew J. Kelly SQL MVP
> "geist3" <jcockrell@.gmail.com> wrote in message
> news:1184679861.142847.322970@.z28g2000prd.googlegroups.com...
>

schedule database growth for midnight.

Hi Everybody
My MSSQL 2000 8.00.818 database stores large amounts of binary data
and can be gigabytes in size. When the databases automatically grow,
they can take a while. This causes web pages which are waiting for
results from queries, to fail. Growth has been set to 1% to decrease
grow time. But I want to know if it is possible to set a schedule to
run at night, to make sure there is at least 10% free space. Can this
be done?Why don't you just increase the database size by a LOT once, anticipating
long-term growth, instead of trying to predict reactionary growth?
"geist3" <jcockrell@.gmail.com> wrote in message
news:1184679861.142847.322970@.z28g2000prd.googlegroups.com...
> Hi Everybody
> My MSSQL 2000 8.00.818 database stores large amounts of binary data
> and can be gigabytes in size. When the databases automatically grow,
> they can take a while. This causes web pages which are waiting for
> results from queries, to fail. Growth has been set to 1% to decrease
> grow time. But I want to know if it is possible to set a schedule to
> run at night, to make sure there is at least 10% free space. Can this
> be done?
>|||I agree 100% with Aaron in that you should make it as large as you think it
needs to be for quite some time. In any case you can schedule growth by
using a standard SQL Agent job and ALTER DATABASE command. And don't set the
auto growth to a %. Use a fixed amount in MB or GB that you know can grow in
well under the timeout period. A percentage is useless as the size gets
larger each time the db grows and you no longer have control in how long
each one takes.
--
Andrew J. Kelly SQL MVP
"geist3" <jcockrell@.gmail.com> wrote in message
news:1184679861.142847.322970@.z28g2000prd.googlegroups.com...
> Hi Everybody
> My MSSQL 2000 8.00.818 database stores large amounts of binary data
> and can be gigabytes in size. When the databases automatically grow,
> they can take a while. This causes web pages which are waiting for
> results from queries, to fail. Growth has been set to 1% to decrease
> grow time. But I want to know if it is possible to set a schedule to
> run at night, to make sure there is at least 10% free space. Can this
> be done?
>|||Put me down for third on the "be proactive" side. Just make the darn
database HUGE once. This will also avoid disk file fragmentation and lead
to better performance in the long run, as well as providing free space so
that index maintenance can lay data back down in sequential order - again
improving performance.
--
TheSQLGuru
President
Indicium Resources, Inc.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:ORghqCIyHHA.4276@.TK2MSFTNGP05.phx.gbl...
>I agree 100% with Aaron in that you should make it as large as you think it
>needs to be for quite some time. In any case you can schedule growth by
>using a standard SQL Agent job and ALTER DATABASE command. And don't set
>the auto growth to a %. Use a fixed amount in MB or GB that you know can
>grow in well under the timeout period. A percentage is useless as the size
>gets larger each time the db grows and you no longer have control in how
>long each one takes.
> --
> Andrew J. Kelly SQL MVP
> "geist3" <jcockrell@.gmail.com> wrote in message
> news:1184679861.142847.322970@.z28g2000prd.googlegroups.com...
>> Hi Everybody
>> My MSSQL 2000 8.00.818 database stores large amounts of binary data
>> and can be gigabytes in size. When the databases automatically grow,
>> they can take a while. This causes web pages which are waiting for
>> results from queries, to fail. Growth has been set to 1% to decrease
>> grow time. But I want to know if it is possible to set a schedule to
>> run at night, to make sure there is at least 10% free space. Can this
>> be done?
>