Showing posts with label maint. Show all posts
Showing posts with label maint. Show all posts

Thursday, March 29, 2012

DB Backup Maint Plan - old file deletes

Hello. When using a DB Maint Plan to backup databases,
say 10 databases all in one plan... the job backs up each
database and THEN at the end of the entire job, it deletes
the previous backups (based on your backup retention).
question>> is there any way to backup the database, and
RIGHT THEN, in a Maint Plan job, delete the PREVIOUS
backup files? The problem is that you need enough disk
space to hold the current and old backups for ALL
databases being backed up, unless there's some setting
we're missing? Any thoughts on that? (using DB Maint
Plans, I know we could code things ourselves and NOT use
Maint Plans)... THanks, BruceThis is a multi-part message in MIME format.
--=_NextPart_000_03A4_01C3B337.52A2A5B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
If you're cramped for space, consider replacing the single maintenance plan
with one plan for each DB. This way, the old backup for a database is
removed before the next plan kicks in.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:0fca01c3b360$91c86e90$a401280a@.phx.gbl...
Hello. When using a DB Maint Plan to backup databases,
say 10 databases all in one plan... the job backs up each
database and THEN at the end of the entire job, it deletes
the previous backups (based on your backup retention).
question>> is there any way to backup the database, and
RIGHT THEN, in a Maint Plan job, delete the PREVIOUS
backup files? The problem is that you need enough disk
space to hold the current and old backups for ALL
databases being backed up, unless there's some setting
we're missing? Any thoughts on that? (using DB Maint
Plans, I know we could code things ourselves and NOT use
Maint Plans)... THanks, Bruce
--=_NextPart_000_03A4_01C3B337.52A2A5B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

If you're cramped for space, consider =replacing the single maintenance plan with one plan for each DB. This way, =the old backup for a database is removed before the next plan kicks =in.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Bruce de Freitas" wrote in =message news:0fca01c3b360$91=c86e90$a401280a@.phx.gbl...Hello. When using a DB Maint Plan to backup databases, say 10 databases all =in one plan... the job backs up each database and THEN at the end of the =entire job, it deletes the previous backups (based on your backup =retention). question>> is there any way to backup the database, =and RIGHT THEN, in a Maint Plan job, delete the PREVIOUS backup =files? The problem is that you need enough disk space to hold the current =and old backups for ALL databases being backed up, unless there's some =setting we're missing? Any thoughts on that? (using DB Maint =Plans, I know we could code things ourselves and NOT use Maint Plans)... =THanks, Bruce

--=_NextPart_000_03A4_01C3B337.52A2A5B0--|||Yep, we talked about that as a possibility. It's nice to
have DB backups in one Maint Plan though sometimes, and
was wondering if there was a way to do that. THanks
Tom... Bruce
>--Original Message--
>If you're cramped for space, consider replacing the
single maintenance plan
>with one plan for each DB. This way, the old backup for
a database is
>removed before the next plan kicks in.
>--
>Tom
>----
--
>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>SQL Server MVP
>Columnist, SQL Server Professional
>Toronto, ON Canada
>www.pinnaclepublishing.com/sql
>
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:0fca01c3b360$91c86e90$a401280a@.phx.gbl...
>Hello. When using a DB Maint Plan to backup databases,
>say 10 databases all in one plan... the job backs up each
>database and THEN at the end of the entire job, it deletes
>the previous backups (based on your backup retention).
>question>> is there any way to backup the database, and
>RIGHT THEN, in a Maint Plan job, delete the PREVIOUS
>backup files? The problem is that you need enough disk
>space to hold the current and old backups for ALL
>databases being backed up, unless there's some setting
>we're missing? Any thoughts on that? (using DB Maint
>Plans, I know we could code things ourselves and NOT use
>Maint Plans)... THanks, Bruce
>|||This is a multi-part message in MIME format.
--=_NextPart_000_048B_01C3B33F.F3F4BCC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Maintenance plans give you ease of use, but that does not always translate
to "most efficient".
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:109a01c3b368$e3450d70$a401280a@.phx.gbl...
Yep, we talked about that as a possibility. It's nice to
have DB backups in one Maint Plan though sometimes, and
was wondering if there was a way to do that. THanks
Tom... Bruce
>--Original Message--
>If you're cramped for space, consider replacing the
single maintenance plan
>with one plan for each DB. This way, the old backup for
a database is
>removed before the next plan kicks in.
>--
>Tom
>----
--
>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>SQL Server MVP
>Columnist, SQL Server Professional
>Toronto, ON Canada
>www.pinnaclepublishing.com/sql
>
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:0fca01c3b360$91c86e90$a401280a@.phx.gbl...
>Hello. When using a DB Maint Plan to backup databases,
>say 10 databases all in one plan... the job backs up each
>database and THEN at the end of the entire job, it deletes
>the previous backups (based on your backup retention).
>question>> is there any way to backup the database, and
>RIGHT THEN, in a Maint Plan job, delete the PREVIOUS
>backup files? The problem is that you need enough disk
>space to hold the current and old backups for ALL
>databases being backed up, unless there's some setting
>we're missing? Any thoughts on that? (using DB Maint
>Plans, I know we could code things ourselves and NOT use
>Maint Plans)... THanks, Bruce
>
--=_NextPart_000_048B_01C3B33F.F3F4BCC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Maintenance plans give you ease of =use, but that does not always translate to "most efficient".
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Bruce de Freitas" wrote in =message news:109a01c3b368$e3=450d70$a401280a@.phx.gbl...Yep, we talked about that as a possibility. It's nice to have DB =backups in one Maint Plan though sometimes, and was wondering if there was a =way to do that. THanks Tom... Bruce>--Original Message-->If you're cramped for space, consider replacing the single maintenance plan>with one plan for each DB. This =way, the old backup for a database is>removed before the next plan =kicks in.>>-->Tom>>--=---->Thomas A. Moreau, BSc, PhD, MCSE, MCDBA>SQL Server MVP>Columnist, =SQL Server Professional>Toronto, ON Canada>www.pinnaclepublishing.com/sql>>>"Bruc=e de Freitas" wrote in message>news:0fca01c3b360$91c86e90$a401280a@.phx.gbl...>Hell=o. When using a DB Maint Plan to backup databases,>say 10 databases =all in one plan... the job backs up each>database and THEN at the end of =the entire job, it deletes>the previous backups (based on your backup =retention).>>question>> is there any way to =backup the database, and>RIGHT THEN, in a Maint Plan job, delete the PREVIOUS>backup files? The problem is that you need enough disk>space to hold the current and old backups for =ALL>databases being backed up, unless there's some setting>we're missing? =Any thoughts on that? (using DB Maint>Plans, I know we could =code things ourselves and NOT use>Maint Plans)... THanks, Bruce>

--=_NextPart_000_048B_01C3B33F.F3F4BCC0--

Thursday, March 8, 2012

datetime conversion question

Using SQL2005 DTS - I am trying to import data from a CSV file into a table
created with the following
CREATE TABLE [maint].[dbo].[SpaceAnalysis_v2] (
[Date-Time] datetime,
[Server] text,
[Drive] text,
[Drive Size] numeric(29,0),
[Space Free] numeric(29,0)
)
the first field is date and time and looks like this >>
09/20/2006 06:30:03 PM
But no matter what I try to use for a final field format the result of that
data after it's imported displays the same time for every record >> 12:00:00
AM <<. The date comes through fine, but it just does not seem to recognize
the time. What do I need to do to get the time to be imported correctly ?
It appears that the time is not included as part of the date data.
Is the date/time field enclosed in single quotes? (Such as: '09/20/2006
06:30:03 PM') This is a non-standard date format, having two spaces between
the date and time portions, as well as a space between the time and the
AM/PM indicator.
Please post an EXACT excerpt from the import file so that we can visually
see the data to determine if there are problems that are causing a
'mis-load'.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:eXDUZT1AHHA.4472@.TK2MSFTNGP03.phx.gbl...
> Using SQL2005 DTS - I am trying to import data from a CSV file into a
> table created with the following
> CREATE TABLE [maint].[dbo].[SpaceAnalysis_v2] (
> [Date-Time] datetime,
> [Server] text,
> [Drive] text,
> [Drive Size] numeric(29,0),
> [Space Free] numeric(29,0)
> )
> the first field is date and time and looks like this >>
> 09/20/2006 06:30:03 PM
> But no matter what I try to use for a final field format the result of
> that data after it's imported displays the same time for every record >>
> 12:00:00 AM <<. The date comes through fine, but it just does not seem
> to recognize the time. What do I need to do to get the time to be
> imported correctly ?
>
|||As I paste this in here I just realized that my first post was not
absolutely correct, sorry I was looking at the file through excel.
Thanks for your time Arnie, here are the first 2 lines as
displayed using notepad>>
9/19/2006 16:50,EXCEDE,C,36265226240,14397304832
9/19/2006 16:50,EXCEDE,D,147000000000,41808166912
======================================
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:O8sLGE3AHHA.3560@.TK2MSFTNGP04.phx.gbl...
> It appears that the time is not included as part of the date data.
> Is the date/time field enclosed in single quotes? (Such as: '09/20/2006
> 06:30:03 PM') This is a non-standard date format, having two spaces
> between the date and time portions, as well as a space between the time
> and the AM/PM indicator.
> Please post an EXACT excerpt from the import file so that we can visually
> see the data to determine if there are problems that are causing a
> 'mis-load'.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:eXDUZT1AHHA.4472@.TK2MSFTNGP03.phx.gbl...
>

datetime conversion question

Using SQL2005 DTS - I am trying to import data from a CSV file into a table
created with the following
CREATE TABLE [maint].[dbo].[SpaceAnalysis_v2] (
[Date-Time] datetime,
[Server] text,
[Drive] text,
[Drive Size] numeric(29,0),
[Space Free] numeric(29,0)
)
the first field is date and time and looks like this >>
09/20/2006 06:30:03 PM
But no matter what I try to use for a final field format the result of that
data after it's imported displays the same time for every record >> 12:00:00
AM <<. The date comes through fine, but it just does not seem to recognize
the time. What do I need to do to get the time to be imported correctly ?It appears that the time is not included as part of the date data.
Is the date/time field enclosed in single quotes? (Such as: '09/20/2006
06:30:03 PM') This is a non-standard date format, having two spaces between
the date and time portions, as well as a space between the time and the
AM/PM indicator.
Please post an EXACT excerpt from the import file so that we can visually
see the data to determine if there are problems that are causing a
'mis-load'.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:eXDUZT1AHHA.4472@.TK2MSFTNGP03.phx.gbl...
> Using SQL2005 DTS - I am trying to import data from a CSV file into a
> table created with the following
> CREATE TABLE [maint].[dbo].[SpaceAnalysis_v2] (
> [Date-Time] datetime,
> [Server] text,
> [Drive] text,
> [Drive Size] numeric(29,0),
> [Space Free] numeric(29,0)
> )
> the first field is date and time and looks like this >>
> 09/20/2006 06:30:03 PM
> But no matter what I try to use for a final field format the result of
> that data after it's imported displays the same time for every record >>
> 12:00:00 AM <<. The date comes through fine, but it just does not seem
> to recognize the time. What do I need to do to get the time to be
> imported correctly ?
>|||As I paste this in here I just realized that my first post was not
absolutely correct, sorry I was looking at the file through excel.
Thanks for your time Arnie, here are the first 2 lines as
displayed using notepad>>
9/19/2006 16:50,EXCEDE,C,36265226240,14397304832
9/19/2006 16:50,EXCEDE,D,147000000000,41808166912
======================================"Arnie Rowland" <arnie@.1568.com> wrote in message
news:O8sLGE3AHHA.3560@.TK2MSFTNGP04.phx.gbl...
> It appears that the time is not included as part of the date data.
> Is the date/time field enclosed in single quotes? (Such as: '09/20/2006
> 06:30:03 PM') This is a non-standard date format, having two spaces
> between the date and time portions, as well as a space between the time
> and the AM/PM indicator.
> Please post an EXACT excerpt from the import file so that we can visually
> see the data to determine if there are problems that are causing a
> 'mis-load'.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:eXDUZT1AHHA.4472@.TK2MSFTNGP03.phx.gbl...
>> Using SQL2005 DTS - I am trying to import data from a CSV file into a
>> table created with the following
>> CREATE TABLE [maint].[dbo].[SpaceAnalysis_v2] (
>> [Date-Time] datetime,
>> [Server] text,
>> [Drive] text,
>> [Drive Size] numeric(29,0),
>> [Space Free] numeric(29,0)
>> )
>> the first field is date and time and looks like this >>
>> 09/20/2006 06:30:03 PM
>> But no matter what I try to use for a final field format the result of
>> that data after it's imported displays the same time for every record >>
>> 12:00:00 AM <<. The date comes through fine, but it just does not seem
>> to recognize the time. What do I need to do to get the time to be
>> imported correctly ?
>