Hetrogenous replication in sql server 2008
I am trying to setup a transaction rpelication between a Oracle publisher (version 10.2) and sql server 2008 sp1 on windows 2008, 64 bit AMD Processor.
I have installed the oracle client 11.0.1 and followed the permissions for the login on the orcale server.
I was able to add the oracle publusher.
I am tryign to create the publication and atricles and i get the following error.
TITLE: Publication Properties
Cannot add article 'CACHE_LEVEL_LU'.
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot publish the table 'SAT.CACHE_LEVEL_LU' from the Publisher 'CD15'. Verify connection information and ensure that you can connect to the Publisher through a tool like SQL*PLUS. Ensure that the replication administrative user schema has the required permissions.
Cannot add the Publisher triggers and the article log table to the Oracle Publisher for the article 'CACHE_LEVEL_LU'. Verify connection information and ensure that you can connect to the Publisher through a tool like SQL*PLUS. Ensure that the replication administrative user schema has the required permissions.
Changed database context to 'distribution'.
OLE DB provider "OraOLEDB.ORACLE" for linked server "CD15" returned message "ORA-00936: missing expression
ORA-06512: at "BIA_REPL.HREPL", line 1722
ORA-06512: at line 1".
Error: 7215, Sev: 17, State: 1, Msg: Could not execute statement on remote server 'CD15'. (Microsoft SQL Server, Error: 21790)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=21790&LinkId=20476
BUTTONS:
OK
Any idea?
Do you guys knwo fi the replication between Oracle and sql works?
thanks
uday
Did you ever find a solution here? I'm running into the exact same issue with my attempted replication setup - I'm hopeful that you were able to solve this!
Similar Messages
-
Removing Replication in SQL Server 2008 R2
Hi,
I had issues to remove replication. I was trying to remove all articles from replication..it was taking quite long time to complete the process and found blocking while doing it. I stopped the SQL agent and tried but still it was slow..to remove 3 tables
from replication it took more than 30mi. Is there any other preriquisites to do for this process. I searched a lot in the web but didn't get proper help.
Thanks.Hi Swapana,
According to your description, you want remove all articles from transactional replication, however, it exists some blocks which make the removing process slowly. Usually, articles can be dropped from a publication at any time. Replication will stop
replicating the changes in schema/data from publisher to subscriber once you remove article from replication . However, we need to verify if you want to remove tables from the subscriber database, if yes, you have to do it manually after removing object from
replication. For more information, see:
http://blog.extreme-advice.com/2012/11/28/delete-article-from-transactional-replication-in-sql-server-2012/
In addition, if you just want to drop articles from existing publications. For snapshot or transactional publications, articles can be dropped with no special considerations prior to subscriptions being created. When you drop an article that is related to
other published articles through foreign key constraints, we recommend that you drop the table at the Subscriber manually.
If an article is dropped after one or more subscriptions is created, the subscriptions must be dropped, recreated, and synchronized. For more information, see:
http://msdn.microsoft.com/en-us/library/ms152493.aspx
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Database Mirroring and Replication in SQL Server 2008 R2
I have configured the mirroring and replication between 4 servers (A,B,C,D).i.e, Mirroring between A to B and C to D, Replication between A and C. The configuration was a success and I am able test the replication(B to C) when I have failed over the mirroring
dbs(A to B). The replication works fine after the mirroring fail over but I am not able to check its status in the Replication monitor. When I am having any insert in a table which is replicated in B, it is reflected back to C..it means the replication is
working fine.
Any thought on how I can view the status of replication from mirrored server. I tried adding the publisher in the monitor, but no luck. If I check the snapshot agent status, it says could not retrieve the info, same with the log reader agent status.
Any suggestions on this please.
Thanks, SiriFor example in your case...
Server A is principal and Server B is Mirror with either Manual or Automatic Failover.
Server A is replicated to Server B ( publisher & B is subscriber )
In Server A Database named Test_Mirror_Replication is configured for both mirroring and Replication.
Now you have failed over your Database 'Test_Mirror_Replication' from Server A to Server B.
After the Failover Server A will act as Mirror for DB 'Test_Mirror_Replication' & Server B will act as Principal for DB 'Test_Mirror_Replication'
Hope my understanding is correct ?
If yes then have you tried monitoring the replication after registering in other instance with current principal database sql instance name ? I mean current Publisher database name sql instance ? not your old sql instance name which was before the mirroring
role change or failover...
Hope you are trying with mirror database server name ?
Raju Rasagounder MSSQL DBA -
SQL Server 2008 R2 Replication - not applying snapshot and not updating all repliacted columns
We are using transactional replicating on SQL Server 2008 R2 (SP1) using a remote distributor. We are replicating from BaanLN, which is an ERP application to up to 5 subscribers, all using push publications.
Tables can range from a couple million rows to 12 million rows and 100's of GBs in size.
And it's due to the size of the tables that it was designed with a one publisher to one table architecture.
Until recently it has been working very smooth (last four years)) but we have come across two issues I have never encountered.
While this has happen a half dozen times before, it last occurred a couple weeks ago when I was adding three new publications, again a one table per publication architecture.
We use standard SS repl proc calls to create the publications, which have been successful for years.
On this occasion replication created the three publications, assigned the subscribers and even generated the new snapshot for all three new publications.
However, while it appeared that replication had created all the publications correctly from end to end, it actually only applied one of the three snapshot and created the new table on both of the new subscribers (two on each of the
publications). It only applied the snapshot to one of the two subscribers for the second publications, and did not apply to any on the third.
I let it run for three hours to see if it was a back log issue.
Replication was showing commands coming across when looking at the sync verification at the publisher and
it would even successfully pass a tracer token through each of the three new publications, despite there not being tables on either subscriber on one of the publishers and missing on one of the subscribers on another.
I ended up attempting to reinitialize roughly a dozen times, spanning a day, and one of the two remaining publications was correctly reinitialized and the snapshot applied, but the second of the two (failed) again had the same mysterious result, and
again looked like it was successful based on all the monitoring.
So I kept reinitializing the last and after multiple attempts spanning a day, it too finally was built correctly.
Now the story only get a little stranger. We just found out yesterday that on Friday the 17th
at 7:45, the approximate time started the aforementioned deployment of the three new publications,
we also had three transaction from a stable and vetted publication send over all changes except for a single status column.
This publication has 12 million rows and is very active, with thousands of changes daily.
, The three rows did not replicate a status change from a 5 to a 6.
We verified that the status was in fact 6 on the publisher, and
5 on both subscribers, yet no messages or errors. All the other rows successfully updated.
We fixed it by updating the publication from 6 back to 5 then back to 6 again on those specific rows and it worked.
The CPU is low and overall latency is minimal on the distributor.
From all accounts the replication is stable and smooth, but very busy.
The issues above have only recently started. I am not sure where to look for a problem, and to that end, a solution.I suspect the problem with the new publication/subscriptions not initializing may have been a result of timeouts but it is hard to say for sure. The fact that it eventually succeeded after multiple attempts leads me to believe this. If this happens
again, enable verbose agent logging for the Distribution Agent to see if you are getting query timeouts. Add the parameters
-OutputVerboseLevel 2 -Output C:\TEMP\DistributionAgent.log to the Distribution Agent Run Agent job step, rerun the agent, and collect the log.
If you are getting query timeouts, try increasing the Distribution Agent -QueryTimeOut parameter. The default is 1800 seconds. Try bumping this up to 3600 seconds.
Regarding the three transactions not replicating, inspect MSrepl_errors in the distribution database for the time these transactions occurred and see if any errors occurred.
Brandon Williams (blog |
linkedin) -
SQL Server 2008 R2 - Adding Replication Components to an Existing Installation
Hi All
I have a SQL Server 2008 R2 instance that I need to install Replication components on.
I've been going through the appropriate wizard and selecting to upgrade an existing instance, the wizard recognizes the SQL Server that we have installed so that one is selected. On the next screen, I'd expect to see the feature selector with everything
we currently have installed selected and greyed out, however nothing is selected (except for BOL).
So in order to select Replication Components, I'd have to also select Database Engine, suggesting that a new SQL Instance would be installed. Not wanting to do this, I'm having to abort.
I've tried a number of different ISOs now (one I found lying around on the server), but I haven't had any luck. My only option now seems to be to recreate the instance entirely, but that being a last resort, I was wondering if anyone may have had some experience
with this problem?
I am running the installer with the highest level of Windows and SQL access, if that helps.
Thank youJust to confirm when you try to install you select the option "Add features to an existing Instance of SQL" and below you see the instance name and you *Dont* see replication.
Now when you click next in the feature selection page you see replication as greyed out is that correct?
Regards, Ashwin Menon My Blog - http:\\sqllearnings.com
To confirm, the steps I'm taking are as follows:
Once all the Setup Support files have been installed, and the Setup Support rules have been checked (with no errors)
- At the Installation Type screen I select Add features to an existing instance of SQL Server 2008 R2. My server appears in the drop down as the only instance on this server. I see the list of installed instances too, and can confirm that Replication does
not appear in the Features column. I click next.
- At the Feature selection screen, the only items that are selected are Books Online, SQL Client Connectivity and Microsoft Sync Framework. No other features are selected and greyed out, where I would expect Database Engine Services, Analysis Services and
Reporting Services (among others) to be selected. Selecting SQL Server Replication at this stage results in Database Engine Services also being ticked, suggesting the wizard will add a new instance on this machine.
The only peculiarity that I've noticed is with the version number reported on the Installation Type screen, which shows 10.51.2500. Not the same as the version that is reported if I inspect object browser or I user the @@Version command. In fact, I believe
this version relates to MDS instead? This being said, our other production server reports the same version here, and I was able to install replication components here with no problem.
I hope this helps, I don't know if I can attach some images to my post to make it more clear? It's quite a difficult and unusual problem to explain! -
SQL SERVER 2008 R2 - REPLICATION BEGINNERS
Hi all Friends,
Am beginner to ms sql 2008 and i have installed sql Express edition and management studio and tried to do replication there some issues i have faced
1) Cant use my host as distributor
2) SQL server agent Edition is running
3)Cant create publisher also
May i know which edition supports for all replication ( Merge,Transactional,Snapshot)
Thankful to repliersYou do not mention what you are replicating to. SQL Server express can only be a merge replication subscriber. If you want to replicate to a SQL Server Standard Edition and above you will need to make the SQL Server Standard Edition server your publisher
and the SQL Server express edition your subscriber and then changes will move from the merge replication subscriber to the publisher and vice versa.
As the SQL Server Express client does not have SQL Server agent, you will need to do a push subscription from the Standard Edition, or run RMO, or a batch file which runs replmerg.exe on the subscriber. You might also be able to run web sychronization.
If the source and destination servers are both SQL Server Express editions you might want to use Sync Services.
looking for a book on SQL Server 2008 Administration?
http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941 -
SQL Server 2008 R2 and storage replication
Hello All !
On a Production site, I have a SQL Server 2008 R2 for a fat application. On a DRP site, I have the same SQL Server 2008 R2 fat application.
The production and DRP sites are interconnected with a physical SAN storage (synchrone replication). SAN LUNs are synchronous replicated (Data + logs).
In this case, is it necessary to keep logshipping beetween the 2 sites or the LUNs replication is sufficient ?
Thanks for advance for your ideas / help - Regards - Have a nice day ! RHUM2<<In this case, is it necessary to keep logshipping beetween the 2 sites or the LUNs replication is sufficient ?>>
That question is impossible for us to answer, since we don't know your requirements (SLA etc). But if you re-phrase your question, we can give feeback with which you hopefully can make that decision:
What can log ahipping protect me from which SAN replication can't? I can think of a couple of things (others are free to chime in):
Corruption at the page level. SAN replication give you a binary image of the data. If a page is corrupt at site A, it will be corrupt at site B. Log shipping work by retorting transaction log backups.
Delayed log restore. If a problem happens at site A, you can decide to have delayed log restores at site be and restore a log backup until just prior to the accident.
Both above assumes that you know what you are doing have basically have planned for these things. But technically, they are examples of things that log shipping allows for.
Tibor Karaszi, SQL Server MVP |
web | blog -
Understand SQL Server 2008 R2 replication features for a reporting database
Hi, I am using SQL Server 2008 R2 and working on building a reporting database using transactional push replication and want to know the downside that we should aware of using this.
For instance, is the data always available to the users even when changes are being written from the publisher?
I am also interested in learning replication mechanism & internals. How should I proceed?
Thanks in advance........
Ione>>For instance, is the data always available to the users even when changes are being
written from the publisher?
Answer is Yes.
For more information
http://www.codeproject.com/Articles/715550/SQL-Server-Replication-Step-by-Step
--Prashanth -
Replication Configuration issue after migrating from SQL Server 2005 to SQL Server 2008 R2
Hi All,
This weekend we have migrated one of our Core system from SQL Server 2005 SP3 to SQL Server 2008 R2 SP2. Migration went successful. However when we are trying to Configure transaction replication we are getting below Error:
Msg 21854, Level 16, State 1, Procedure sp_MSrepl_addarticle, Line 573
Could not add new article to publication 'abc' because of active schema change activities or a snapshot is being generated.
Background:
Database compability Changed from 90 to 100.
A quick Help would be appreciated.
Best Regards - Viral
Thanks - ViralIs a snapshot being generated? the message seems to indicate one is.
looking for a book on SQL Server 2008 Administration?
http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941 -
Good day!
I'm having a big problem in my SQL Server 2008 R2... I can't see the "Local Publication" under the Replication...
About not installing it, I guess that's not true because I checked all the features to install.
Is this a bug? Do I need to re-install my SQL Server 2008 R2? Or simply, do I need to do something simple without re-installing it?
PLEASE HELP....
See Link below:
http://oi59.tinypic.com/4jx3y1.jpgNone. This is a freshly installed SQL Server 2008 R2. After installing, All I did was create a database.
If you want to know how I did it, simply:
1. Open SSMS, connect to local server
2. Open Object Explorer
3. Expand your local server
4. Right+Click on the Database then clicked on to "New Database..."
5. Entered my database name then clicked "OK" -
SQL Server 2008 R2 Transaction Replication Tracer Tokens always pending
On a new transaction replication publiciation/subscription, the tracer tokens I generate always show pending for publisher to distributor and distributor to subscriber. The log reader agent is running and last action continues to update. The
Performance column in the repl monitor shows Excellent with a 00:00:03 latency. Distribution cleanup, agent history clean up, and replication agents checkup all show job succeeded and a resent last start time and their running times are usualy around
a second or show 00:00:00. On the subscriber, the "view synchronization status" is being updated with number of transactions and commands being delivered. I can confirm that updates are making it to the subscriber database. On
the surface, everything apears ok but I'm bothered by the tracker tokens not working.
this is SQL Server 2008 R2 10.50.1600.1 - OS is Windows Server 2008 R2 SP1.
-Larry
-LarryIn this case run sp_replcounters at the published db to see if the log reader delivers commands from the published db to the distribution db.
Yaniv Etrogi
site |
blog | linked in |
mail
Please click the Mark as Answer button if a post solves your problem! or
Vote As Helpful -
Windows Server 2008 and SQL Server 2008 R2 - ?? for replication with Oracle
Hello:
I am running Windows Server 2008 and SQL Server 2008 R2 - 64 bit
I need to replicate data between the SQL 2008 and Oracle 11.2 ?? with Oracle being the publisher
I also would lile SqlPlus installed on the server.
I need a definite answer as to what I should download from the Oracle download area. There are just so many packages and so many version I dont know what to download.
ThanksHi,
Currently Microsoft Windows Server 2008 and SQL Server 2008 are not supported for SAP Business One.
For detailed information about all supported platforms, we have the following link for your reference:
www.service.sap.com/smb/sbo >product availability > supported platforms.
Regarding the information on the service marketplace this is updated on a regular basis and provides the most up to date information regarding the supported platforms for Business One.
Platforms not mentioned in this documentation are not supported.
hope it helps,
Regards,
Ladislav
SAP Business One Forum Team -
Hi all
I'm trying to install SQL 2008 Express on my Computer: Hp compact DX7300 Slim tower.
and get this error:
TITLE: Microsoft SQL Server 2008 Setup
The following error has occurred:Error reading from file d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template\msdbdata.mdf. Verify that the file exists and that you can access it.
Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0&EvtType=0xF45F6601%25401201%25401
Log file
Overall summary:
Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Exit code (Decimal): -2068643839
Exit facility code: 1203
Exit error code: 1
Exit message: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Start time: 2014-12-09 23:22:03
End time: 2014-12-09 23:40:28
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\sql_engine_core_inst_Cpu32_1.log
Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0
Machine Properties:
Machine name: VISTA-PC
Machine processor count: 2
OS version: Windows Vista
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature
Language Edition Version Clustered
Package properties:
Description: SQL Server Database Services 2008
SQLProductFamilyCode: {628F8F38-600E-493D-9946-F4178F20A8A9}
ProductName: SQL2008
Type: RTM
Version: 10
SPLevel: 0
Installation location: d:\8268cd7b247d294de359c9\x86\setup\
Installation edition: EXPRESS
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: False
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
ENABLERANU: True
ERRORREPORTING: False
FEATURES: SQLENGINE,REPLICATION
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: *****
HELP: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: SQLExpress
INSTANCENAME: SQLEXPRESS
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
MEDIASOURCE: d:\8268cd7b247d294de359c9\
NPENABLED: 0
PID: *****
QUIET: False
QUIETSIMPLE: False
RSINSTALLMODE: FilesOnlyMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: VISTA-PC\VISTA
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: False
TCPENABLED: 0
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\SystemConfigurationCheck_Report.htm
I will very appriciate if someone can help me solve it. I was trying to set Full control for my account in Properties/Security of root folder and try again but error is still.
Many thanksHi Foreverduy,
Before you run SQL Server 2008 express setup, make sure that you have installed Windows installer 4.5 and.NET Framework 3.5 SP1 manually. For more information about the process, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms143506(v=sql.100).aspx. Moreover, please turn off all the third-party softwares which could prohibit the installation process.
According to your error message, the issue could be due to that your account has no rights to install SQL Server, or the corruption on the media.
Firstly, please ensure that your account has admin rights. Also make sure that you right-click the setup.exe and choose “Run as administrator” to complete the installation.
Secondly, please check if "msdbdata.mdf" file exists at d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template. If it exists, please make sure that your account has read permission to the extracted
folder.
However, if the file doesn't exist in the extraction, the media could be corrupt. Please download the
media
again and check if the issue still occurs.
Regards,
Michelle Li -
I have an Script mostly that is generated by SSMS which works with-out issue on SQL Server 2008, but when I attempt to run it on a new fresh install of SQL Server 2012 I get an Msg 8631. Internal error: Server stack limit has been reached. Please look for
potentially deep nesting in your query, and try to simplify it.
The script itself doesn't seem to be all that deep or nested. The script is large 2600 lines and when I remove the bulk of the 2600 lines, it does run on SQL Server 2012. I'm just really baffled why something that SQL Server generated with very
few additions/changes AND that WORKS without issue in SQL Server 2008 R2 would suddenly be invalid in SQL Server 2012
I need to know why my script which is working great on our current SQL Server 2008 R2 servers suddenly fails and won't run on an new SQL Server 2012 server. This script is used to create 'bulk' Replications on a large number of DBs saving a tremendous
amount of our time doing it the manual way.
Below is an 'condensed' version of the script which fails. I have removed around 2550 lines of specific sp_addarticle statements which are mostly just copy and pasted from what SQL Management Studio 'scripted' for me went I when through the Replication
Wizard and told it to save to script.
declare @dbname varchar(MAX), @SQL nvarchar(MAX)
declare c_dblist cursor for
select name from sys.databases WHERE name like 'dbone[_]%' order by name;
open c_dblist
fetch next from c_dblist into @dbname
while @@fetch_status = 0
begin
print @dbname
SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
use ['+@dbname+']
exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
use ['+@dbname+']
exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
-- Adding the transactional publication
use ['+@dbname+']
exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
'''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
= N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
@immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
@frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
-- There are around 2400 lines roughly the same as this only difference is the tablename repeated below this one
use ['+@dbname+']
exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script =
null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N''manual'', @destination_table = N''TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false'', @ins_cmd = N''CALL sp_MSins_dboTABLE_ONE'',
@del_cmd = N''CALL sp_MSdel_dboTABLE_ONE'', @upd_cmd = N''SCALL sp_MSupd_dboTABLE_ONE''
EXEC sp_executesql @SQL
SET @dbname = REPLACE(@dbname, 'dbone_', 'dbtwo_');
print @dbname
SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
use ['+@dbname+']
exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
use ['+@dbname+']
exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
-- Adding the transactional publication
use ['+@dbname+']
exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
'''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
= N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
@immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
@frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
-- There are around 140 lines roughly the same as this only difference is the tablename repeated below this one
use ['+@dbname+']
exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''DB_TWO_TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''DB_TWO_TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script
= null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N''manual'', @destination_table = N''DB_TWO_TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false''
EXEC sp_executesql @SQL
fetch next from c_dblist into @dbname
end
close c_dblist
deallocate c_dblist
George P Botuwell, ProgrammerHi George,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
If you have any feedback on our support, please click
here.
Allen Li
TechNet Community Support -
SQL Server Compact 3.5 Merge Replication With SQL Server 2012 - Causing IIS App Pool to Crash
Hi, I may be the only person in the world doing this but I wanted to give this information to anyone else who may follow this path in the future, and hopefully avoid a headache, or at least a paid support call to Microsoft.
My original scenario was we had a SQL Server 2008 Server using Merge Replication through and IIS (web server) to several Windows Mobile 6 devices. This has worked fairly well for a few years.
Recently we upgraded our SQL server to version 2012 SP 1. After moving the database over to the new server, and re-setting the merge replication stuff, we couldn't get merge replication to work on the Windows Mobile 6 handheld devices. The replication
would appear to start, and then we would get a message saying that the device could not get to the web site. The message on the handheld device was this:
"The IIS service is not available."
After doing some more research, we found that the start of the replication process was causing the Thread Pool that was running the SQLCESA35.dll to crash.
The SQLCESALOG.txt file had this information:
Date Time == SQLCESA Version ==> 3.5.8088.0
Date Time Hr=80004005 ERR:Couldn't find existing RSCB 1
After 2 days of trying to figure out the issue on our own, we gave in and called for paid Microsoft support. They eventually found a known issue where a cumulative update was able to fix the problem.
We installed the update on the IIS server and everything ran smoothly again.
FIX: Merge replication fails when you use SQL Server Compact to perform a merge replication that synchronizes changes with a publisher in SQL Server 2012
http://support.microsoft.com/kb/2845550
Seth O'NealHi sonealtx,
Glad to hear that the issue is resolved. Thanks for your sharing, other community members could benefit from your solution.
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support
Maybe you are looking for
-
File Not Found Error while installing
I am using Win 7- 64, downloaded Oracle 11g R2. my problem is while i am installing i am getting this error dialogue boxes repeatedly File Not Found F:\app\Poojaries\product\11.2.0\dbhome_1\owb\external\oc4j_applications\applications\WFMLRSVCApp.ear
-
I am using Adobe Acrobat 9.0 Pro to send a merged word document to a list of email receipents. I have created two word files, the first works fine but the second I always get the error message that "Acrobat PDFMaker was not able to mail merge the doc
-
Is there a way to get iPhoto to reconcile its library and search for photos that have been moved? I have reorganised a handful of photo folders and now iPhoto shows the thumbnail but no full size image. As I dont let iPhoto organise the photos for me
-
My G4 (OS 10.5.8) keeps going slower and slower after boot-up and eventually start getting beach balls after every action, even scrolling until it finally freezes. The CPU is constantly grinding.
-
Can't find save option in adjustment layer panel (CC 2014)
I can't find if anyone can help ?