SQL Server 2008 :: Archive Data Through Replication

May 5, 2015

I'm looking for a process to archive data through replication. I have nightly job that purge records in few source tables(publisher) retaining only 3 yrs data. I have archive database (subscriber) that contains prior 3 yrs data and current 3 yrs data.

Before nightly job DELETES records in Source table i want to STOP replication so that the delete is not replicated in archive database. After the job completes i would like to TURN ON replication so that any new inserts and updates in Source will ONLY be replicated in archive database.

My DBA tested this but after last step of turning replication back ON archive database is sync'd with source table.

There are around 70 tables where 30 of them are transactional tables that needs record purge. Developing ETL process is possible but tedious.

View 5 Replies


ADVERTISEMENT

SQL Server 2008 :: Archive And Delete Old Records In Table With No Date Column

Feb 4, 2015

I have these two tables Log and CategoryLog, I need to archive records older than 13 months in these two tables to two separate tables and then delete the archived records from Log and CategoryLog tables. The problem is that only 'Log' table has a date column, the other table CategoryLog does not have any date column. But the two tables are connected by a column(LogID). How to archive the data and then delete the archive data from both tables.

View 9 Replies View Related

SQL Server 2012 :: How To Archive Data And Delete

Apr 22, 2015

I am using SQL 2012 SE. I have 2 databases say A and B with same structure and relationships. There are 65 tables in each database. A is already replicating data to database C for 35 tables. Now I need to move data from A to B which is greater than getdate()-1 everyday for all the tables and once the move is done I need to delete this data from A. And the same thing the next day and everyday. Since this is for 65 tables its challenging to identify the insert order. Once the insert order is identified the delete order will be the reverse of it.

Is there a tool or any SP that could generate the insert order script? The generate scripts data only is generating the entire data and these databases are almost 400GB. Some tables have 200Mil+ rows. So it takes forever.

View 1 Replies View Related

SQL Server 2012 :: Code To Archive Data

Jul 31, 2015

I wrote code to archive Data.I created a table that set the maximum number of records to archive and delete and loop until finished or a set a flag in a table to stop archiving. I was able to limit the number of records to commit.

View 9 Replies View Related

Archive Off Old Data

Mar 25, 2012

Project assigned to me called ''Archive off old data''.As SQL DBA the best way to archive large table is data Partitioning. But one table does not enough in terms of size to do partition and plus table has 32 other tables,view,sps dependencies.The data from that table needs to archive off every week to different database on different server. My question are

1) what is the best way to archive data ?
2) what are steps I need to follow ? Do I need to remove dependencies first and then take out data?.

View 2 Replies View Related

Data Archive

Feb 4, 2004

Hello, everyone:

What does "data archive" mean in SQL Server? Is it same thing as archiving in Oracle?

Thanks.

ZYT

View 1 Replies View Related

Archive Data Instead Of Deleting It To Prevent 4GB Data Limit

Mar 14, 2008

We are running SQL Server 2005 express on Windows 2003. The database server gets significant amounts of data.



Because of the 4GB data limit we have a daily cron task which goes through and deletes data older then 90 days.



We would like a way to archive this data instead of deleting it. Is there any way to take data and compress it and store it in a different way, so that if needed, customers can query directly out from the compressed data? Cleary querying from compressed would be slower but that is ok.



Any other solutions that would allow us to archive data instead of deleting it? Thanks.

View 10 Replies View Related

NOT Replicate Data Archive

Jun 5, 2002

Hi Folks,

We have transactional replication setup to replicate data from production across to a reporting server.

We want to ARCHIVE production, but don't want the ARCHIVE duplicated on the reporting server.

Does anyone know of a way that the reporting server can be stopped from replicating these changes, and continue to hold the FULL history of the database?

Cheers,

David

View 2 Replies View Related

NOT Replicate Data Archive

Jun 5, 2002

Hi Folks,

We have transactional replication setup to replicate data from production across to a reporting server.

We want to ARCHIVE production, but don't want the ARCHIVE duplicated on the reporting server.

Does anyone know of a way that the reporting server can be stopped from replicating these changes, and continue to hold the FULL history of the database?

Cheers,

David

View 2 Replies View Related

Archive Data Suggestion

Jul 20, 2005

I have a table contains huge rows of data. Performance issue raised. I amthinking archive some data so that the table will not be that big. The mostconvience way is move it to another table. The problem is: will this solvemy performance problem? or I need to move it to another database to reducethe database size?Regards,TrueNo

View 2 Replies View Related

Under 6.5, Best Way To Archive Data Out Of Large Table?

Oct 31, 1999

Hello:

The purchased-application mssql 6.5, sp 4 that I am working on has one large table has 13m illion. It the largest table considering thenextlatgest table is only1.75 million rows.

Thew vnedor has made a change to this largest table in recommending changing a data type -- char to varchar. To make this change easier to do,
I want to "archive" older data not necessary for the current year or current processing to another table.

What is the best way to do this archiving?

Any information you can provide will be greatly appreciated. Thanks.


David Spaisman

View 4 Replies View Related

SQL Server 2008 :: Reporting From A Replication Slave?

Feb 11, 2015

We have a SQL Server 2008 that is being replicated transactionally (log shipping) onto another SQL Server 2008.

Can we report against the replication slave without disrupting the replication process? I have been informed that the slave server needs exclusive access to the db in order to apply the transaction log.

If this is the case, are there any configuration changes which would allow us to report from the slave without impacting replication?

View 7 Replies View Related

SQL Server 2008 :: Configure Replication Using A Script?

Feb 26, 2015

I am trying to configure replication using a script. I created the distribution database as well as the publisher. Now, I am running the stored procedure in one of the subscribers to create subscription. However, I keep getting the same error over and over again. The error reads:

msg 50000, Level 16, State 1, Procedure usp_create_AccountSubscriber, Line 43
Failed to execute SP usp_Create_AccountSubscriber: This database is not enabled for publication

what does it mean? how can i solve it?

View 6 Replies View Related

SQL Server 2008 :: Add Subscriber To Ongoing Replication?

Feb 27, 2015

i have replication setup and working, there are 3 subscribers and now i want to add a 4th one. is it ok if i just add the subscriber and reinitialize replication?

View 1 Replies View Related

SQL Server 2008 :: Snapshot Replication To Different Schema Name

Apr 25, 2015

I need to setup snapshot replication for 1 large table.

Source table: SourceDatabaseName.dbo.MyTable1
Target table: TargetDatabaseName.CustomSchema.MyTable1

In the above example, how can I specify the target DB's CustomSchema name (it's currently creating dbo, not CustomSchema)

View 1 Replies View Related

SQL Server 2008 :: Replication For Read Only Database

May 18, 2015

I'm in a project to replicate a database from the production environment to another sql server.

The idea is use it for some biggest querys because in the production database we had experimenting various problems. What is the best way for do it? Transactional replication? Log Shipping? I'm reading absolutely everything but I can not get decide.

Both servers are SQL Server 2008 R2 and they are in the same LAN.

View 6 Replies View Related

SQL Server 2008 :: Schema Changes With Transactional Replication

Jun 15, 2015

How do we know our schema changes will propagate to subscriber without breaking the replication? Is there any t-sql command to find out the option true or false?

View 2 Replies View Related

SQL Server 2008 :: Replication Backup And Restore

Aug 5, 2015

SQL Transaction replication, specifically SQL backup and restore Transaction replication. So Scenario,

S1 = Primary Server 1
R1 = T - Replication Server 1
R2 = T - Replication Server 2

So we have S1 replicating to R1, and we want to build another subscriber which is R2.

Can I take the Replicated Database from R1, backup it up, then restore it to R2, and create the publication/subscription?

Will that work? if not, is there an easier way to avoid the snapshot? the reason i ask this is because we do have replication snapshot, but takes long. One of my Colleagues stated he tried this, however replication made duplicate rows on R2, which is why he had to use replication snapshot.

View 0 Replies View Related

Move Data To Archive Table. Need Suggestions.

Mar 14, 2008

I have two tables say A and Archive. After a certain period of time some records are to be sent to archive table.To copy records to archive table I am using SqlBulkCopy operations.Now I have to delete the records from A Table. I was thinking of sending a Comma seperated id's of rows that are to be deleted to a stored procedure.Are there any better techniques to move data to archive table and to remove data from main table.?Thanks. 

View 9 Replies View Related

SQL 2012 :: Strategies To Archive Old Database Data?

Oct 28, 2014

I have the requirement to implement archiving of some database old data.

The database is not used to store files, just table with text/numeric data, some data modification logs.

Which strategies do you usually use to archive old records from a database?

Do you move old/unused data to another similar database in another server?

The data needs to be accessible for read access, even when archived.

View 3 Replies View Related

SQL Server 2008 :: Merge Replication - Replacing A Subscriber

Mar 4, 2015

We have a central office with a SQL2005SP4 server (yeah, I know... old as heck) that's the main database and it has multiple subscribers in regional offices. Well... one of the regional offices server is failing, and it needs to be replace.

The original server is an ancient Win2003 86x

The Server team will build a new Win2008r2 64x, and use the same name and IP address

And I'm tasked with the SQL part.

I'll be installing the same version/patch of SQL, but 64x instead, and migrate all databases, including the system databases.

How do I handle replication? Do I need to reintialize from scratch? or can I just use the backup as a starting point?

View 1 Replies View Related

SQL Server 2008 :: Transactional Replication (Snapshot Agent)

Mar 19, 2015

Is there a way to force the snapshot to use a format file when bcp'ng the data to the subscriber?

The publisher and subscriber schemas are slightly different. Mainly added columns to the subscriber.

We have a post snapshot script that updates these additional columns on the subscriber.

I'd like to force the snapshot to use a format file, so it doesn't error when initially loading the data to the subscriber.

Is this possible?

View 1 Replies View Related

SQL Server 2008 :: Transaction Replication Functionality Within Mixed SPs

Jul 1, 2015

Currently, we are on SQL2008R2 EE SP1 CU13 across the board.

We are planning on upgrading the primary SQL server to SP3.

Question: Will transactional replication continue to work properly even if the Publisher is upgraded to SP3 but the subscribers remain at SP1 CU13 ?

View 2 Replies View Related

SQL Server 2008 :: Indexes On Subscriber Database With Replication?

Jul 15, 2015

When creating the snapshot I didn't choose the option copy non-clustered indexes. I created some indexes manually on subscriber database. Replication failed later with some issue.

so reinitialized with new snapshot but all the indexes are gone from the subscriber database.

How to keep the indexes without dropping from subscriber database whenever we reinitialized with snapshot

View 5 Replies View Related

SQL Server 2008 :: Lock Out Users Without Affecting Replication?

Sep 1, 2015

We are approaching the "go live" date of a big application upgrade, so while the application is being upgraded i was asked to lock out all users and backup all databases and make sure the data isnt changed during a period of time

It turns out, as one of my databases is being replicated to another server, i cant put that database in read_only mode, or restricted_mode, without removing the replication.

Removing the replication means i have to set it up again and that means another 3 hours added to an already cram-packed weekend without sleep!

How I can lock out the users to make sure there are no changes to a database other then read_only/restricted_mode/single_user ?

I really don't want to touch that replication...

View 0 Replies View Related

SQL Server 2008 :: Snapshot Replication Not Copying Constraint Key?

Oct 27, 2015

We have a domain joined SQL 2008 R2 server performing a snapshot database replication to a non-domain joined SQL 2008 R2 server. The snapshot replication is working with one exception. Under one of the tables, there is a Key, Constraint and Index that are part of the database. The Key and Indexes is copying over. However, the constraint is not. Why would the Key and Index copy but not the Constraint?

View 3 Replies View Related

SQL Server 2008 :: Replication Subsystems Failed To Load

Sep 4, 2009

I am running SQL 2008 Enterprize Edition with SP1 on Windows 2008. I am trying to set up replication. I have completed the following:

1. Created distribution Database
2. Created publisher
3. Granted SQL Agent access to the ...MSSQL100Com folder to execute the agent_exe files
4. Granted SQL Agent access to ...MSSQLinn where the subsystem_dll files are located
5. Granted SQL Agent write permissions to ...MSSQL
epldata in order the write the bcp files

Each time I try to initialize the snapshot, I get the following errors in the SQL Agent Log

1. Log Step.......cannot be run because the LogReader subsystem failed to load. The job has been suspended.
2. Log Step.......cannot be run because the Snapshot subsystem failed to load. The job has been suspended.

I found posts where the records in the msdb.dbo.syssubsystems pointed to different folders than where the dll and exe files are located. So, I checked that, but they are correct.

The SQL Agent has sysadmin on the SQL Server and is using a windows service account.

I believe it is a security issue because I can run the executables from the command prompt to generate the snapshot for the publication. Have I missed the forest for the trees?

View 8 Replies View Related

SQL Server 2008 :: Replication Error - Field Size Too Large

Feb 1, 2011

I've got two databases on the same server and replicate some tables from one database to another.The replication is configured so not to drop the table if it exists, but to delete the data based on the filter if one exists. There are two tables on the subscriber that have some extra columns.

I get "field size too large" error when trying to replicate them. Is there a workaround without having to make the publisher and the subscriber tables identical by schema?

View 5 Replies View Related

SQL Server 2008 :: Identify Which Indices Are Replicated - Transactional Replication

Feb 20, 2015

Is there a script to find which non-clustered indices are replicated? I know i can do this easily through GUI , having a script will make my life much easier ....

View 0 Replies View Related

SQL Server 2008 :: Script To Return Replication Status As Small Int

Mar 26, 2015

I need a script that will return the replication status as small int.

View 1 Replies View Related

SQL Server 2008 :: Replication Articles Read-only AND Updateable At Same Time

Apr 21, 2015

We have many users with a mobile application running SQL Mobile and using merge replication to get data back to the SQL 2008 R2 database. This has worked very well for many years.

We now have a requirement to have this data reported on using Reporting Services. This is where it gets messy.

Due to a limitation of Report Builder(see this blog) we cannot provide access to users for creating their own reports. The report database is remote from the host and there is no VPN.

We hit upon the idea of creating an almost identical publication but the articles as read-only. It was only after this was done that we started having trouble with our existing mobile users.

It seems that a published article is EITHER Bi-directional OR Read-only even if they are in separate publications.

I then thought of using Transactional Publication but this too is blocked on creation with "automatic identity range support is useful only for publications that allow updating subscribers"(Merge and Transactional publication are mutually exclusive)

So in the final analysis is there a way for me to have merge replication AND some other form of SQL replication/data transfer that can have the same data transmitted readonly to a separate full SQL server database?

View 9 Replies View Related

SQL Server 2008 :: Snapshot Replication Of 1 Table To A Target DB With 100 Tables

Apr 25, 2015

Regarding Snapshot replication....

If I have 200 tables on my source DB and 100 tables on my target DB... and I set up a publication w/ just 1 article to be published....

Will the invocation of the snapshot/apply affect any tables on my target other than the article I'm replicating?

View 2 Replies View Related

SQL Server 2008 :: Find Out Type Of Replication Pull Or Push

Apr 28, 2015

SELECT
P.Publication
,P.Publication_type
,S.Subscriber_ID
,S.Update_Mode
FROM MSPublications P
INNER JOIN MSSubscriptions S
ON P.Publication_ID = S.Publication_ID

give me publication_type=0. So it is transactional replication but how do we know that is pull or push?

View 2 Replies View Related







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