Hi,
we have about 12 databases in an MSDE server.
We can install the enterprise manager, but cant get the maintenance plans to work. (fields stay empty and setting dont get saved)
I've searched a bit, but couldn't fix it.
No problem, i created a job, with 12 T-SQL commands, and the backups are working perfect.
Now we wanne backup with a history (we take a backup every 4 hours of the day), because now they always get overwritten.
So im trying to change my transactSQL to create dynamic files.
The code i'm using right now :
BACKUP DATABASE PW0001A00 TO DISK = 'C:\SQLBACKUP\PW0001A00.BAK' WITH INIT, NOUNLOAD, NOSKIP, STATS=10, NOFORMAT
I've tried different things like
BACKUP DATABASE PW0001A00 TO DISK = 'C:\SQLBACKUP\PW0001A00' + DATEPART(month, GETDATE()) + '.BAK' WITH INIT, NOUNLOAD, NOSKIP, STATS=10, NOFORMAT
but nothing worked.
so basically I wanne be able to create dynamic filenames in the above command.
You got any ideas/solutions.
tnx.Take Umachander's http://www.umachandar.com/technical/SQL70Scripts/Main30.htm solution in this case.|||thank you.
i'll try that solution. looks good. :-)
Showing posts with label empty. Show all posts
Showing posts with label empty. Show all posts
Friday, February 24, 2012
Thursday, February 16, 2012
backup log files empty?
I'm using Lumigent Log Explorer to view logs of a database. But the result I
got was 'No log records found that match your selection'. I did not use any
filters.
In Enterprise Manager, View Content can list all the backups including log
backups in a backup file fine. From my understanding, no log backups would
have been made if no transactions had taken place. Is that right? Does SQL
back up logs anyway no matter whether or not there is a transaction?
Anybody want to help me understand this?
Thanks a lot.
Bing
Hi
If you tell it to make a backup, and there were no log records, SQL Server
still will makes a backup of some meta data that it always backups. LSN will
increment. You will notice a file < 50kb.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bing" <bing@.discussions.microsoft.com> wrote in message
news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
> I'm using Lumigent Log Explorer to view logs of a database. But the
> result I
> got was 'No log records found that match your selection'. I did not use
> any
> filters.
> In Enterprise Manager, View Content can list all the backups including log
> backups in a backup file fine. From my understanding, no log backups
> would
> have been made if no transactions had taken place. Is that right? Does
> SQL
> back up logs anyway no matter whether or not there is a transaction?
> Anybody want to help me understand this?
> Thanks a lot.
> Bing
|||Ah, I see. Thanks much for the very helpful information.
Bing
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> If you tell it to make a backup, and there were no log records, SQL Server
> still will makes a backup of some meta data that it always backups. LSN will
> increment. You will notice a file < 50kb.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
>
>
got was 'No log records found that match your selection'. I did not use any
filters.
In Enterprise Manager, View Content can list all the backups including log
backups in a backup file fine. From my understanding, no log backups would
have been made if no transactions had taken place. Is that right? Does SQL
back up logs anyway no matter whether or not there is a transaction?
Anybody want to help me understand this?
Thanks a lot.
Bing
Hi
If you tell it to make a backup, and there were no log records, SQL Server
still will makes a backup of some meta data that it always backups. LSN will
increment. You will notice a file < 50kb.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bing" <bing@.discussions.microsoft.com> wrote in message
news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
> I'm using Lumigent Log Explorer to view logs of a database. But the
> result I
> got was 'No log records found that match your selection'. I did not use
> any
> filters.
> In Enterprise Manager, View Content can list all the backups including log
> backups in a backup file fine. From my understanding, no log backups
> would
> have been made if no transactions had taken place. Is that right? Does
> SQL
> back up logs anyway no matter whether or not there is a transaction?
> Anybody want to help me understand this?
> Thanks a lot.
> Bing
|||Ah, I see. Thanks much for the very helpful information.
Bing
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> If you tell it to make a backup, and there were no log records, SQL Server
> still will makes a backup of some meta data that it always backups. LSN will
> increment. You will notice a file < 50kb.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
>
>
backup log files empty?
I'm using Lumigent Log Explorer to view logs of a database. But the result
I
got was 'No log records found that match your selection'. I did not use any
filters.
In Enterprise Manager, View Content can list all the backups including log
backups in a backup file fine. From my understanding, no log backups would
have been made if no transactions had taken place. Is that right? Does SQL
back up logs anyway no matter whether or not there is a transaction?
Anybody want to help me understand this?
Thanks a lot.
BingHi
If you tell it to make a backup, and there were no log records, SQL Server
still will makes a backup of some meta data that it always backups. LSN will
increment. You will notice a file < 50kb.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bing" <bing@.discussions.microsoft.com> wrote in message
news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
> I'm using Lumigent Log Explorer to view logs of a database. But the
> result I
> got was 'No log records found that match your selection'. I did not use
> any
> filters.
> In Enterprise Manager, View Content can list all the backups including log
> backups in a backup file fine. From my understanding, no log backups
> would
> have been made if no transactions had taken place. Is that right? Does
> SQL
> back up logs anyway no matter whether or not there is a transaction?
> Anybody want to help me understand this?
> Thanks a lot.
> Bing|||Ah, I see. Thanks much for the very helpful information.
Bing
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> If you tell it to make a backup, and there were no log records, SQL Server
> still will makes a backup of some meta data that it always backups. LSN wi
ll
> increment. You will notice a file < 50kb.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
>
>
I
got was 'No log records found that match your selection'. I did not use any
filters.
In Enterprise Manager, View Content can list all the backups including log
backups in a backup file fine. From my understanding, no log backups would
have been made if no transactions had taken place. Is that right? Does SQL
back up logs anyway no matter whether or not there is a transaction?
Anybody want to help me understand this?
Thanks a lot.
BingHi
If you tell it to make a backup, and there were no log records, SQL Server
still will makes a backup of some meta data that it always backups. LSN will
increment. You will notice a file < 50kb.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bing" <bing@.discussions.microsoft.com> wrote in message
news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
> I'm using Lumigent Log Explorer to view logs of a database. But the
> result I
> got was 'No log records found that match your selection'. I did not use
> any
> filters.
> In Enterprise Manager, View Content can list all the backups including log
> backups in a backup file fine. From my understanding, no log backups
> would
> have been made if no transactions had taken place. Is that right? Does
> SQL
> back up logs anyway no matter whether or not there is a transaction?
> Anybody want to help me understand this?
> Thanks a lot.
> Bing|||Ah, I see. Thanks much for the very helpful information.
Bing
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> If you tell it to make a backup, and there were no log records, SQL Server
> still will makes a backup of some meta data that it always backups. LSN wi
ll
> increment. You will notice a file < 50kb.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
>
>
backup log files empty?
I'm using Lumigent Log Explorer to view logs of a database. But the result I
got was 'No log records found that match your selection'. I did not use any
filters.
In Enterprise Manager, View Content can list all the backups including log
backups in a backup file fine. From my understanding, no log backups would
have been made if no transactions had taken place. Is that right? Does SQL
back up logs anyway no matter whether or not there is a transaction?
Anybody want to help me understand this?
Thanks a lot.
BingHi
If you tell it to make a backup, and there were no log records, SQL Server
still will makes a backup of some meta data that it always backups. LSN will
increment. You will notice a file < 50kb.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bing" <bing@.discussions.microsoft.com> wrote in message
news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
> I'm using Lumigent Log Explorer to view logs of a database. But the
> result I
> got was 'No log records found that match your selection'. I did not use
> any
> filters.
> In Enterprise Manager, View Content can list all the backups including log
> backups in a backup file fine. From my understanding, no log backups
> would
> have been made if no transactions had taken place. Is that right? Does
> SQL
> back up logs anyway no matter whether or not there is a transaction?
> Anybody want to help me understand this?
> Thanks a lot.
> Bing|||Ah, I see. Thanks much for the very helpful information.
Bing
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> If you tell it to make a backup, and there were no log records, SQL Server
> still will makes a backup of some meta data that it always backups. LSN will
> increment. You will notice a file < 50kb.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
> > I'm using Lumigent Log Explorer to view logs of a database. But the
> > result I
> > got was 'No log records found that match your selection'. I did not use
> > any
> > filters.
> >
> > In Enterprise Manager, View Content can list all the backups including log
> > backups in a backup file fine. From my understanding, no log backups
> > would
> > have been made if no transactions had taken place. Is that right? Does
> > SQL
> > back up logs anyway no matter whether or not there is a transaction?
> >
> > Anybody want to help me understand this?
> >
> > Thanks a lot.
> >
> > Bing
>
>
got was 'No log records found that match your selection'. I did not use any
filters.
In Enterprise Manager, View Content can list all the backups including log
backups in a backup file fine. From my understanding, no log backups would
have been made if no transactions had taken place. Is that right? Does SQL
back up logs anyway no matter whether or not there is a transaction?
Anybody want to help me understand this?
Thanks a lot.
BingHi
If you tell it to make a backup, and there were no log records, SQL Server
still will makes a backup of some meta data that it always backups. LSN will
increment. You will notice a file < 50kb.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bing" <bing@.discussions.microsoft.com> wrote in message
news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
> I'm using Lumigent Log Explorer to view logs of a database. But the
> result I
> got was 'No log records found that match your selection'. I did not use
> any
> filters.
> In Enterprise Manager, View Content can list all the backups including log
> backups in a backup file fine. From my understanding, no log backups
> would
> have been made if no transactions had taken place. Is that right? Does
> SQL
> back up logs anyway no matter whether or not there is a transaction?
> Anybody want to help me understand this?
> Thanks a lot.
> Bing|||Ah, I see. Thanks much for the very helpful information.
Bing
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> If you tell it to make a backup, and there were no log records, SQL Server
> still will makes a backup of some meta data that it always backups. LSN will
> increment. You will notice a file < 50kb.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:60139E6F-5AB8-43C1-B883-0CCD515819FF@.microsoft.com...
> > I'm using Lumigent Log Explorer to view logs of a database. But the
> > result I
> > got was 'No log records found that match your selection'. I did not use
> > any
> > filters.
> >
> > In Enterprise Manager, View Content can list all the backups including log
> > backups in a backup file fine. From my understanding, no log backups
> > would
> > have been made if no transactions had taken place. Is that right? Does
> > SQL
> > back up logs anyway no matter whether or not there is a transaction?
> >
> > Anybody want to help me understand this?
> >
> > Thanks a lot.
> >
> > Bing
>
>
Subscribe to:
Posts (Atom)