RetainDays Property Of Backup Statement
Aug 19, 2006
According to SQL Server 2005 Books Online, the RetainDays property specifies the number of days that must elapse before a backup set can be overwritten.
I do not quite understand the implication of this property. Say, if I set RetainDays = 1, is it mean the backup set from yesterday MAY BE overwritten? If it is 'may be', how does SQL Server determines whether to overwrite or not? I tried RetainDays = 1 to backup a dummy database, but my test.bak keeps growing, the old files do not seem to be overwritten. Besides, what is the implication of accepting the default RetainDays = 0?
View 4 Replies
ADVERTISEMENT
Dec 7, 2001
I need to have RETAINDAYS=6hours on a backup command. How can I code that,seems like it should be in integer only,any work-around to have the retain days only few hours(less than a day)?
View 1 Replies
View Related
Apr 18, 2006
Hi all;
I need to make daily backups to a computer in another domain, where I can't map a drive, so I use the TSQL to create a dump device, which works fine:
EXEC sp_addumpdevice 'disk', 'MyBackupDevice', [ipaddress & directory/file]
Then I schedule a server job which faithfully backs up my database, with one hitch - it never deletes days older than 5 as per the code - it just keeps growing. The command couldn't be much simpler:
BACKUP DATABASE ProductionETC to MyBackupDevice WITH RETAINDAYS = 5
For now, I just create a new backup device every now and then and go back and forth, deleting the oldest one when I create a new one. But it's annoying! Any ideas what I'm doing wrong?
Thanks,
L. Rap
View 4 Replies
View Related
Aug 20, 2007
I am getting an error, "Set property Devices to accomplish this action." when doing a backup with SQL Server 2005 Express when I try to do a full (or Differential) backup through the SQL Server Management Studio. I'm using the backup defaults in the GUI and was able to back up the database a couple of days ago without any problem. Today (second time) it just comes up with this error and I have been able to find anything that talks about what it might be.
I tired to look at the script by using the "Script action to new query, file, clipboard, etc." but it fails before it creates the script in any destination. I've rebooted the server and that didn't help.
I found one similar post on this forum but it had no resolution. Any direction on this problem would be greatly appreciated.
Thank you,
Steve
View 10 Replies
View Related
Dec 20, 2005
RETAINDAYS option in BACKUP command.
SqlServer2000 (standard) on Win xp server.
Old backups are not being removed from backup sets.
I've created logical dumpdevices which maps to a physical file on disk - using sp_adddumpdevice. Regular, scheduled backups are successfully written to the backup sets (Complete, differential & Tlog) - This works fine and I can restore from them OK.
I've set the RETAINDAYS option of BACKUP command to keep backups for varying periods (eg full = 8 days, diff = 2 days, and Tlog = 1 day).
When the backups are viewed by 'drilling down' thru >Backup > open backupdevice > view contents.... all previous backups are still available even though their expiry date has passed.
The backup set files (dumpdevice files) are getting inexorably bigger and will eventually fill the available disks !
I don't want to delete or overwrite the entire contents of the backup set - just those backups more than 8 days old.
I've run sp_configure 'media_retention' 1 RECONFIGURE WITH OVERRIDE
but the old backups are still there.
dbs are getting ever bigger (high activity OLTP system) currently 2 production dbs totaling 50 GB.
Is this a bug? - ie. the option to set a retention period even though I'm writing to a logical 'dump device' rather than a normal *.BAK / *.TRN file?
or Am I doing something wrong?
HELP.
Cris Yarker
email to crispin@paymentsystemsltd.com
View 3 Replies
View Related
Sep 20, 2007
I am trying to add a case/select/if statement in the text color property of reporting services. I want it so if the value of a variable is 1 then "GREEN" else "RED". Any ideas?
View 1 Replies
View Related
May 22, 2007
Hi
Can we have truncate table with in a transaction using SSIS package.
here is the scenario.
OledbDestinationConnection 's "retainsameconnection" property has been set to true.
I have added a Execute SQL Query task to "begin transaction".
second Execute SQL Query task to truncate a table. say table "A" . truncate table a(table does not exists in the database).
third to rollback a transactions if the second task fails.
Now when I am running my package, I am getting an error saying
The Rollback transaction has no corresponding "Begin transaction".
However if , I truncate a correct table , which exists in database, then all steps gets executed successfully.
And the truncaion also got rollbacked.Same goes with "Commit transaction" in the third steps(if a replace Rollback with Commit).
I don't understand this strange behavior.
Any clue is highly appreciated.
My real problem is I want to rollback a transaction, if Truncate table step fails.
View 14 Replies
View Related
Feb 9, 2004
Hi,
I use the Transact-SQL BACKUP statement in Visual Basic to backup my local MSSQL Database. It give me this error
Error 3041
BACKUP failed to complete the command BACKUP DATABASE [BCFPC] to BCFPCBKP
I already created a backup device called BCFPCBKP and it is backup to the disk.
I tried to run the same BACKUP statement in SQL Query Analyzer and it worked fine. I tried to run my VB application in another PC. It worked fine when i use this command remotely. Can anyone tell me what's the problem?
Thanks in advance
regards,
M.Y. Yap
View 2 Replies
View Related
Jun 16, 2006
I am having problems exporting data into a flat file using specific code page. My application has a variable "User::CodePage" that stores code page value (936, 950, 1252, etc) based on the data source. This variable is assigned to the CodePage property of desitnation file connection using Property expression.
But, when I execute the package, the CodePage property of the Destination file connection defaults to the initial value that was set for "User:CodePage" variable in design mode. I checked the value within the variable during runtime and it changes correctly for each data source. But, the property of the destinatin file connection doesn't change and results in an error.
[Flat File Destination [473]] Error: Data conversion failed. The data conversion for column "Column01" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
[DTS.Pipeline] Error: The ProcessInput method on component "Flat File Destination" (473) failed with error code 0xC02020A0. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.
If I manually update the variable with correct code page and re-run the ETL, everything works fine. Just that it doesn't work during run-time mode.
Can someone please help me resolve this.
Thanks much.
View 5 Replies
View Related
Apr 17, 2008
Hi,
I developed a simple custom control flow component which has several read/write properties and one readonly property (lets call it ROP) whichs Get method simple returns the value of a private variable (VAR as string). In the Execute method the VAR has a value assigened. When I put the value of ROP or VAR into MsgBox I can see the correct value. However when I execute the component I can not see the value of the ROP in the property window. I see the property but its value is empty string. For example when I put a breakpoint to postexecute or check the property before click OK in a MsgBox I would expect that the property value would be updated in SSIS as well. Is there a way how to display correct values of custom tasks properties in property window?
Thanks for any hints.
View 3 Replies
View Related
May 7, 2008
Untill recently I had a smooth running SSIS package,but suddenly it throws error syaing
"OnError,,,,,,,The result of the expression
"@[User:trTextFileImpDirectory] +"SomeTextStringHere"+ @[User:trANTTextFileName] +(DT_STR,30,1252) @[User:taging_Date_Key]+ "SomeTextStringHere"
" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property."
I have child SSIS package running under a parent package (through execute package task)
I have few flat file connection managers in child package for text file import , in which I am building text file path dynamically at run time by assigning an expression in connection string property of connection manager.
The Expression is as follows
"@[User:trTextFileImpDirectory] +"SomeTextStringHere."+ @[User:trANTTextFileName] +(DT_STR,30,1252) @[User:taging_Date_Key]+ +"SomeTextStringHere"
Where @[User:trTextFileImpDirectory] is a variable which contains path of directory containg text
files.Value in this variable is assigned at runtime from parent package's variable,which in turns fetch
value from a configuration file on local server.
With my current configuration this path has been configured to some other server's directory over network ( I.e my package picks text files from some other servers folder over network)
While
"Some string here"+ @[User:trANTTextFileName]" part of file name string.
(DT_STR,30,1252) @[User:taging_Date_Key] Contain the date of processing ,value in this variable is also picked up at run time from parent package variable.
1) So can someone give me some insight into possible reason of failures.
2) Is it possible that problem arises if directory (from which I m picking text files) is assigned password or is there exist some problem in accessing forlders over network ?
3) Or there can be some problem in package configuration at design time( I.e where I m assigning value in variable from parent package vriables)?
View 10 Replies
View Related
Aug 23, 2006
I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.
Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.
Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.
Is this an intrinsic issue?
View 2 Replies
View Related
May 7, 2008
Hi All,
SQL newbie here. I just looked at my Job Activity monitor and found that my Transaction log backups are failing. I looked at the error and it read as follows:
Executing the query "BACKUP LOG [OperationsManager] TO DISK = N'D:\SQL\MSSQL.1\MSSQL\Backup\OperationsManager\OperationsManager_backup_200805061000.trn' WITH RETAINDAYS = 1, NOFORMAT, NOINIT, NAME = N'OperationsManager_backup_20080506100001', SKIP, REWIND, NOUNLOAD, STATS = 10
" failed with the following error: "The statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
I read some of the posts regarding this error, but I am not sure how to do the steps. How do I change the recovery model? I am new to this so I have no clue how to do this.
Any help would be greatly appreciated.
Thank you.
View 8 Replies
View Related
Feb 15, 2007
Hello,
I have a group I'll call G4.
The header table row for G4 contains 3 textboxes containing the sums of the contents within G4. The header table row for G4 is visible while it's contents, including the G4 footer table row, is kept invisible until the report user drills down into the group.
When the report user drills down into G4 the footer table row becomes visible and the sums of the contents of the group are displayed for a second time.
At this point I want the sums in the header to be set to invisible when the sums in the footer are made visible by the drilldown.
When I try to reference the hidden property of textbox66 in the G4 footer in order to set the hidden property of header textbox57 in the G4 header I get to this point...
=IIF(reportitems!textbox66.
When it fails to give me an option of choosing the .Hidden property and instead only gives me a .Value.
If I complete the IIF statement manually so that it spells out .....
=IIF(ReportItems!Textbox66.Hidden = False, True, False)
...the report chokes on it.
So my question is, how do I reference the hidden property of one or more textboxes in a group to use as condition checks to set the hidden property of another textbox in that same group?
Thank you for any help you can provide. We are only now beginning to implement reporting services and I have not yet had the chance to research this in greater detail for lack of time.
View 1 Replies
View Related
Apr 22, 2015
Wanted to check if there's any option to suppress message after the database backup statement is run like we have in dbcc checkdb by using NO_INFOMSGS?
Processed 448 pages for database 'master', file 'master' on file 1.
Processed 2 pages for database 'master', file 'mastlog' on file 1.
BACKUP DATABASE successfully processed 450 pages in 0.100 seconds (35.151 MB/sec).
Processed 280 pages for database 'model', file 'modeldev' on file 1.
Processed 2 pages for database 'model', file 'modellog' on file 1.
BACKUP DATABASE successfully processed 282 pages in 0.036 seconds (60.994 MB/sec).
Processed 1992 pages for database 'msdb', file 'MSDBData' on file 1.
Processed 1 pages for database 'msdb', file 'MSDBLog' on file 1.
View 0 Replies
View Related
May 10, 2008
i have a database names "students" in SQL server 2000. is there any TSQL statement to make a backup of the student databse in to a sspecific location ??????????
pls help
View 4 Replies
View Related
Jun 3, 2015
Here's my statement below. What I'm trying to get is joining the name column in master.sys.databases with a sub query for the database name, file location and backup start date from the MSDB database. The reason for this, if a new database has never been backed up, It should be returning as a NULL value, which is my goal. However, I'm getting multiple results for the backups.
select CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server,a.name,File_Location=b.physical_device_name,backup_start_date=max(backup_start_date)
from master.sys.databases a
left join(select c.database_name,backup_start_date=max(backup_start_date),b.physical_device_name
from msdb.dbo.backupmediafamily b join msdb.dbo.backupset c on c.media_set_id=c.backup_set_id
where c.type='D'
[Code] .....
View 8 Replies
View Related
Feb 14, 2008
question 1:
i found that database log file can contain more records after performing backup database statement.
for example:
i create a database and limit the log file to 2mb. then i create a table and insert data.
If i backup the database before i insert data , the database file can contain 192 records unitl the log file is full.
If i don't perform the 'backup database' statement.
The 'dbcc sqlperf(logspace)' indicate the utilization ratio is less than 40% after inserting 192 records
why?
I list my code:
Code Snippet
create database db_test
on primary
(
name=db_test,
filename='C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatadb_test.mdf'
)
log on
(
name=db_test_log,
filename='C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatadb_test_log.ldf',
maxsize=2mb
)
go
backup database db_test to disk='db_test.bak' --- if i don't execute this line, log file can contain a lot of record
go
create table db_test..table1(col char(8000))
--insert data to fill up the database log
declare @n int
set @n=0
while @n<192
begin
insert into db_test..table1 values(replicate('a',8000))
set @n=@n+1
end
question 2:
i create a database and limit the log file to 2mb. Then i create a table and insert data in an endless loop.
After the inserting operation executing for a while, the 9002 error occurs, indicate the log file for the database is full.
But the 'dbcc sqlperf(logspace)' command indicate the unilization ratio is low, and log_reuse_wait_desc in sys.database is 'CHECKPOINT'
And I can insert data , and i'm sure the state of log_use_wait_desc is 'CHECKPOINT'.
As i known, the checkpoint can't truncate log under full recovery model. Only the back log operation can truncate the transaction log.
So log is not full, why 9002 error is encounterd. and why the log_reuse_wait_desc return 'CHECKPOINT'?
I list my code:
Code Snippet
create database db_test
on primary
(
name=db_test,
filename='C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatadb_test.mdf'
)
log on
(
name=db_test_log,
filename='C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatadb_test_log.ldf',
maxsize=2mb
)
go
create table db_test..table1(col char(8000))
--insert data to fill up the database log
declare @n int
set @n=0
while @n<>-1
begin
insert into db_test..table1 values(replicate('a',8000))
end
any suggestions?
thanks in advance.
View 5 Replies
View Related
Jan 31, 2008
Hi there
I'm getting this message on my third automated backup of the transaction logs of the day. Both databases are in full recovery mode, both successfully backed up at 01.00. The transaction logs backed up perfectly happily at 01:30 and 05:30, but failed at 09:30.
The only difference between 05:30 and 09:30's backups is that the log files were shrunk at 08:15 (the databases in question are the ones that sit under ILM2007, and keeping the log files small keeps the system running better).
Is it possible that shrinking the log files causes the database to think that there hasn't been a full database backup?
Thanks
Jane
View 3 Replies
View Related
Jun 28, 2006
I am having trouble initializing my connection. This is the code:
Dim
DBConnPhone As New
SqlConnection(ConfigurationManager.AppSettings("DBConnPhone"))
Dim DBConnClient As New
SqlConnection(ConfigurationManager.AppSettings("DBConnClient"))
Dim Sqlcomm1 As New SqlCommand
Dim Sqlcomm2 As New SqlCommand
DBConnPhone.Open()
DBConnClient.Open()
Once I start debugging, it stops and give me the error "The ConnectionString Property was not initialized" Any suggestions?
View 4 Replies
View Related
Feb 14, 2007
Hi, After many nights without sleep I'm not seeing this? Can anyone help why I'm getting a ConnectionString Property not set error? thanks!
Dim Sconn As StringDim DBCon As New Data.SqlClient.SqlConnectionSconn = ConfigurationManager.AppSettings("LocalSqlServer")DBCon = New SqlClient.SqlConnection(Sconn)Dim cmdCommand As New Data.SqlClient.SqlCommand
'Dont forget to instantiate a connection object
cmdCommand.Connection = DBConDBCon.Open()
View 18 Replies
View Related
Jun 6, 2007
I would like to create table by T-SQLand need to specify DescriptionBut I can't find any sample to add Description property by T-SQL Additionally, I also would like modify Description property by T-SQL. What can I do ????? Please help me ......
View 2 Replies
View Related
Jul 6, 2007
Hello friends,
I am using sql server 2005. In some tables to create the column Autoincrement I had set the 'Idetity Specification' property to 'Yes'. I want to know that how can we do it through sql scripts i.e. by writing query.
Please let me know
Thanks & RegardsGirish Nehte
View 6 Replies
View Related
May 7, 2008
I'm trying to see the properties of a database and I'm getting the following error, even when trying to connect as sa.
Property Owner is not available for Database '[EPro]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.
any ideas? thanks in advance
View 1 Replies
View Related
May 24, 2008
hi,
whether there is any server property to remove lines while viewing the records in text mode
sample data:
select * from Employee
sno ename
--- ------
1 aaa
2 nnn
i need to remove the below the sno and ename column
View 11 Replies
View Related
Jun 12, 2006
I am use Reporting services 2000 SP2 and discover that the LineHeight property rendered correctly only in renderers for HTML output. PDF renderer, TIFF renderer and client side printing client do not render changes in this property at all.
Is it bug in Reporting services 2000?
Can someone try to change LineHeight property in SQL Server 2005 Reporting services and verify rendering output?
View 3 Replies
View Related
Nov 9, 2006
Hello.
within a data flow task I have two OLE DB sources that I am attempting to put into a merge join.
When I connect them to the merge join transformation I get the following error:
The IsSorted property must be set to true on both sources of this transformation.
I understand what this means but I cannot see an IsSorted option in the properties of the OLE DB sources so I can't set it. Can you tell me where it is? for the time being I'm having to put a sort transform in to get it to work.
Thanks
View 13 Replies
View Related
Oct 31, 2006
hi,
Can anyone tell me how to use the extended stored property like sp_addextendedproperty in java code?
Thanks,
Meghna
View 2 Replies
View Related
Mar 30, 2007
Dear friends,
Every time i open the jobs propertimes on server, it changes the sql server login to windows from sql authentication. also the properties i set at the time of creating a job had given me an option to select the run as user but from that moment the option has gone, whats that all about?
thanks,
View 5 Replies
View Related
Jan 3, 2007
We want to use our styles say "mystyle" on a report. I am surprised that we do not have cssstylename as a property for a textbox?
Ideally, i should be able to add that style in the styles.css file and reference the style name on the textbox. All that would be needed is that it would add an attribute to the rendered html. I wonder if it already exists and i am missing some information?
View 3 Replies
View Related
Sep 28, 2006
hi everyone,
According the information provided by BIDS if it have false anulates any message such as msgbox or something like that from the ssis execution. is it true?
TIA
View 1 Replies
View Related
Sep 14, 2007
I'm trying to figure out this repeatwith property setting. I have a row of textboxes that are labels at the top of the body of my report. Under this row is a list box "LstCategory" with a sublist "SubLstCategory". I set the repeatwith to LstCategory.
When I preview the report in VS it doesn't. When I publish this report in Report Manager it does. When I export from Report Manager (In PDF Format) it doesn't.
What do I have to do so it will repeat in Reporting Services?
Is it normal that In Report Manager that what you view does not export the same way?
I'm new at this altogether. About 4 months in SQL and 1 month with Reporting Services. So be gentle.
Regards,
Card Gunner
View 4 Replies
View Related
Aug 23, 2013
On the SQL Server the Event Viewer shows the same messages and errors every evening between 22:05:00 and 22:08:00. The following information messages are shown for every database:
"I/O is frozen on database <database name>. No user action is required. However, if I/O is not resumed promptly, you could cancel the backup."
"I/O was resumed on database <database name>. No user action is required."
"Database backed up. Database: <database name>, creation date(time): 2003/04/08(09:13:36), pages dumped: 306, first LSN: 44:148:37, last LSN: 44:165:1, number of dump devices: 1, device information: (FILE=1, TYPE=VIRTUAL_DEVICE: {'{A79410F7-4AC5-47CE-9E9B-F91660F1072B}4'}). This is an informational message only. No user action is required."
After the 3 messages the following error message is shown for every database:
"BACKUP failed to complete the command BACKUP LOG <database name>. Check the backup application log for detailed messages."
I have added a Maintenance Plan but these jobs run after 02:00:00 at night.
Where can I find the command or setup which will backup all databases and log files at 22:00:00 in the evening?
View 9 Replies
View Related