DB Backup File Purge

Apr 25, 2002

Anyone have anything hints on getting the option of DELBKUP to work. I have a maintenance job that backs up the database. Also set to delete backups older than 1 day. This doesn't seem to be working.

Any thoughts.

Thanking you in advance.

View 1 Replies


ADVERTISEMENT

Purge .ldf File

Jul 23, 2004

I'm assuming that the .ldf file houses all the transaction logs, well mine is getting quite large (like 6 times the size of my .mdf) and I'm wondering if there is a way to purge logs back to a specific date. Can anyone give me some direction? Thanks

View 2 Replies View Related

Purge A Log File

Aug 9, 2006

Hello,



I would like to use the built in logging feature to log to a text file.



Is there a way to purge the log peridically (only keep enties for the last 30 days, etc).



Thanks,



Michael

View 1 Replies View Related

Backup Failed: System.Data.SqlClient.SqlError: Backup And File Manipulation... Must Be Serialized

Jul 11, 2007

Using SQL Server 2005 Server Management Studio, I attempted to back up a database, and received this error:

Backup failed: System.Data.SqlClient.SqlError: Backup and file manipulation operations (such as ALTER DATABASE ADD FILE) on a database must be serialized. Reissue the satement after the current backup or file manipulation is completed (Microsoft.SqlServer.Smo)



Program location:

at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)
at Microsoft.SqlServer.Management.SqlManagerUI.BackupPropOptions.OnRunNow(Object sender)



Backup Options were set to:

Back up to the existing media set

Overwrite all existing backup sets



I am fairly new to SQL 2005. Can someone help me get past this issue? What other information do I need to provide?

View 11 Replies View Related

Difference Between Partial Backup (SQL 2005) And File Group Backup

Dec 5, 2006

What is the difference between "Files aned File Groups" backup and Partial Backup?

Looks like both are same.. Please comment.

View 3 Replies View Related

DB Engine :: Compressed Backup While Restoring Backup File

Sep 8, 2015

I got full backup on daily schedule its taking more space on Drive because each file has more than 25GB.I am using SLQ server 2008R2 so I'm looking to take the backup with compression instead of uncompressed Backup. What are the impacts of compressed backup. Is there any problems with compressed backup while restoring the backup file.

View 8 Replies View Related

How To Restore A Database From Backup With A Splitted Backup File

Apr 1, 2008

I should restore a SQL Server 2005 Database from backup. The backup contains three files, named user.bak0, user.bak1 and user.bak2.

How is the syntax of the restore filelistonly and the restore database ... ?

I usualy write
restore filelistonly from disk = 'path and filenam.bak'
restore database. zy
from disk = 'path and filename.bak'
with replace,
move.....
move....

This works but I cannot use it with a splitted backup file. The files are much too big to put together to one file.

Thanks in advance for any help.

View 3 Replies View Related

Purge

Aug 29, 2007



Hi Everyone.

i have a big database and for each table i have Active field (N/Y) and i wanna delete all record the active N. how i can do that without delete from each tables and looking to details tables before. our database have a complex relations.
please any solution.

thanks alot.

View 4 Replies View Related

Purge Time

Oct 26, 2003

All, I records that have two columns, date col and time col.

I am trying to write a SQL statement to extract the rows that fall within a range of time.
Eg current date/time + 10 hours and
current date/time - 10 hours.

Kindly advise how can I do that.
Thanks.

View 4 Replies View Related

Purge Database

Feb 8, 2005

Is there any way to purge/truncate a database where the dataase is full or does not have free space ?

View 4 Replies View Related

Purge A Big Table

May 14, 2007

Hi all I have table with about 67 million records
that are marked for deletion.

I know that I can

DELETE from table
WHERE ToBeDeleted='t'

But this may be too big a task for the server considering the amount
of data to delete at once. And if it runs out of resources and errors then nothing gets deleted....

Is there a way to segmant or loop so i can delete like 100k records at a time?

Many thanks in advance

View 8 Replies View Related

Archive And Purge

Dec 13, 2007

A client of mine just asked about Archiving and Purging their data (based on different time constraints). For isntance, certain data would get archived after 3 years over to a different database, others purged all together. My thoughts off the bat are store procedures run on a job schedule.

Any other thoughts or ideas?

View 3 Replies View Related

SQL Server 2005 Purge?

Jun 9, 2006

Greetings,
I have a SQL Server 2005 database which is populated with test data.  I need to copy this database to a new instance and then purge the copied database of it's contents for the next round of testing.
I know there exists a Copy Database Wizard w/in the SQL Server Management Studio; I'm assuming I need to perform this first, then purge the existing data w/in the copy.  The Copy operation looks pretty straight forward, but I haven't a clue on how to perform the purge.
Can someone help?
Regards,
Loopsludge

View 1 Replies View Related

Purge Log Dump Device

Feb 22, 1999

Suppose I am appending to my transaction log dump device every half hour,thus adding 48 log dumps per day. How can I purge my transaction dump device to only keep the last 1 week's worth of these logs. I do not wanted to issue an INIT in the command, because this will wipe it completely. I noticed an EXPIREDATE and RETAINDAYS parameter for the DUMP command. Can I use these to selectively purge the backup device or will these allow the device to be wiped clean also?

Thanks in advance,
Ed Molinari
Emerald Solutions

View 2 Replies View Related

Why Won't My Transaction Log Backups Purge

Oct 5, 2004

Hi

We are running SQL Server 2000 and making full database backups using a maintenance plan. The transaction logs are being backed up via a separate plan.

However, the transaction log backups aren't purging but the database ones are. They are both run under the same id and both write to the same directory. Old text reports also get purged fine. I've got 'Delete older than 1 week' ticked for everything.

Can anyone think of anything else to check ?
Thanks

View 7 Replies View Related

Looking For Simple Purge Of Records From A Table

May 21, 2007

greets all, ive got a table with batches of records. each group of records has a batch id as part of the PK in the form BTCXXXX where XXXX is an auto-incremented number. so lets say i have 100 batches of 20k records per batch in the table. so the distinct batch ids are BTC0200 (oldest batch) through BTC0300 (newest batch).
i only want to keep the 90 most recent batches in the table at any given time.
is it ok to just subtract 90 from the last batch id and do something like:

DECLARE @batch_id char(10)
SET @batch_id = 'BTC' + batch_num-90

DELETE FROM ITEM_BATCH
WHERE BATCH_ID < @batch_id

i want to cover if the table has more than 90 batches and if the table has less then 90 batches. is this a feasible approach?

View 4 Replies View Related

DB Mirroring Monitor Job - Purge Old Data?

Dec 14, 2006

Hi,

Not sure if this question makes sense, but is it necessary to purge old data in msdb tables used by the db mirroring monitor job?

I'm just wondering if an insert into the data table every minute of the day would still be needed a month from now. I'm thinking this data would be useful for the purpose of "alerts" and to have access to its recent history, but other than that, is it recommended (or necessary)? Would these records keep accumulating until manually purged?

TIA.

View 7 Replies View Related

Transact SQL :: How To Purge Data From A Table

Nov 4, 2015

We have staging table in which data is dumped from files . The staging table is truncated for every load . In order to retain data from staging table we are creating staging_purge table which hold the staging data. what is the fastest way  to copy data from staging to purge table without impacting the load process.

View 13 Replies View Related

Automatic Purge Of Transaction Log Data?

Jan 25, 2007

Hello,

I have a database that I am setting up in SQL Server 2005. Initially, I am doing very large imports of data. Every time I run an import, I am having the increase the size of my transaction logs, and now they are approaching 2 GB. Should these be purging themselves? I have to keep increasing the max size of the log so that I can get my data in. While this will work for now, it is not a long term solution, because I can see the log size growing quite large and the amount of space on the server obviously isn't infinite. Is there a setting that I can change so they will automatically purge? If not, how do I purge this information myself?

Thanks so much!

Christine

View 4 Replies View Related

DB Engine :: How To Restore From Current LDF Log File And Old BAK Backup File

Jun 11, 2015

My customer got a total hard drive failure.After sending it to drive recovery specialist we were able to recover the LDF log file (MyDB_0.LDF).But the MDF file was completely destroyed (MyDB.MDF).They have a good full backup from a month ago.

1) Installed SQL Server 2012 on a new PC
2) Created a new database of same name (MyDB) - with same MDF and LDF file names as original
3) Took the new database offline
4) deleted the MDF and LDF files of the new database
5) put "MyDB_0.LDF" in the place of the LDF file I just deleted 
6) put the database back on-line
7) after hitting F5 to refresh databases - it shows "MyDB (Recovery Pending)"
8) tried to do Tail Log Backup with this command
   BACKUP LOG [MyDB] TO DISK = N'C:BACKUPMyDB_TailLog.bak'
WITH NO_TRUNCATE

And I get this error...

Msg 3447, Level 16, State 1, Line 3
Could not activate or scan all of the log files for database 'MyDB'.

The sad thing is I know we can get this data back using ApexSQL-Log. I can see all the transactions since the last full backup in this program - so the log file is not damaged. But my client doesn't want to pay the $2000 fee for this software.There has to be a way to restore this data, without having to purchase a third party tool.

View 13 Replies View Related

Purge Records From Table In A Weekly Schedule

Jul 23, 2002

Hello all,

I hope someone can help me with a big problem... I'm using Citrix Resource Management Services with a SQL 2000 database. Their are 15 citrix servers which are all reporting to the SQL database.

The database is expanding very quickly and is becoming slower and slower.

My question is: I want to schedule a purge of old records on a friday afternoon, like this:

WEEK 1 - MON / FRI
WEEK 2 - MON / FRI (Friday's purge records week1)
WEEK 3 - MON / FRI (Friday's purge records week2)
etc...

Is this possible? if yes how do i do this !??!

Thank you very much for any info!!

Daan

View 1 Replies View Related

SQL 2012 :: How To Purge Old Store Procedures From Clients

Jul 11, 2014

I do have very old versions of duplicate store procedures on my databases. I know there is no "safe" way to do this using DMVs, so I am planning to combine that with a trace. But I would like to get others opinions about that.

Here's the DMV I am planning to use:

SELECT
CASE WHEN database_id = 32767 then 'Resource' ELSE DB_NAME(database_id)END AS DBName
,OBJECT_SCHEMA_NAME(object_id,database_id) AS [SCHEMA_NAME]
,OBJECT_NAME(object_id,database_id)AS [OBJECT_NAME]
,cached_time
,last_execution_time
,execution_count

[Code] ....

I will save that on a local table and run it every 5 min maybe? Or at an interval equal or lower than PLE?

View 5 Replies View Related

Baffled. How To Purge Old Backups With Maint Plan

Apr 13, 2006

I'm missing something basic...

Trying to create a new job from sql server 2005 Management Studio. The nifty wizard under Management provides options to create backups, and clean history, but I cant seem to find out how to create a job to purge old backups.

Looking at the commnand line Sql Server Agent Job shows:

/SQL "Maintenance PlansFull Backups" /SERVER "JFSLIB-DEV" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF

But as you can see, doesn't help a novice like myself, as it appears to be command options to run the "integration" package.

Any help is appreciated. Thanks!

View 3 Replies View Related

DB Engine :: Extension FILE Among Backup File

May 8, 2015

I checked quickly one network  and I ran into the folders; I found out the folder MSSQL backup, nothing strange so far. Within that folder, anyway, I found out several backup and one very huge file (datawarehouse) with extension FILE. I am wondering what can be? I got datawarehouse mdf of course and datawarehouse log but what is that huge file (1 TB)?

View 6 Replies View Related

SQL Server 2012 :: Purge Process On A Large Table

Jan 9, 2014

I am attempting to do a rather simple purge task on a very large table. This task will need to take place daily and delete records older than 6 months out of the database. On first pass this will delete well over 130 million rows. I thought the best way to handle this is create a proc and call the proc from a SQL Agent Job that runs nightly. Here is an example of the script:

CREATE PROCEDURE usp_Purge_WCFLogger
AS
SET NOCOUNT ON
EXEC sp_rename 'dbo.logs', 'logs_work'
GO
SELECT * INTO dbo.Logs_Backup FROM dbo.Logs_Work WHERE TIMESTAMP < DATEADD(month, -6, GETDATE())

[Code] .....

View 3 Replies View Related

Massive Bulk Delete / Data Purge Problem

Jan 28, 2008

I've got a large MS Sql Server 2000 database that has 15 indexes, with roughly 180 million rows representing 240 GB worth of data. Due to the massive size of the database we are trying to purge it down to a smaller dataset, about 40 million rows, in order to speed up the query performance and to be able to defrag the indexes (which are 30-50% fragmented). To complicate the matter, this table is also a publisher in a transactional replication setup, with one subscriber. Also, the system needs to be up constantly so I'm only allowed about a 3-5 hour period to take an outage a week.

So far I've tested several methods of delete following all best practices (batch deletes, using indexes in delete's where clause), and have come up with deleting/commiting 500 rows at a time. The problem is that it still takes 3-4 seconds to delete this many rows, on a 8 GB RAM, 4 processor machine that is not currently used or replicated.

I'm at a loss on a way to pare down the data with a delete as the current purge script will take 7 hours a day for about 3 months. Another option I'm considering is to do a truncate and copy the data back over from the replicated database, but again this has its own set of problems, i.e. network latency and slow inset times. Yet another option would be to create a replica of the table on the production db, copy the data to it, then rename the table.

Any one have experience with purging such a massive amount of data? Any help would be greatly appreciated.

View 6 Replies View Related

Backup Master Key, Cannot Write Into File 'c: Empmaster'. Verify That You Have Write Permissions, That The File Path Is Valid.

Jul 12, 2006

Hi,



I tried to backup the master key by the following syntax :

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'mypassword'

BACKUP MASTER KEY TO FILE = 'c: empmaster' ENCRYPTION BY PASSWORD = 'mypassword'

but it failed and i got the following message:

Cannot write into file 'c: empmaster'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.

NB: I am using the "sa" user to execute this command.

I know that we have a security permission issue , but where and how ?



Regards,

Tarek Ghazali

SQL Server MVP

View 12 Replies View Related

Can I Backup From .mdf Or .ldf File?

Nov 8, 2001

Hi there,
After a bad server crash, the only remnant we have of our SQL server database are the .mdf and .ldf files in the MSSQL7/Data folder. Can we restore this database from either of these files and if so, what is the procedure? Sorry but I'm an SQL server newbie.

Thanks in advance,
Paul

View 3 Replies View Related

Getting SP From DB Backup File

Nov 13, 2007

Hi,

I dropped a SPROC, and was in the process of reacreating it when I lost power. Now I don't have the SPROC except for in an old backup file.

Is there anyway to get this without restoring the DB ? If not, can I easily restore to a different DB name and then delete it? My backups are on my live server and I don't want to overwrite my current DB with my backup :)


thanks for any suggestions!!

mike123

View 4 Replies View Related

Help Me Plz About Backup .mdf File With C#

Mar 28, 2008

I rigth click my project , i choose add -> new item -> sql database
and i write

SqlConnection cc = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|DataData.mdf;Integrated Security=True;User Instance=True");




when i code

cmd.CommandText = "Backup database Data to disk = 'C:\123.bak'";



i recieve Error
Could not locate entry in sysdatabases for database 'Data'. No entry found with that name. Make sure that the name is entered correctly.
BACKUP DATABASE is terminating abnormally.


help me to solve this problem please!!!

Thanks.

View 7 Replies View Related

SQL Backup File Is HUGE!!!

Sep 25, 2004

One of my databases is approxiamtely 1.5 GB's but when I run a backup the backup file explodes to 38GB's.

What is the proper usage of Shrink Database, is this safe or is there another method to reduce the size?

View 2 Replies View Related

Backup Log File Fail

Aug 23, 2001

My database's log file is full. i want to backup it .
First i create a backup device named aa.
Than i use Enterprise to backup trasaction log.
But it popup an error messagebox.
The title is "Microsoft SQL-DMO(ODBC SQL state:42000)
The content is "write on 'aa' failed,status=112. See the SQL error log for more details.Backup or Restore operation terminating abnormally.
What's the matter ?

View 5 Replies View Related

Huge Backup File

May 12, 2000

I am using SQL Server 7 and have about 5 databases. One of them has a data file of about 10 Meg, and most of the others are larger. I do a nightly backup to both a local and mapped drive. On both, the size of the backup file for this database is more than 500 Meg, but the rest appear to be an appropriate size. Does anyone know why this would be happening? The database works fine, it does not get a lot of insert/delete activity and I run DBCC every weekend. If anyone has any ideas I would sure like to hear from them.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved