.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Transactional Publication With Article Using DATE Datatype Causes Snapshot Agent to Fail with Error

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
So I am using SQL Server 2008 Enterprise Edition (64Bit) and have run into a strange problem that is baffling me. I have two tables that I need to replicate.  They are identical in specification except the name (one is for monthly stats and one daily stats) CREATE TABLE [dbo].[statsDailyLite]( [EntryDate] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsDailyLite] PRIMARY KEY CLUSTERED ( [EntryDate] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO CREATE TABLE [dbo].[statsMonthlyLite]( [EntryMonth] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsMonthlyLite] PRIMARY KEY CLUSTERED ( [EntryMonth] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO They both conatin a thousand or so test rows of data, and they are both in a transactional publication going to another SQL 2008 box. Now when the tables are empty

View Complete Post

More Related Resource Links

Transactional Publication With Updates Error on Subcriber


I have successfully created a Transactional Publication With Updates subscription and subscribed to it. Updates to the publisher are pushed down to the subscriber successfully. However, when trying to update the subscriber I get the following message:

Msg 21064, Level 16, State 1, Procedure sp_MSreplraiserror, Line 18
The subscription is uninitialized or unavailable for immediate updating as it is marked for reinitialization. If using queued failover option, run Queue Reader Agent for subscription initialization. Try again after the (re)initialization completes.

I have not been able to find any resolution for this. Please help.

Issue while Adding article in existing publication Transactional Replication.


We are facing difficulties adding article to an existing publication.The replication was setup by restoring the backup on subscriber  from publisher and changed the setting Intilialize from Backup =True

Used the following steps but it almost bought down the system.




@publication = N'marcus8rpl',

ERROR: The version of SQL Server in use does not support datatype 'date'.


I receive the subject error when I attempt to update a simple SQL database that I've created in Visual Web Developer 2005 Express Edition.  I also have SQL Server 2005 Express Edition installed.  I'm running XP SP3.


The database has one table called Customers with the following 5 fields: CustomerID (int) & primary key, FirstName (varchar(50)), LastName (varchar(50)), CreditLimit (smallmoney) and CustomerSince (smalldatetime).  I've added about a dozen records to the table.


I can display the table in the web site and select records.  However, after I add editing and deleting and attempt to update an edited record I receive the subject error which is pasted at the end of this question.  Thinking my installation of SQL Server 2005 was the problem, I uninstalled and reinstalled.  Still got the error.


NOTE:  I have created the same database on a virtual machine also running XP SP3 with the Express Edition products mentioned above.  The table updates with no error.


So I'm thinking the error message is probably not directly related to a SQL problem but some system problem that is on my host computer but not on my virtural machine.


Any ideas?

Error on Jquery Date Picker


HI all,

 I am using a Jquery datepicker in my project.There are a lot of pages where I use this date picker and w henever I select any date 

from that ,am getting an error  "length is null or not an object error on line 173"


The HMML for my datepicker control is

<input type="text" id="dpAgreementExpDate" runat="server" maxlength="10" />

sql server agent - job schedule 22022 error


Hi ! I have scheduled a job in sql server 2008 to send birthday e-mails. I run the script and it looks wroking but in agent schedule it doesn't. I am getting the below error; what is the problem?

TITLE: Microsoft.SqlServer.Smo
Start failed for Job 'Sending_transferdb_birthdate_e-mails'. 
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Start+Job&Link

Error while executing a package through SQL Server Agent

Hi All,   I have a ssis package. It has 3 tasks, first task updates a record in Oracle database to set an Indicator to “Y”, second task process SSAS Cube and the third again updates the same record and sets the indicator to “N”. This package has 2 data sources, one is Oracle and the other is Analysis Services. I gave the credentials for the Oracle and use NT Authority for Analysis services.   When I am executing from BIDS package is executing successfully. But when I am calling the job to execute this package its throwing me the error. Below is the error.     Message Executed as user: User\Username. ...ion 9.00.4035.00 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  10:57:46 AM  Error: 2010-08-27 10:57:46.79     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2010-08-27 10:57:47.16     Code: 0xC0202009     Source: Ord_test Connection manager &q

Initialize snapshot fro alternate location - multiple .bcp files for an article

I have to replicate over 50GB of data over a slow network.  I did not use the option to initialize snapshot from database backup because the replication articles contain row filters.  If I do that, I'll have to run a lot of scripts to remove the data and other unnecessary database objects on the subscriber. Instead, I created a workaround.  On the publisher, I first create the actual push subscription to the target subscriber on the publication.  This subscription is set not to initialize from snapshot.  I then created a second push subscription on the same publication, but the subscriber is a random database on the publisher server.  This second subscription is a dummy subscription set to initialize from snapshot - the purpose is to generate the necessary snapshot files.  I then reinitialized all subscriptions and generate the new snapshot files. On the subscriber, an empty database is created with the same tables as the publisher database.  I created an identical publication on this empty database, and a dummy push subscription on the target subscriber.  The subscription is reinitialized, and the snapshot files on the empty database is created.  These dummy snapshot files are then overwritten with the actual snapshot files created on the publisher, and then I synchronize the the dummy subscriptions with the actual sn

Error starting SQL Server Agent - Could not load the DLL xpstar90.dll. Reason: 126

AD Service account password was changed.  Now the SQL Server Agent (MSSQLSERVER) will not start even after updating the password.  Have no access into the databases.  Log files say "Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.)."  Service Account has Full rights on system.  Any help in solving the problem would be great.

Transactional publication with updatable subscriptions in SQL Server 2005, SvPk 2

Subscription to "Transactional Publication with Updateable Subscriptions" works only one way.  Changes take effect on subscriber, but the subcriber is unable to update data on publisher.   I have Sanpshot Agent process running under SQL Server Agent service account with login 'sa.'  All agents are running at the Distributor (Publishing Server.)   The subscriber is unable to connect to the Distributor using the SQL Server login.    Following is the error message I get:   Creating Subscription(s)... - Creating subscription for 'SQL3' (Warning) Messages Unable to set the Publisher login for the updatable subscription. You may have to set this up directly on the Subscriber machine using sp_link_publication. (New Subscription Wizard)------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------MSDTC on server 'SQL3' is unavailable.Changed database context to 'DB_SQL1_to_SQL3_on_3'. (Microsoft SQL Server, Error: 8501)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=8501&LinkId=20476   Please suggest procedure to end this dilemma.  The link has no info available.

Getting counts by 2nd Date Dimension Attribute with Snapshot Style Fact Table

  I have an MDX question finding hard to solve.  I have a Snapshot Fact Table with a snapshot of the records in the source system for each batch date.  All records in the fact table are assigned the batch date with the batch date key.  There are many records for each day and each batch date is an entire copy of the source records.  So, the grain of the fact table is one record for each batch date that exists in the source system.  These facts rows have another date in them for when the record was entered.  This date is different from the batch date in that the batch date is based on the day the batch was processed and the entered date is based on when the record was entered.  If a record was entered many days before, its batch date will be today but its entered date will be several days ago.  Therefore each day a copy of all the records entered the previous batch date and all the records added on today's batch date are present. Fact Table : FactSnaphshotKey (surrogate for easier administration) BatchDateKey (link to batch date dimension – date dimension, first in dimension list so it is used for semi aggregate measures) EnteredDateKey (link to entered date dimension – date dimension) Facts Count – measure for fact table - default measure from Analysis Services cube 2 Dim

change snapshot agent user (Agent security)

Hi, we have replicated dbon sql server 2008 (transaction replication) now we want to change the user used for the snapshot agent, from sql Managment studio go to publication property and then agent security and then snapshot agent (now we are using domain user) here we want to use the other option which is " to be run under sql server agent service account" but I couldnt choose this option because its unactive so how we can activate this option for existing replication without restarting the replication (i can use this option for the new replication wizard) Thanks

add new article to existing publication

I have an existing publication with 10 articles configured for Transactional replication. The replication is running fine. Now I wish to add another table (article) to this publication. My requirement is to ensure that I don’t need to generate a snapshot of all the articles being published, if I add a single article only that particular article should be published.

DATE datatype and Stored Procedures

It appears the SSIS doesn't support the date datatype as an input to a stored procedure. Please advise...Say you have the following procedure defined. CREATE PROCEDURE usp_SSIS_Date_Test @SubmitDate date AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here END GO Then you want to use it in an OLE DB Command in a data flow.The following error results: "Operand type clash: int is incompatible with date",Error at Data Flow Task []: Unable to retrieve destination column descriptions from the parameter of the SQL command.If I change the type from "date" to "datetime" in the stored procedure, everything works great. I would like to use the procs (hardened in production) as is. Short of wrapping all of them in procs with "datetime" and do the conversion myself, any suggestions?

after restoring content database getting error (HTTP/1.1 200 OK Server: Microsoft-IIS/7.5 Date: Tue,

Hi All, Problem i have taken backup of Old site content database procedure see below 1) first i changed the database to read only mode (Opened SQL Server2005-->selected DB--> properties--> Option-->Database Read-Only=True) 2) taken backup of database from the task--Backup(new.bak) 3) Copied the taken backup to new server and restored (Opened SQL Server2005 --> Right Click on Database Folder--> Restore Dataase) In To database: ihave given DB name From Device: i have selected database from the location where i have saved. click ok.  It has restored successfully 4) I have created a new webapplication and removed its content database from central admin. 5) with the help of stsadm command i restored the above db to this webapplication. then iam getting below error: HTTP/1.1 404 Connection: close Date: Tue, 14 Sep 2010 06:20:08 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET MicrosoftSharePointTeamServices: i have refered the below url for restoring http://metahat.blogspot.com/2008/11/backup-restoring-sharepoint-2007-site.html Please help. Thanks in advance.

Error: The replication agent has not logged a progress message in 10 minutes

Hello,      We are consistently getting the error message below on our subscribers that have blob images. Is there a way to increase a setting to avoid SQL to throw this error, or another suggestion? Thanks in advance.   John   Error messages: The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active.   18 -BcpBatchSize 10000018 -ChangesPerHistory 10018 -DestThreads 218 -DownloadGenerationsPerBatch 518 -DownloadReadChangesPerBatch 10018 -DownloadWriteChangesPerBatch 10018 -FastRowCount 118 -HistoryVerboseLevel 318 -KeepAliveMessageInterval 30018 -LoginTimeout 1518 -MaxBcpThreads 218 -MaxDownloadChanges 018 -MaxUploadChanges 018 -MetadataRetentionCleanup 118 -NumDeadlockRetries 518 -PollingInterval 6018 -QueryTimeout 40018 -SrcThreads 218 -StartQueueTimeout 018 -UploadGenerationsPerBatch 318 -UploadReadChangesPerBatch 10018 -UploadWriteChangesPerBatch 10018 -Validate 018 -ValidateInterval 60   Due to the memory leak issue with respect to replicating blobbed images we have changed UploadGenerationsPerBatch to = 3.

Transactional Replication: Agent Profiles

Can someone explain the different Agent profiles and when is it appropriate to use one over the other?  Agent profile, continue on data consistency error...when can this be used?

RMO Error: The subscription to publication has expired or does not exist

Hello,   I have seen several posts on this issue but none that seem to be answered or resolved. I note two posts on my browser that MS has identified as being similar to my problem. Again, none have been answered. (???? Microsoft ????)   I am having the error: "The subscription to the publication has expired or does not exist" - when I try to do a PullMerge subscription from the client. The subscription was created using RMO objects in a program. I am using stright Synchronization - not web. The resulting subscription is viewable in the SQL Server Management Studio and all the properties appear correct. No matter what, the subscription created through a program always fails with the above error.   IIf I create a subscription to the same publication using the SQL Server Management Studio, however, the PullMerge works. Both subscriptions look the same but both behave very differently. Obviously this is a security difference between the subscription made by the Mangement Studio and one made through a running application.   Can anyone shed some light on what these differences are? I read somewhere that the subscriptions and publications made through the Management Studio had a different security certificate than those through a program. What they were are not clear.   Most impotantly, how do I fix this problem?????     Code: ==============================     serverConn.C
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend