![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I notice when I do a backup on a database with the following begin declare vDest varchar (240); declare vDay varchar (20); set vDay = convert (char (1), datepart (weekday, current date)) || datename (weekday, current date); set vDest = 'C:\\Backup\\' || vDay; VALIDATE DATABASE; BACKUP DATABASE DIRECTORY vDest TRANSACTION LOG RENAME; end I get log files in the same directory as the database. i.e. 090902AA.txt for yesterday, 090903AA.txt for today Is there any neat way of disposing of these files, we might want to keep just the current days log file.........we don't want one every day. Also I notice when I open one of these log files, it contains undisplayable characters in notepad....don't know why |
#3
| |||
| |||
|
|
When you use TRANSACTION LOG RENAME, it does two things: 1. copies the current transaction log to the backup directory 2. renames the current transaction log and saves it to the current directory thanks Kory |
#4
| |||
| |||
|
|
On 3 Sep, 16:39, "Kory Hodgson (Sybase iAnywhere)" khodgson (AT) A_SPAM_FREE_sybase (DOT) com> wrote: When you use TRANSACTION LOG RENAME, it does two things: 1. copies the current transaction log to the backup directory 2. renames the current transaction log and saves it to the current directory thanks Kory we could just take out the TRANSACTION LOG RENAME i suppose. why would anyone want to rename the transaction log, is there a benefit in doing so. Is there a logical reason why someone would want to rename it ? I'm asking dumb questions here.....I know We got the code from Sybase for doing our backup--- |
#5
| |||
| |||
|
|
Usually this is used when the database is part of a replicating environment. This way the old transaction logs are still available for replication. Roshintoshwrote: On 3 Sep, 16:39, "Kory Hodgson (Sybase iAnywhere)" khodgson (AT) A_SPAM_FREE_sybase (DOT) com> wrote: When you use TRANSACTION LOG RENAME, it does two things: 1. copies the current transaction log to the backup directory 2. renames the current transaction log and saves it to the current directory thanks Kory we could just take out the TRANSACTION LOG RENAME i suppose. why would anyone want to rename the transaction log, is there a benefit in doing so. Is there a logical reason why someone would want to rename it ? *I'm asking dumb questions here.....I know We got the code from Sybase for doing our backup---- Hide quoted text - - Show quoted text - |
#6
| |||
| |||
|
|
Yes its a replicating environment. If we take out TRANSACTION LOG RENAME, what negative consequences could it have ? Old transaction logs would not be available for replication, should we keep old transaction logs indefinitely then ? If we take out TRANSACTION LOG RENAME, would some transaction logs be lost, surely they would still be part of the main log file ? On 3 Sep, 22:02, "Kory Hodgson (Sybase iAnywhere)" khodgson (AT) A_SPAM_FREE_sybase (DOT) com> wrote: Usually this is used when the database is part of a replicating environment. This way the old transaction logs are still available for replication. Roshintoshwrote: On 3 Sep, 16:39, "Kory Hodgson (Sybase iAnywhere)" khodgson (AT) A_SPAM_FREE_sybase (DOT) com> wrote: When you use TRANSACTION LOG RENAME, it does two things: 1. copies the current transaction log to the backup directory 2. renames the current transaction log and saves it to the current directory thanks Kory we could just take out the TRANSACTION LOG RENAME i suppose. why would anyone want to rename the transaction log, is there a benefit in doing so. Is there a logical reason why someone would want to rename it ? I'm asking dumb questions here.....I know We got the code from Sybase for doing our backup---- Hide quoted text - - Show quoted text - |
#7
| ||||
| ||||
|
|
Yes its a replicating environment. |
|
If we take out TRANSACTION LOG RENAME, what negative consequences could it have ? |
|
Old transaction logs would not be available for replication, should we keep old transaction logs indefinitely then ? |
|
If we take out TRANSACTION LOG RENAME, would some transaction logs be lost, surely they would still be part of the main log file ? |

#8
| |||
| |||
|
|
Yes its a replicating environment. |
![]() |
| Thread Tools | |
| Display Modes | |
| |