Database Maintenance On Replicated Database

Jun 18, 2007

Hi,



I have transactional replication set up on a DB and run database maintenance scripts (index defrag, update stats, etc) on this DB daily.



Will the maintenance job/scripts also be propagated to the replica (subscriber) causing these maintenance operations to be performed on the replica OR do I need to create separate jobs on the replica DB (subscriber) also? I'm guessing the latter but wanted to verify to make sure I wasn't missing something. Thanks!

View 3 Replies


ADVERTISEMENT

Move Replicated Database

Sep 2, 2005

Hi,
We have to move two of our servers in US hosting SQL Server 2000 database to different location. These servers are clustered using MSCS and uses SAN to store database data. The database on this cluster hosts publisher and distributor. The other two sites in Europe host updateable subscribers. We are using transactional replication. The downtime will be around 24 hours during which servers will be physically moved from one location to other. During this time we will keep the two subscribers running and let the changes queued on subscribers. I have listed following steps based on my limited knowledge of SQL Server. Could somebody please advise if this approach is valid and if I have missed any steps?

1. Make sure no users are accessing database
2. Backup database (In case of emergency need)
3. Stop snapshot, Log Reader, Queue Reader and Distributor Agents
4. Stop SQL Server Service and SQL Agent
5. Take OS backup
5. Shutdown the server
6. Ship the servers and OS backup to new location
7. Setup servers at new location and restore OS backup
8. Start SQL Server Service and SQL Agent
9. Start agents listed in step 3

Regards,
Nilesh

View 6 Replies View Related

How To Move Replicated Database?

May 8, 2006

I got Server A with 30 Databases and I was asked to move 30 databases to Server B…
But server A is having 2 databases as Publication and Distribution to two different servers….. and Server A is a subscription for 6 Databases from other servers….

Once I move the databases from Server A to Server B…… what is the best way to get the Replications too…. I mean Server B should have 2 Db’s as Pub & Distr and 6 Db’s as Subscription…

Is there any way I can script it out in Server A and run the same script in Server B with some modification…. so that the Replication work…..??

I have Jobs and Maintenance plans…. Which should also move from Server A to Server B…. I know using DTS...... is there any better way..??

Please some one give me ur suggestion on this…

Thanks
Bob

View 6 Replies View Related

Resotring A Replicated Database

Mar 3, 2004

I have a database A on server_1 that is being merge replicated to database B on server_2 which is production a box

NOW

I want to restore database A on server_3 that is being merge replicated to database B on Server_4 which is test box.

How about do I do that with replication being involved?

Thanx

View 2 Replies View Related

Alter Table In Replicated Database

Apr 26, 2003

How can I do an alter table in some table that replicated database ?
I got the error message when I try !

View 3 Replies View Related

Backup/Restore For Replicated Database

Jul 5, 2006

Hi, I have setup a merged replication on two server. Server A contains the Publisher and the Distributor database and Server B contains Subscriber.

If the database at the Subscriber got corrupted. I am thinking maybe i can 'restore' the subscriber database by resynchronising the data from the publisher to subscriber.

But what happen if the Publisher database failed? How should one restore the publisher database and then restore the replication setup?

What will be a good backup/restore strategy for such a setup?

View 1 Replies View Related

Remove Primary Key On Replicated Database

Jul 31, 2006

I have a table that was set up with a primary key - that i need to change. The problem is that the database is being replicated to a remote location, and will not allow me to remove or change the primary key on a published database.
Due to the size of the database and bandwith limitations it is not an option to re-initialise the published database.
Is there any to do this without breaking replication

View 1 Replies View Related

Moving A Merge-replicated Database For SQL CE

Apr 6, 2004

Is there a way to move a SQL replicated database from one server to another without dropping the publication?
I have SQLCE setup with SQL server 2000; I want to redo the server but needs to move my replication to a temp server and then back.
The problem is that I do not want to drop my subscription and recreate it…it needs to stay the same.

View 2 Replies View Related

Disk Configuration For Replicated Database

Jan 25, 2008

We are going to implement either a replicated database or use log shipping to another database to support our reporting needs. Basically we are moving reporting over data off our transactional database.

With this in mind, I have several questions:
Are there any special configurations in terms of disks for a database in this situation?What are the recommended raid types?
Also, we currently store our data in one filegroup and indexes in another so obviously I'll want those on 2 separate physical disks other than the C:. What about the log files? Do I care where they go (on C: or another physical drive separate from C:, data filegroup drive and index filegroup drive)?

Thanks!

View 3 Replies View Related

Move Mdf/ldf Files For A Replicated Database

Jul 23, 2005

Can someone lend some assistance in this? It sounds like it should beable to be done.We have a large replicated database in SQL 2000. We need to move themdf and ldf files to a location on another drive.Will doing this affect or break replication in any way? Is there anyway to prevent this?Thanks in advance.Glenn DekhayserVoyant Strategies

View 1 Replies View Related

Table Mantenance Within A Replicated Database

Jul 20, 2005

When I try to remove a table, it complains because it's part of apublication. I could script the publication and subscriptions suchthat they can be deleted, the table removed, and then added again.But, I not sure if this is the 'best' approach.Anyone faced this challenge before?Regards,gary

View 1 Replies View Related

Replicated Database Movement From One Server To Other

Oct 5, 2006

Hi All,

I have SQL server 2005 Database which is having following Replication stuff.

1. 6 merge Subscribers

2. 5 Snapshot Subscribers (Push Susbribers)

3. 3 Transactional Publisher

Due to the Performance Issue, there is need to move SQL server from the Current Server to an Higher End Server.

I want to keep all the Replication settings after movement of the Database. Can anyone tell me how to acheive this requirement?

Is there a possibility to keep the Replication settings ? Even we can have the Same System Name to the New Server.

Awaiting response...

Thanks,

Thams.

View 1 Replies View Related

Replication Help - Problem Restoring Replicated Database

Nov 27, 2002

I'm a novice with replication and am in need of direction on how to restore replicated databases. Server A replicates 5 databases to server B using transactional replication. Server A also contains the distribution database. I'm perfoming PUSH replication.

The development area asked me to restore Server A with a copy of production data located on server C. After I restored the data from C to A, I noticed that server A was no longer published. Is this normal?

I re-published the 5 databases, but noticed that the Log Reader Agent has now been running for 2 hours. I'm trying to give myself a crash course in replication, but am coming up empty regarding (1) the prefered method for restoring replicated databases and (2) determining why the Log Reader Agent is taking so long.

Any suggestions?

Thanks, Dave

View 8 Replies View Related

SQL 2012 :: Truncating Log File Of Replicated Database

Jul 14, 2014

I have a production database which uses merge and snapshot replication. The Merge is for 3 tables. The snapshot is to update the rest of the data once daily. I use a Full recovery model and perform database backups (full, differential) and transaction log backups.

I have a database optimization plan which runs 4 times a week. This plan performs and integrity check and rebuilds the indexes. This optimization plan is growing the transaction log by about 8MB each time it is run and we are running out of space on the drive for our log files. The space is not being reused.

I saw in another post where Gail Shaw suggesting using SELECT name, log_reuse_wait_desc FROM master.sys.databases to see why the log space is not being reused. On the database in question, the above returns "REPLICATION".

A colleague tried to backup the transaction log a couple of times to truncate the log this weekend. She was going to perform a DBCC Shrinkfile command afterwards. But the truncate failed. Again looking into things it seems replication prevented the truncation.

We are looking at stopping the merge replication or even removing it to truncate the log file and then recreate the merge replication. How to handle shrinking the log file for now and then seeing if there are any checks or changes I can perform which will allow the transaction log space to be reused.

View 7 Replies View Related

How To Configure Distributor Thread For Being Up While Replicated Database Is Down

May 1, 2006

Hi



I often deal with a problem when replicated database is down due to
electric outage or any other scheduled type of downtime. Primary
database is up but distribution agent is going down 'after 10 attempts
to connect to replicated database'. That's the problem I think because
not only distribution agent goes in undetermined state and I have to
restart sqlagent service, but I need to go through whole process of
snapshot and applaying it to replicated db. I would like it to
accumulate transactions in distribution database and once replicated db
is up - distribute them.

I wonder if anybody can tell me how to configure distribution thread so
it does not go down after 10 unsuccessfull attempts but stays for day
or two.



Thank you, Gene.

View 4 Replies View Related

Enumerate Subscriptions In A Merge Replicated CE Database?

Jun 27, 2007



How can I list all of the Subscriptions in a CE Database that was created with the .Net System.Data.SqlServerCe.SqlCeReplication.AddSubscription method?



After I create the CE database in an sdf file, I can connect to it with SQL Servr Mgmt Studio, then see the list of Subscriptions in the Object TreeView, under "Replication"



But I can't find that Subscription list in any properties or methods of System.Data.SqlServerCe.SqlCeReplication or System.Data.SqlServerCe.SqlCeConnection



Should I be looking in RMO features like Microsoft.SqlServer.Replication??



We want to confirm that a local CE database was last synced from the expected SQL Server database by checking the Publisher property of each subscription in the CE database.



Thanks

View 3 Replies View Related

Access2000 Database(table) Replicated To SQL 2000/2003 Server

Nov 4, 2006

I'm trying to replicate a table(s) in access 2000 to MS SQL server 2000/2005 programatically on a timed instance and then have these tables merged in SQL to create one table.

Any guidance appreciated.

Thank you,

View 1 Replies View Related

SQL 2012 :: Replicated Database Log File Grows Exponentially With Few Row Deleted / Inserted

Jun 29, 2015

I have a publisher database set up for a merge replication. This is using parameterized filter with join filters.

I also have a stored procedure that does deletes & inserts on the table where the parameterized filter is applied to aid in changing a subscriber's eligibility to receive so and so data. I have observed that running the stored procedure takes extraordinarily long and as a result, the log file grows to a size 1.5 - 2.5 times the database size.

At first I reasoned that this might because I had it set up to use precomputed partitions and changing it requires recalculating the partitions. As a test, I turned off the precomputed partitions. Didn't work. I turned on "optimize synchronization" AKA "keep_partition_changes", which normally is not available when you have precomputed partition on, and that didn't work, either.

At this point, I think I can rule out precomputed partitions being a problem here but I'm stumped now what else I should do to reduce the amount of log writes being required. We do need the parameterized filters & join tables, so that can't go.

View 0 Replies View Related

Failure To Create First Replicated Database (SQL Mobile/SQL Server 2005) / Err 28627

Jan 8, 2006

Hi,

I'm trying to get my first replication going, and I have set up a database successfully, along with merge replication, however when I attempt to create the first subscriber, I get a permissions issue, regardless of what I do. In the SQLCESA30.LOG file, I get the following entries:

2006/01/07 16:59:36 Hr=00000000 SQLCESA30.DLL loaded 0
2006/01/07 16:59:58 Hr=80004005 ERR:OpenDB failed getting pub version 28627


I posted the initial thread under the "Replication" forum, but am including this 'pointer' post here due to a lack of replies there, and the relevance of this thread to this forum. Please see http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=193693&SiteID=1 for more details.

 

Thanks.

View 1 Replies View Related

Database Maintenance

Feb 14, 2000

I am looking for opinions of setting up a database maintenance plan. I want to know if it is safe to trust the wizard and let it set up all of the jobs, or if it is better to write your own procedures to handle backups and maintenance as in 6.5. All sugestions and opinions are welcome. Thanks.

View 2 Replies View Related

Database Maintenance

Feb 2, 2000

For SQL server 7.0, is it necessary to schedule database maintenance plan on a regulare basis? I know it is necessary for SQL server 6.5.
Thanks.
Su Ge

View 1 Replies View Related

Database Maintenance

Apr 12, 1999

SQLMaint is run once a week for the following a database on SQL 6.5. The following is the information for the database when I see it through the Enterprise Manager:

Data Size 650 MB
Data Space Available 0.00
Log Size 360
Log Space Available 359.99

The following is the syntax built by the DATABASE Maintenance Wizard:

SQLMAINT.EXE -D CATS -CkDB -CkAl -CkTxtAl -CkCat -UpdSts -RebldIdx 100 -Rpt E:MSSQLLOGCATS_maint.rpt
It runs once a week and takes about 40 mins and runs successfully. Last it run was 4/11/99 at 2:00 AM

The result set I get from sp_spaceused is as follows:

database_name database_size unallocated space
CATS 1010.00 MB 273.96 MB

reserved data index_size unused
------------------ ------------------ ------------------ ------------------
753710 KB 280360 KB 426494 KB 46856 KB


What I don’t understand is how come the data space available shows 0 in Enterprise Manager? Shouldn't SQLMAINT, which is run once a week, allow for correct information to be reported?

Could someone please explain.
Thanks
Shashu

View 2 Replies View Related

Database And Log Maintenance

Jul 20, 2005

Running SQL Server 2000 Enterprise Edition SP3. The database is alsoused by Microsoft Project Server 2002 and also has OLAP views, so thedatabase is being used to view/run cubes in the Analysis Manager.What is the best way of shrinking the database size and its log file too?Is there an automatic way to do this with a maintenance plan or i haveto manually run a SQL statement periodically?What are the best practices?I have a database that the size of it is 260megs and now the log file isover 800megs...Everytime i run the following:BACKUP LOG DBName WITH TRUNCATE ONLYDBCC SHRINKDATABASE (DBName, 10, TRUNCATEONLY)When running it, i get the following 2 records returned:DbId FieldId CurrentSize MinimumSize UsedPages EstimatedPages7 1 32304 128 28152281527 2 160 128 160128I don't know what the above 2 records mean. I am also concerned if i shouldbe running that statement or not.Also concerned as to why the Windows Server 2003 (Enterprise Edition)always creates a CRITICAL error in the Application event viewer with EventIDnumber 17055, source being MSSQLSERVER and the description of the event:18278:Database log truncated: Database: DBName.If it's a critical error message, then what i am doing is bad? Am i damagingmy database?Within like 7-10 days of running the above statement, the log file becomescloseto 1 GB again! How can i find out what causes the log file to grow that big?Is it beingcaused by running some OLAP views or what? The db has about 20 usersconnected to itusing an ASP web aplication as the front-end, and MSP Professional 2002 alsoto connectto the Project Server 2002 (which uses the same database as the aboveDBName).I would appreciate any help.Thank you very much

View 4 Replies View Related

Database Maintenance

Oct 15, 2007



I have been looking through the data files directory for my databases and noticed that the log (ldf) files of some of the databases are from 2GB to 4.5GB where as the data files are under 500MB. If I shrink the log files what affect does this have on the database? Should I be setting up regular shrink jobs on the log files?

Any help would be very much appreciated.

View 5 Replies View Related

Database Maintenance Plan

Mar 12, 2002

Hi there,

We are using a database maintenance plan to backup and reindex our db's. Up until the end of last month this was working perfectly - however now it has stopped deleting the old backups (even though we have checked 'Delete files over 1 day old').

Does anyone have any ideas as to why they are now being deleted - and how we can remove them automatically - has something been corruped? Would it be a case of creating a new maintenance plan?

thanks in advance,
Matt

View 1 Replies View Related

Database Maintenance Troubleshooting

Mar 26, 2001

SQL Server 7.0 with SP 1
Database maintenance job is failing
with error about being unable to delete old backup file.
I can manually delete the file with no problem.
This occurs randomly, maybe once a week.
Any ideas on what's wrong, and how to fix it?

View 1 Replies View Related

Database Maintenance Issue

Jul 28, 2000

I want to know database maintenance issue when there are many databases in a machine. The number of database will be 50~80. We'll use SQL 7.0. In Sql 7.0, I heard that there is not so much maintenance issue.

Wisepost Inc.
Chris Song

View 3 Replies View Related

SQL Server 7.0 Database Maintenance.

Feb 13, 2001

After looking through the archives at database maintenance steps used by others, I have decided on the following steps for each of my SQL Server 7.0 databases. I have set up a maintenance plan where they would execute in the following order for each database, if the preceding step is successful. If the preceding step fails, the job quits.

dbcc checkcatalog ('master')
dbcc checkdb ('master')
backup database master to master_dump with init, name = 'ASP Master dump'
dbcc dbreindex ('master', '', 70)
dbcc shrinkdb ('master', 10)

Now my questions...

1. The checkcatalog, checkdb, backup database, and shrinkdb commands appear in blue in SQL Server 7.0 to seemingly indicate they are commands. However, the dbreindex command is black. Does this mean that it is not recognized as a valid command? If so, why not? It is shown as a valid command in the Microsoft Knowledge Base.

2. The value of 70 in the dbreindex command was the value shown in sample code in the Microsoft Knowledge Base. However, the Knowledge Base does not give any guidance on whether this is a good value or not. How should I make a decision on what value to use? The value of 10% for the shrinkdb command is also just a sample value from Microsoft. How does one know what value to choose?

If anyone thinks this is a poor selection of maintenance steps, please let me know that also.

Thanks!
Joe Meyer

View 2 Replies View Related

Database Maintenance Plans

Sep 15, 1999

Hi, I'm new to SQL 7 (and fairly new to SQL Server), can anyone help with these basic questions on database maintenance plans generated by the wizard:
(1) Scheduling - can SQLServer handle say a REORG running at the same time as a backup against the same database? This should never happen, but what will happen if say a backup is due to start before a REORG has finished? To try & simulate this 'problem' I've run REORGs and backups at the same time & have yet to encounter errors I presume SQL locking handles this OK.
(2) Database integrity checks - (a) any comments on the wisdom of checking 'repair any minor problems'? Anyone had any problems with this? (b) While integrity checks are running do they take enforce a consistent view of the data? (I think this is probably the case as my reading of books online indicates that DBCC takes shared locks for the duration)
(3) Backups - does the 'VERIFY INTEGRITY' option have any impact on the live database? (My reading of RESTORE VERIFYONLY indicates it doesn't)
Thanks....

View 1 Replies View Related

Database Maintenance Plans

Mar 18, 2003

What is the recommended schedule for SQL Server maintenance plans that perform database integrity checks and optimizations?

Also, more specifically, how often should we be re-building our indexes?

Thanks for your help.

View 4 Replies View Related

Database Maintenance Job Fails

Apr 21, 2003

I have several Maintenance jobs that keep failing. They
are , Integrity Checks, Index rebuild, and Update
statistics. I keep getting a similar error on all three. I
have pasted it below. None of my other SQL 2000 servers
have any problems. I have tried changing the database
options in question. The error I keep getting is as
follows:



Microsoft (R) SQLMaint Utility (Unicode), Version Logged
on to SQL Server 'DAPHNE' as 'CDCNorm' (trusted)
Starting maintenance plan 'FSPRD84A Integrity Checks' on
4/21/2003 10:20:59 AM
[1] Database FSPRD84A: Check Data and Index Linkage...
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934:
[Microsoft][ODBC SQL Server Driver][SQL Server]DBCC failed
because the following SET options have incorrect
settings: 'QUOTED_IDENTIFIER'.

The following errors were found:

[Microsoft][ODBC SQL Server Driver][SQL Server]DBCC failed
because the following SET options have incorrect
settings: 'QUOTED_IDENTIFIER'.
** Execution Time: 0 hrs, 0 mins, 8 secs **

End of maintenance plan 'FSPRD84A Integrity Checks' on
4/21/2003 10:21:07 AM
SQLMAINT.EXE Process Exit Code: 1 (Failed)


Any suggestions?

View 8 Replies View Related

RS SQL Server Database Maintenance

Sep 18, 2006

Hi,
I'm researching on how to maintain RS SQL server database or what is the best way to maintain ReportServer and ReportServerTempDB? Should I go for the automatic shrink facility of SQL Server? Any suggestion? Thanks.

View 6 Replies View Related

Database Maintenance Plan

Dec 1, 2005

Hello, everyone:

I have a Database Maintenance Plan that back up some databases and delete old backup files that more than two day. Can any one have idea which action is first, backup or delete old files?

Thanks

ZYT

View 1 Replies View Related







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