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
ADVERTISEMENT
Apr 21, 2008
Hi,
I have a Windows 2008 server 64-bit SP1 and I have installed SQL 2005 SP2 Enterprise Edition 64-bit. My current version is 9.00.3042.00. I am trying to configure Reporting Services and I am having lots of trouble getting the Application Pools to work properly. I have followed the Microsoft Technet paper 839480 "How to Install and Configure Reporting Services on Windows Server 2008". In the "Configure Reporting Services" part, I have successfully configured everything (all arrows are green) and have the following setup:
Report Server Virtual dir: ReportServer Default Web Site
Report Manager Virtual dir: Reports Defualt Web Site
Windows Service Identity: ReportServer with a service acct login
Web Service Identity:
Report Server: ReportServer,
Report Manager: DefaultAppPool (I get an error when I try to configure it to anything else: ReportServicesConfigUI.WMIProvider.WMIProviderException: An unknown error has occurred in the WMI Provider. Error Code 800708AC at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.SetWebServiceIdentity(String applicationPool)
The one thing I notice in the SQL Server configuration manager is that there is a red dot next to the SQL Reporting Services services even though the green arrow is there to show it is running.
When I look in IIS7, I see the application pools Reports and ReportServer and they are both in Integrated mode. When I try to go to http://localhost/reportserver, it gives an error. It will work if I change both application pools to classic. But then when I try to go to http://localhost/reports, I get an error:
"REQUEST IS NOT AVAILABLE IN THIS CONTEXT".
I have read up on IIS7 and it says that:
"This error is due to a design change in the IIS7 Integrated pipeline that makes the request context unavailable in Application_Start event. When using the Classic mode (the only mode when running on previous versions of IIS), the request context used to be available, even though the Application_Start event has always been intended as a global and request-agnostic event in the application lifetime."
So, how do I configure these application pools to work using IIS7 with SQL 2005 Reporting Services on a Windows 2008 server? I have tried all kinds of different things based on what I am reading on the net and nothing is working. Anybody have any suggestions?
Thanks!
Isabelle
View 3 Replies
View Related
Jul 17, 2007
Hello
I have server "123456" SQL 2005 On clustered environment. I added permissions to snapshot folder, it is on sharing for both nodes.
I got error during the set up as:
Microsoft.SqlServer.ConnectionInfo
Additional Information:
An exception occurred while executing a TSQL or Batch(
Microsoft.SqlServer.ConnectionInfo)
An error occurred during the execution of xp_cmdshell. A call to "Create Process" failed with error code 5
Destination path d:Microsoft SQL ServerMSSQL.1MSSQLData is not Valid. Unable to list directory contents. Specify a valid destination path
Changed database context to 'master' (Microsoft SQL Server, Error 15121)
The datafolder exists, sql cluster service account from domain added in to snapshot folder, administrators access also on this folder.
Please advice how to troubleshoot this issues. Thanks, Jay
View 1 Replies
View Related
Apr 28, 2014
Is it possible to configure transnational replication between two different domains also non trusted domains.
It's possible means what i need to take care before configure replication and how to configure transnational replication between two different domains.
View 2 Replies
View Related
Nov 6, 2012
I have a software that is running with SQL Server 2005. The software has an utility to configure replication between 2 databases. When I was trying to configure it, for some reason the tool convert my main user database under system databases.
I need to put it back again under user databases.
Im thinking to backup my database first and put it offline and the restore the database again. But Im not to expert in SQL and also I am not sure if this will work putting back the database as a user database.
View 4 Replies
View Related
Dec 15, 2014
We are planning to setup HA using either AAG or FC. ON my production environment (P), I have transnational replication configured for 2 of databases out of three. These data get replicated to another server( C1) hosted on cloud, with local distributor at P.
If I configure AAG/ FCI , how do I handle failover?I wanted to setup P as primary AAG with two replicas as S1 and S2. P->S1 will be synchronous while P->S2 will be asynchronous.Incase my P goes down how the replication will failover S1? Incase P and S1 goes down how do I failover to S2 with the replication.
View 1 Replies
View Related
Jul 16, 2007
Hopefully simple question:
How to configure replication so that replication triggers issue a SET NOCOUNT ON?
Also: are there any negative consequences of adding a SET NOCOUNT ON to replication triggers?
I'm not a DBA so my experience with replication is pretty much non-existent. Hopefully, there's a simple configuration option that I can apply when setting up replication for a database. If not, is it going to be feasible for me to write a script that runs over the replication triggers/procs to add this SET statement (any pointers on inbuilt procs that would help here would be real useful)?
Thanks in advance
Christian
View 6 Replies
View Related
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
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
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
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
View Related
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
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
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
Jan 21, 2015
I wanted to schedule the transaction replication. How do I do it? Currently I have set up a transaction replication which runs continuously and synchronizes the changes with immediate effect.
I need to configure a replication which will gather logs from the publication once in a day.
Is there any possibility?
View 1 Replies
View Related
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
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
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
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
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
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
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
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
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
Mar 26, 2015
I need a script that will return the replication status as small int.
View 1 Replies
View Related
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
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
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
Jun 10, 2015
I've been asked to put together an estimation for the performance impact that replication would have on our database server during a particular operation. I know that this depends on a lot of different factors, including:
* Number of articles being replicated
* Types of articles being replicated
* Number of DML transactions that would result in delivery of replicated data
Any way to turn this into a meaningful metric?
View 0 Replies
View Related
Jun 14, 2015
I am getting the error The transaction log for database 'ReplicationDB' is full due to 'LOG_BACKUP'.log_reuse_wait_desc from sys.databases is showing logbackup
The database is subscribed database. We configured transactional replication. But the transactional replication is getting errors and failed. Is there relation b/n this replication failures and log growth in subscriber db?
View 3 Replies
View Related
Jul 29, 2015
I am replicating a stored procedure execution, which builds and executes the following dynamic SQL command:
IF EXISTS (select * from MyDB..sysfiles sf (nolock) where name = 'MyDB_201201')
ALTER DATABASE [MyDB] REMOVE FILE [MyDB_201201]
IF EXISTS (select * from MyDB..sysfilegroups sfg (nolock)
where groupname = 'MyDB_201201' and sfg.groupname not in(
SELECT distinct fg.name file_group_name
[Code] ....
I can run this SP with no errors on both the publisher and the subscriber. However, when I try to replicate the execution of this SP, I get an error in replication monitor:
ALTER DATABASE statement not allowed within multi-statement transaction. (Source: MSSQLServer, Error number: 226)
How can I change my code to workaround this? Perhaps some explicit transactions?
View 6 Replies
View Related
Aug 12, 2015
I have transactional replication configured where the publisher and subscriber are on two different servers. Yesterday a database upgrade was carried out, and the DBA dropped replication by issuing sp_removedbreplication on the published database. The subscription is still set up.
I have two questions:
1 - What is the safest way to temporarily switch off replication without losing the publication or subscription? As far as I was aware (my replication knowledge isn't great), simply disabling the relevant agents would do the job.
2 - I now have the task of creating the publication again (fortunately we have a saved script). If I recreate this publication, will I be able to point the existing subscription at it?
View 0 Replies
View Related
Sep 15, 2015
We have a large database with a small number of large tables in it (and a larger number of SMALLER tables), and it is a publisher for a transactional replication scenario. When I create a snapshot to initialize a new subscription, I notice with the larger tables that sometimes it generates multiple files in the snapshot folder, usually in multiples of 16, and numbers them like this:
MyTable_3#1.bcp
MyTable_3#2.bcp
...
MyTable_3#16.bcp
With other tables, I'll get just one LARGE snapshot file, named:
MyOtherTable_4.bcp
In the latter case, the file can be very large (most recent is 38GB).
In both cases, the subscription will eventually be initialized, but the smaller files will generate separate log entries every few minutes in the Replication Monitor, showing 'Bulk Copied data into 'MyTable' (34231221 rows)', whereas the larger table will generate only ONE log entry, showing 'Bulk coping data into table 'MyOtherTable', and it may take a couple of hours before there is anything else showing...except for an entry saying, 'The process is running and is waiting for a response from the server.'
My question is: what would be the difference between the two tables that would result in one generating MULTIPLE snapshot files, the other only a single, much larger one? The only difference I can see in the table definition is that the one generating multiple files has a clustered index, whereas the others do not.
View 0 Replies
View Related