SQL 2005 Server (SP2) To SQL 2005 Express (SP2) Replication Looping/Excessive Repl Times

Sep 25, 2007

We have a large number of clients attempting to replicate two publications on 2005 Express databases (2 publications subscribed to the one subscriber database) with our 2005 Server (9.00.3042.00 SP2 Standard Edition) and experiencing two significant problems:

1) Users experience the following message:

The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the Subscriber for changes not yet sent to the Publisher. You must reinitialize the subscription (without upload).

This problem should not apparently occur with SQL Server 2005 (or 2005 Express) instances with SP2 applied. All clients experiencing this problem have SP2 installed as does our Server and the retention period is 30 days. The subscribers have been replicating well under that.


2) Replications never succeed after appearing to replicate/loop around for hours

This issue is the most critical as we have clients who have been installed and re-installed with new instances of SQL Server 2005 Express, new empty databases (on subscriber before snapshot extraction), and using fresh snapshots (less than an few hours old) which cannot successfully replicate.

Interestingly there is at least 1 instance where several computers are subscribed and successfully replicating the same database as another where replication refuses to succeed.

To test we have taken a republished database from another 2005 Server which is working fine and restored it to the same server as the one holding the database with which we are experiencing problems and subscribed to it. This test worked fine and replication of both publications went through fast and repeatedly without showing any signs of problem.

This indicates that the problem is perhaps data related as it appears localised to that database.

Below are two screenshots which may assist.

Screenshot 1 Shows that on the server side the replication attempts look like they are succeeding despite the fact that the subscriber end does not indicate success. Also the history indicates the the subscription has spent all it's time initialising and not merging any changes.

Screenshot 2 Shows a rogue process which has appears on many of the problem child subscribers. It shows a process running with no end time even though the job indicates failure in the message and even though other replication attempts appear to have succeeded after it. This process stays in the history showing that it is running even when I can find no corresponding process for it.

Can anyone suggest a further course of action/further testing/further information required which may assist?

This is extremely urgent and any assistance would be greatly appreciated!

Thanks in advance!

Scott

View 5 Replies


ADVERTISEMENT

Excessive Network Usage With SQL 2000 To SQL 2005 Transactional Replication

Aug 3, 2007

We have a SQL2000 database (Publisher) replicating inserts and updates across a 10Mb link to a SQL 2005 database (Subscriber). The Publisher has two tables we are interested in, 1 with 50 columns and 1 with 15. Both tables have 6 insert/update triggers that fire when a change is made to update columns on the publisher database.
We have set up a pull transactional replication from the Subscriber to occur against the Publisher every minute. We have limited the subscription/replication configuration to Publsih 6 columns from table 1 and 4 from table 2. Any change occuring on any other columns in the Publisher are of no interest. The SQL 2005 database has a trigger on table 1 and table 2 to insert values into a third table. There are around 7,000 insert/updates on table 1 and 28,000 on table 2 per day. All fields in the tables are text.
We are seeing "excessive" network traffic occuring of approximately 1MB per minute (approx 2GB per 24 hrs). We also see that the Distributor databases are getting very large -- upto around 30GB and growing until they get culled. We have reduced the culling intrval from 72 hrs to 24 hours to reduce the size.
Does anyone have any suggestions as to how this "excessive" network traffic can be minimised and how the distributor database size can be minimised. I think that maybe they are both related?

Thanks,
Geoff
WA POLICE

View 5 Replies View Related

SQL Server 2005 Express Installation Failed (10 Times)

Mar 16, 2008

This is my 10th attempt. I've uninstalled all the .net components and then reinstalled .net 2.0 and then various versions of SQL Server 2005 Express. Here's what all 10 error logs said:

Microsoft SQL Server 2005 Setup beginning at Sun Mar 16 18:26:46 2008
Process ID : 3808
c:fc0a616bb7e15d80b498fce92asetup.exe Version: 2005.90.3042.0
Running: LoadResourcesAction at: 2008/2/16 18:26:45
Complete: LoadResourcesAction at: 2008/2/16 18:26:45, returned true
Running: ParseBootstrapOptionsAction at: 2008/2/16 18:26:45
Loaded DLL:c:fc0a616bb7e15d80b498fce92axmlrw.dll Version:2.0.3609.0
Complete: ParseBootstrapOptionsAction at: 2008/2/16 18:26:46, returned false
Error: Action "ParseBootstrapOptionsAction" failed during execution. Error information reported during run:
Could not parse command line due to datastore exception.
Source File Name: utillibpersisthelpers.cpp
Compiler Timestamp: Wed Jun 14 16:30:14 2006
Function Name: writeEncryptedString
Source Line Number: 124
----------------------------------------------------------
writeEncryptedString() failed
Source File Name: utillibpersisthelpers.cpp
Compiler Timestamp: Wed Jun 14 16:30:14 2006
Function Name: writeEncryptedString
Source Line Number: 123
----------------------------------------------------------
Error Code: 0x80070002 (2)
Windows Error Text: The system cannot find the file specified.
Source File Name: cryptohelpercryptsameusersamemachine.cpp
Compiler Timestamp: Wed Jun 14 16:28:04 2006
Function Name: sqls::CryptSameUserSameMachine:rotectData
Source Line Number: 50
2
Could not skip Component update due to datastore exception.
Source File Name: datastorecachedpropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:27:59 2006
Function Name: CachedPropertyCollection::findProperty
Source Line Number: 130
----------------------------------------------------------
Failed to find property "InstallMediaPath" {"SetupBootstrapOptionsScope", "", "3808"} in cache
Source File Name: datastorepropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:28:01 2006
Function Name: SetupBootstrapOptionsScope.InstallMediaPath
Source Line Number: 44
----------------------------------------------------------
No collector registered for scope: "SetupBootstrapOptionsScope"
Running: ValidateWinNTAction at: 2008/2/16 18:26:46
Complete: ValidateWinNTAction at: 2008/2/16 18:26:46, returned true
Running: ValidateMinOSAction at: 2008/2/16 18:26:46
Complete: ValidateMinOSAction at: 2008/2/16 18:26:46, returned true
Running: PerformSCCAction at: 2008/2/16 18:26:46
Complete: PerformSCCAction at: 2008/2/16 18:26:46, returned true
Running: ActivateLoggingAction at: 2008/2/16 18:26:46
Error: Action "ActivateLoggingAction" threw an exception during execution. Error information reported during run:
Datastore exception while trying to write logging properties.
Source File Name: datastorecachedpropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:27:59 2006
Function Name: CachedPropertyCollection::findProperty
Source Line Number: 130
----------------------------------------------------------
Failed to find property "primaryLogFiles" {"SetupStateScope", "", ""} in cache
Source File Name: datastorepropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:28:01 2006
Function Name: SetupStateScope.primaryLogFiles
Source Line Number: 44
----------------------------------------------------------
No collector registered for scope: "SetupStateScope"
00DFCFC0Unable to proceed with setup, there was a command line parsing error. : 2
Error Code: 0x80070002 (2)
Windows Error Text: The system cannot find the file specified.
Source File Name: datastorepropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:28:01 2006
Function Name: SetupBootstrapOptionsScope.InstallMediaPath
Source Line Number: 44
Class not registered.
Failed to create CAB file due to datastore exception
Source File Name: datastorecachedpropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:27:59 2006
Function Name: CachedPropertyCollection::findProperty
Source Line Number: 130
----------------------------------------------------------
Failed to find property "HostSetup" {"SetupBootstrapOptionsScope", "", "3808"} in cache
Source File Name: datastorepropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:28:01 2006
Function Name: SetupBootstrapOptionsScope.HostSetup
Source Line Number: 44
----------------------------------------------------------
No collector registered for scope: "SetupBootstrapOptionsScope"
Message pump returning: 2

I'm a student and need this to work for projects. Any help will be greatly appreciated.

Bruce

View 6 Replies View Related

Some Times, SQL Express That Comes With VS 2005 If Failing.

Aug 19, 2007

Hi,

I installed VS 2005, but the optional component SQL Express is failing. The log says "SQL Express installation stopped due to unexpected errors". Can some one help me out how to resolve this issue?

Regards,
-Aazad.

View 3 Replies View Related

Can Not Generate Snapshot (SQl Server 2005 Transactional Repl )

Sep 15, 2005

Hi,

View 6 Replies View Related

Excessive Query Execution Times

Mar 16, 1999

We recently upgraded from SQL 6.5 to SQL 7. I have a few .sql files that were each running around 5 - 8 minutes under 6.5. These same files now each take over 30 minutes to run. Has anybody had problems with their queries taking longer to run under 7.0? These files are quite large and are comprised of 3 - 4 batches with several queries in each batch. If anybody has any thoughts on the cause please let me know.

Thanks in advance.

View 1 Replies View Related

How To Apply SQL Server 2005 Express SP1 To The Version Of SQL Server 2005 Express Which Installs With Visual Studio 2005?

Aug 8, 2006

When I installed VS 2005, it installed the default version of SQL Server 2005 Express that ships with Visual Studio 2005 installer media.

How can apply SQL Server 2005 Express SP1 to update this existing instance?

Currently, if I run this query:

SELECT @@version

I get the following:

Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

After applying SP1, I should get 9.00.2047.00.


Should I just go to this link and download & install the SQL Server 2005 Express Edition SP1:

http://msdn.microsoft.com/vstudio/express/sql/download/


Thank you,

Bashman

View 11 Replies View Related

Does SQL Server 2005 Express Support Web/Internet Replication To Other SQL Server Express Clients?

Jan 22, 2007

HI

Q1: Does Sql Server 2005 Express support Web/Internet to other SQL Server 2005 Express Clients or does it have to Synch across the internet to a fully installed setup SQL Server 2005 with IIS?

Q2: Does SQL Server 2005 Express support Direct Replication between other SQL Server 2005 Express clients?

Regards

View 5 Replies View Related

SQL Server Replication To SQL 2005 Express

Oct 31, 2006

Hello,

I am facing problems trying to replicate SQL Server 2000 table to SQL 2005 Express. The error says:

"login failed for user 'username'. The user is not associated with a trusted SQL server connection"

PS:
The same happens when I try to register the SQL 2005 server in SQL 2000 Enterprise Manager.


Any help?

Thanks
Walid

View 5 Replies View Related

RMO: Replication Between SQL Server 2005 Amd SQL Server 2005 Express

Sep 6, 2005

Hi!

View 14 Replies View Related

Replication From Sql Server 2000 To Sql Express 2005

Sep 15, 2006





I want to replicate data from sql server 2000 to a sql server express 2005 box.

I can dts data across..but I want to be able to set up push replication from the Sql Server 2000 box, but the option to push the data to the Sql Express server in the GUI does not come up only Sql Server 2000 boxes are listed. Initially I will be using Snapshot replication but would like to eventually move on to transactional rep if only I can get it to push the data across.

Does anyone know how to acheive this thanks for any help Sammy.









View 3 Replies View Related

SQL 2005 Express (with Advanced Adv) Install Of OWC11 And Reporting Services Fails 3 Times

Apr 5, 2008



Log shows this:

Product : OWC11
Error : Error 1311. Source file not found: C:DOCUME~1TOMCUR~1LOCALS~1TempIXP000.TMPSKU0A4.CAB. Verify that the file exists and that you can access it.
--------------------------------------------------------------------------------
Machine : D7NSJK71
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.8003.0
Install : Failed
Log File : c:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0005_D7NSJK71_OWC11_1.log
Last Action : InstallExecute
Error String : Source file not found(cabinet): C:DOCUME~1TOMCUR~1LOCALS~1TempIXP000.TMPSKU0A4.CAB. Verify that the file exists and that you can access it.
Error Number : 1311


When the dialog box appeared indicating file couldn't found, there was no option to look elsewhere for it the only option was retry or cancel which after 5 or 6 retries I cancelled. Everything else appears to have installed correctly for this instance.

Also earlier attempts to install have left services for named instances that I cannot install to such as SQLEXPRESS , SQLEXPRESS1 and CURRIEREXPRESS, I long ago had a beta version installed and have attempted numerous methods to completely wipe these out using the uninstallbetas tool from Microsoft as well as a number of suggestions from some posts.

Please help - The most significant reason I'm installing this is to practice creating SQL Reporting Service reports

View 3 Replies View Related

SQL Server 2005 Express Edition Performance And Replication

Feb 25, 2008

Wondering if anyone has any experience with SQL Server Express Edition (SSEXP). We're looking at a mobile sales force type model, so a local database on a laptop with no real time network connection. So the users would collect data locally, then connect up to the network every few days to replicate the data to a central server.
So questions.. Has anyone tried anything similar? How stable/mature is SSEXP? Any other thoughts, alternatives or gotchas anyone can think of?

Thanks for the input.

View 1 Replies View Related

Implement Manual Replication Between Two SQL Server 2005 Express?

Mar 2, 2007

Hi,

I need to synchronize the data between two SQL Server 2005 Express.

The database is really simple, just few tables (but data are inserted very often) without any triggers.

Since Express edition could not behave as a Publisher I was thinking about implementing manually a sort of Replication mechanism... It should be a sort of Transactional Replication with queueud updating.

Does it sound a good idea?
Has anyone done this before o there are better solution?

Thanks in advance,
Stefano

View 6 Replies View Related

Edited Data Won't Propagate Back To The Database (VB 2005 Express && SQL Server 2005 Express)

Dec 11, 2006



Hi,

I'm trying to learn some VB programming with the VB 2005 Express Absolute Beginner Series video tutorials (which I think is great) and have come across a problem that I can't solve.

When I follow the instructions in Lesson 9 (Databinding Data to User Interface Controls) my application will display the data from the database correctly and I can edit it (and as long as the debugger is running the data remains changed). However, the changes won't propagate back to the database. I don't get any error messages but after I edit the data, save (with the save button on the BindingNavigator toolbar), and end debugging the data in my database remains unchanged. When I use a MessageBox to show how many rows where edited/updated in the

Me.myTableTableAdapter.Update(Me.myDatabaseDataSet.myTable)

I get the correct number back. I'm sure the problem is not due to coding errors since I've also tried running the accompanying Lesson 9 project file that can be downloaded from MSDN and the problem persists.

I'm using Windows XP SP2, SQL Server 2005 Express Edition and VB 2005 Express Edition. I've tried installing SQL Server 2005 Express with a number of different settings, including default settings, but it doesn't make any difference.

Would greatly appreciate any feedback on this as I'm keen to resolve this problem so I can get on with the next tutorial lesson.

Thanks,
Ieyasu

View 6 Replies View Related

Merge Repl. Between 2000 & 2005

Sep 15, 2006

I'm in trouble again. I want to make merge replication between SS 2000 Enterprise and SS 2005 Express edition. 2000 will be publisher, 2005 will be subscriber. In addition I want to use push subsription at 2000 side, very last thing is it will be download only (I know how to make a merge rep. downloadonly, thanks god!). That's all I want to do.

I made a little search, it seems what I want can't be done automatically, using SMO or scripts is suggested. In one of other forums I saw "distibuter>=publisher>=subsriber" (refering sql server versions). Is it an incontestable truth that I cannot make SS 2000 a publisher where SS 2005 Express is subscriber?

How can I achieve my goal, isn't there anyway to make 2000 publisher for merge replication while a 2005 Express is subscriber?

Thanks

abdul

View 1 Replies View Related

How Can I Onnect Visual Basic Express 2005 To A Remote SQL Server Express 2005?

Sep 13, 2006

HiIm trying to connect Visual Basic Express 2005 to a remote SQL Server Express 2005. I cant find how i can do that in VB.net Express.In Web developer there are no problem to connect to a remote SQL server but i cant find it in VB.net Express. The XP with the SQL server that i want to connect to is on the local network. Greatful for help!

View 1 Replies View Related

Visual Basic 2005 Express And SQL Server 2005 Express - Display Image

Jun 13, 2007

Hi Guys,
I created a Product database table using Visual Basic 2005 Express and SQL Server 2005 Express. I have just added a new column [Picture] to the database table, which of course, should store an image or picture of a product. I am writing to kindly ask you guys for help .


i) How do I include image files into this column [Picture]?
ii) How do I get this image to display on Visual Basic 2005 Express form, so that when a product is selected the product image is displayed accordingly?


Your help much appreciated. Thanks.

Paul

View 8 Replies View Related

Merge Repl/new Bcp Files After 2005 Upgrade

May 27, 2008

I'll start off by saying these questions were submitted to Microsoft and no
one can give us an answer without them doing a source code review. Their
response was "these are internal BCP scripts that are used by SQL"....yes, I
know that....that doesn't help to explain why the system created them. At
this point, I don't want my compary to pay support hours for Microsoft
personnel to learn what their software does.
--------------------
We've had merge publication in place for several years.

Last year, we added some tables/articles to publications.

After the upgrade from SQL Server 2000 SP4 Standard to SQL Server 2005 SP2
Standard, when the snapshot was run, the system created some new files that
had never existed before. Also, and more importantly, these files were only
created for the articles added after the initial snapshot was created.
Articles existing in the intial snapshot did not have these type of files
created.

Examples of these files for a SA_MOVE table that was added to an existing
publication:

MSmerge_contents_SA_MOVE.bcp
MSmerge_contents_SA_MOVE_forall.bcp
MSmerge_rowtrack_SA_MOVE90.bcp
sysmergesubsetfilters_SA_MOVE.bcp
sysmergesubsetfilters_SA_MOVE90.bcp


Also some new bcps created were:

MSmerge_contents90_forall.bcp
MSmerge_genhistory90.bcp
MSmerge_rowtrack90.bcp
sysmergesubsetfilters90.bcp


The system wanted to apply these files before it would start synchronizing
data so they had to be delivered to the subscriber. It appears it was the
sysmergesubsetfilters_ files that it wanted to apply. These are all 0 in
size and we do not have filter on(at least not as far as I know...see the
addmergearticle code below).

New databases created this year that had all of the articles defined in the
publication before the initial snapshot was taken did not get these
additional files created, nor did the system want to try to send files to the
subscriber before syncrhonization could begin.

This is an example of how an article had been cretead under SQL Server 2000
when adding a new database, before an initial snapshot is run:

exec sp_addmergearticle @publication = N'Last', @article = N'SA_MOVE',
@source_owner = N'dbo', @source_object = N'SA_MOVE', @type = N'table',
@description = null, @column_tracking = N'true', @pre_creation_cmd = N'drop',
@creation_script = null, @schema_option = 0x000000003000EFF1,
@article_resolver = null, @subset_filterclause = null, @vertical_partition =
N'false', @destination_owner = N'dbo', @verify_resolver_signature = 0,
@allow_interactive_resolver = N'false', @fast_multicol_updateproc = N'true',
@check_permissions = 0

This is an example of how an article was added under SQL Server 2000 to an
existing publication that already had the initial snapshot run:

exec sp_addmergearticle @publication = N'Last', @article = N'SA_MOVE',
@source_owner = N'dbo', @source_object = N'SA_MOVE', @type = N'table',
@description = null, @column_tracking = N'true', @pre_creation_cmd = N'drop',
@creation_script = null, @schema_option = 0x000000000000EFF1,
@article_resolver = null, @subset_filterclause = null, @vertical_partition =
N'false', @destination_owner = N'dbo', @auto_identity_range = N'false',
@verify_resolver_signature = 0, @allow_interactive_resolver = N'false',
@fast_multicol_updateproc = N'true', @check_permissions = 0,
@force_invalidate_snapshot = 1


A few questions:

Does anyone have an idea why the system created these files are part of the
2005 upgrade?

What is the real purpose of the files with names such as _forall.bcp ?

Thanks for any help/info on this,

Doug

View 2 Replies View Related

Upgrading From Sql Server 2005 Express Edition To Sql Server 2005 Express With Advanced Services

Oct 4, 2006

If i have been using sql server 2005 express for developing my application and i decide to upgrade to sql server 2005 express with advanced services while still working on the same application, what will happen to my  application's database. Can i be able to continue with my work with out any major regrets.

View 1 Replies View Related

SQL 2005 Merge Repl Suddenly Stopped Working

Mar 28, 2006

Hello...

We have had Merge Replication working for the past few months (SQL 2005 to SQL Mobile) and suddenly today the replication URL that points to the SqlCESA30.DLL does not work. I have tried re-running the SQL Mobile virtual folder wizard a few times....resetting IIS and even a re-boot...and still the URL is not available.

Is there anything that might provide some clue as to why this has unexpectedly failed?

thanks for any help!

- will

View 3 Replies View Related

Visual Basic .NET 2005 Express && Sql Server 2005 Express Remote Server

Mar 12, 2007

Hi,
 I want to make a component library in Visual Basic.NET and connect to a remote Sql Server. When I create a new DataSet with the wizard, I can only connect to a .mdf file, but not to a Sql Server. With Visual Web Developer I can connect to a Sql server. What is the difference between these enviroments ? How can I do the same with Visual Basic.NET ?
 Thanks in advance.

View 1 Replies View Related

Upgrading From 'SQL Server Express 2005' To 'SQL Server Express 2005 With Advance Services'

Apr 20, 2006

Currently I have following things installed on my Computer





1. SQL Server Express 2005

2. SQL Server Management Studio Express 2005 CTP



I need to install following things

A. Microsoft SQL Server 2005 Express Edition with Advanced Services

B. Microsoft SQL Server 2005 Express Edition Toolkit



Do I need to uninstall any any of 1 or 2?

What should be my path to upgrade these software.









View 8 Replies View Related

How Do I Measure Bandwith Usage For Merge Replication SQL 2005 To Sql Server Mobile 2005?

Jan 24, 2007

Hi,

Is there any way to measure bandwith usage during merge replication between sql server 2005 and sql server mobile 2005 running on a cradled wm5 mobile device.

Attaching the windows performance monitor to the network connection established over usb would work although I was wondering if there was something specific for this case integrated into Sql server 2005 / sql server mobile 2005 / Sql server management studio / third party tools that i could use ?

thnx,

pdns.

View 4 Replies View Related

Merge Replication - SQL Server 2005, Windows Vista And MSVisual Studio 2005

Jul 11, 2007

Hello everybody!

I hope that someone could help me.

I have a problem when i start sincronyzing with the emulator of MSVS2005 to SQL2005 in Windows Vista. I have the same program in the emulator, but sincronyzing with windows XP Pro and no problem...



I configure the connection to use the IUSR.



The source code that i use:



repl.InternetUrl = @"http://laptop/SQLMobileIIS/sqlcesa30.dll";

repl.Publisher = @"laptop";

repl.PublisherDatabase = @"database";

repl.PublisherSecurityMode = SecurityType.NTAuthentication;

repl.Publication = @"Pubdatabase";

repl.Subscriber = @"SQLMobile";

repl.SubscriberConnectionString = @"Data Source='" + nomeFicheiroBD + "';Password='3409'";



The error that returns is:



"Failure to connect to SQLServer with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect"



Does anybody knows what i can do?

HELP I NEED SOMEBODY TO HELP!

Thanks!

View 1 Replies View Related

Help Needed In Merge Replication, SQL Server 2005 Mobile Edition And VC# 2005

Apr 10, 2008

I have written following code in my application

I just want to display all the data of a Single table into a Data Grid, I know that we can drag and drop the table on to a form and datagrid is generated, but here I want to retrive those values through my code, how should i do that

I am getting following errors while running the program
Error 1) Error No. 28037, MS SQL Server 2005 Evrywhere Edition
Error: A request to send data to the computer running IIS has failed. For more information see HRESULT
Error 2) Error No. 0, SQL Server 2005 Evrywhere Edition ADO.Net Data Provider
Error: The specified table does not exist [ JobLists ].

Can anybody please tell me, where I went wrong ??? In this code anywhere else????

Note: While adding a Data Source of SQL Server 2005 Mobile Edition, I have added that .sdf file into my project, thats why I have written the Data Source as : .DbFile.sdf



@"Data Source = .DbDotNetCF.sdf";


The code is as follows:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;

namespace DeviceApplication1
{
public partial class Form1 : Form
{
string filename = @".DbDotNetCF.sdf";

private DataSet dsJobLists;

public Form1()
{
InitializeComponent();
}

private void DeleteDB()
{
if (System.IO.File.Exists(filename))
{
System.IO.File.Delete(filename);
}
}

private void Sync()
{
SqlCeReplication repl = new SqlCeReplication();

repl.InternetUrl = @"http://localhost/WebsiteDotNetCF/sqlcesa30.dll";
repl.Publisher = @"RAHU";
repl.PublisherDatabase = @"DotNetCF";
repl.PublisherSecurityMode = SecurityType.NTAuthentication;
repl.Publication = @"PubDotNetCF";
repl.Subscriber = @"SubDotNetCF";
repl.SubscriberConnectionString = @"Data Source='" + filename + "';Max Database Size=128;Default Lock Escalation =100;";
try
{
if (!System.IO.File.Exists(filename))
{
repl.AddSubscription(AddOption.CreateDatabase);
}
repl.Synchronize();
}
catch (SqlCeException ex)
{
DisplaySQLCEErrors(ex);
}
finally
{
repl.Dispose();
}


// Display Same Data In Another DataGrid : dataGrid1
SqlCeConnection cn = new SqlCeConnection(@"Data Source='" + filename + "'");

SqlCeDataAdapter daJobLists = new SqlCeDataAdapter("SELECT JobListsID, JobID, PersonID FROM JobLists", cn);
if (dsJobLists == null)
{
dsJobLists = new DataSet();
}
try
{
dsJobLists.Clear();
daJobLists.Fill(dsJobLists, "JobLists");
dataGrid1.DataSource = dsJobLists.Tables["JobLists"];
}
catch (SqlCeException ex)
{
DisplaySQLCEErrors(ex);
}
}

private void DisplaySQLCEErrors(SqlCeException ex)
{
for (int i = 0; i < ex.Errors.Count; i++)
{
MessageBox.Show("Index #" + i.ToString() + ""
+ ex.Errors.Source + ""
+ "Error: " + ex.Errors.Message,
"Error No. " + ex.Errors.NativeError.ToString());
}
}

private void Form1_Load(object sender, EventArgs e)
{
Sync();
DeleteDB();

if (DbDotNetCFDataSetUtil.DesignerUtil.IsRunTime())
{
// TODO: Delete this line of code to remove the default AutoFill for 'dbDotNetCFDataSet.JobLists'.
this.jobListsTableAdapter.Fill(this.dbDotNetCFDataSet.JobLists);
}
}
}
}



I have created a merge replication correctlly( I suppose, there were no errros)
Please help

Your help will be appriciated

View 1 Replies View Related

Replication In SQL Express 2005

Apr 30, 2006

Hello:
I tried to set up a pull transctional replication on SQL Express 2005.
The publisher is SQL 2000 which has tables that have primary keys.
However, only tables I see in my SQL express (Subscriber) are the system tables. What did I do wrong?

I can't find the right answer on the web.
Thanks
GCP

View 1 Replies View Related

Sql 2005 Express + Replication

Oct 11, 2006

Hi,

does any know of any plans to support publications in Sql 2005 Express? I want to start moving away from MSDE but we use replication (one MSDE database is the publisher and several client PC's use MSDE as the subscribers.).

Maybe it is on SP2?

Thanks for any info you have on this.

Graham

View 5 Replies View Related

Web Replication From SQL 2005 Express

Nov 22, 2006

I have tried to setup Web replication following the instructions in the articles in SQL Books Online, using RMO. I am able to create the subscription, but when I try to sync it I get the following error.

The process could not create file 'C:DOCUME~1lsimpsonLOCALS~1TempHNTBW115D$B_borings_BoringsAll_C:BORINGSBORINGDB.MDF' due to OS error 123.

Is anyone familiar with this error? If I can solve it, I think the replication will work.

View 7 Replies View Related

Web Replication From SQL 2005 Express

Apr 16, 2006

I am attempting to set up the following:

SQL Server 2005 with Merge Publication

Web Replication Enabled
IIS Configured as documented, except DB server is an AD Domain Controller so can't assign Local User to Application Pool

SQL 2005 Express

Using RMO to create subscription
Using Basic Authentication of HTTPS
Calling the replisapi.dll?diag works fine

When I attempt to do a web synchronization with the Publisher, I get the following error:

The Merge Agent could not connect to the URL 'https://test.abc.com/TestWebReplication/replisapi.dll' during Web synchronization. Please verify that the URL, Internet login credentials and proxy server settings are correct and that the Web server is reachable.

Does anyone have any suggestions. I am sure it has something to do with the security setup on the Publisher, but I can't think of anything else to try.

Thanks

View 6 Replies View Related

Replication Between SQL Express 2005

Jan 8, 2007



Hi All,

I am trying to do a Replication between a network SQL Server Express Edition 2005 DB with a client SQL Server Express Edition 2005 DB. My question is

1. Can we do replicaiton between SQL Server Express Edition 2005. (No SQL SERVER present)

2. If yes can any of you provide me some guidance or some pointers on how to achieve it.



Thanks

Suresh

View 1 Replies View Related

Looping Through Table To Exec An SP Many Times

Dec 31, 2006

Hi,
If i have an SP called mySP that accepts one parameter @param
If I have a table of paramaters with only one column like this:
Param1
Param2
..
ParamN

How do I do if I want to execute the SP on all the table fields:
some thing like this:
Exec my SP 'Param1'
Exec mySP 'Param2'
...
Exec mySP 'ParamN'
I want that automatically since the parameters are going to be in a table called myTblParams
Notice that I don t want to pass all the parameters to the SP just once but only one value each time I execute the SP since mySP ccepts only one parameter.

Thanks a lot for guidelines

View 8 Replies View Related

Transact SQL :: Looping For 100k Times?

May 13, 2015

I have created approximately 200lines of multiline table function. getting table variable values as what I need satisfying all our business rules.

my question : is it okay in performance wise using loop i executed this function 100000 times and it took around 16mins.

View 10 Replies View Related







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