Showing posts with label back. Show all posts
Showing posts with label back. Show all posts

Tuesday, March 20, 2012

Applying the updates to SQL Mobile Server?!

Dear MSDN Support,

Here i am back with an inquiry about the last process of Merge Replication between SQL Mobile 2005 and SQL Server 2005.

Well i have performed all the steps found in the tutorial of the SQL Mobile Edition Books Online, and everything went on so fine and smooth. Now when i deploy my application on the Pocket PC emulator all possible SQL queries work and modify the data only in the emulator, i had installed ActiveSync 4.0 and it synchronizes the SQL Mobile data with the SQL Mobile server only when i copy the database from the emulator to my desktop, and this way is not efficient to my project, i need a better way to synchronize the data between the database on the emulator and that on the SQL Mobile Server.

I'll be looking forward to getting your help as soon as possible.

Thank you for your attention.

Best Regards;

Just FYI: there's no “MSDN support” on these forums, all answers are provided by

volunteers including your fellow developers, MVPs and Microsoft's employees.

|||

Thank you for your notice, and thank you for spotting at my problem!

|||

Mr Ahmad,

Just checking - did you figure out how to perform replication from your emulator to SQL Server? I couldn't tell from yor last post if you had solved your issue and are doing ok now. Let us know.

Thanks,

Darren

|||

Dear Darren,

I appreciate your reply alot, regarding the replication from the emulator to SQL Server, i had written the following code to my project and i am calling the function synchronize from a simple button.Here is the code i wrote for the Sync.

Dim repl As New SqlCeReplication()

repl.InternetUrl = "http://TOSHIBAMAN/Clinic/sqlcesa30.dll"

repl.Publisher = "TOSHIBAMAN"

repl.PublisherDatabase = "Clinic"

repl.PublisherSecurityMode = SecurityType.NTAuthentication

repl.Publication = "Clinic"

repl.Subscriber = "Clinic"

repl.SubscriberConnectionString = "Data Source=\My Documents\Clinic.sdf; Max Database Size=128;Default Lock Escalation =100;"

Try

repl.AddSubscription(AddOption.ExistingDatabase)

repl.Synchronize()

Catch err As SqlCeException

MessageBox.Show(err.ToString)

End Try

When clicking the button Synchronize the emulator fires the following message:

The SQL Mobile subscription already exists. Publisher, PublisherDatabase,and Publication for
this subscription should be different from any existing subscription

So what i do is to sync the database in the emulator and that in the SQL Mobile through the ActiveSync 4.0 then i connect to my database in the SQL Mobile and expand Replication right click on the subscription and choose to Synchronize the subscription.

But after i read some threads here, and the books online i do believe that there is a way which synchronizes the subscription from the emulator to the SQL Mobile to the original database engine!!

I'll be looking forward to getting your comments and advices.

Thank you alot for your attention!

Best Regards;

|||

Mr Ahmed,

Your code is very close - here are some corrections:

1. if you choose to use NT Authentication, you will have to provide the InternetLogin and InternetPassword properties as well. I suggest you start out by just using anonymous authentication until you have the replication working and then add more security afterwards.

2. in the connection string, it is not necessary to say max database size = 128 and Lock Escalation = 100 because these are the default values for SQL Mobile

3. if you are trying to dynamically create the Clinic.sdf SQL Mobile database upon the first merge replication synchronize, then you want to use AddOption.CreateDatabase.

So some sample code would look like this:

Public Function GetReplication() As SqlCeReplication

Dim repl As SqlCeReplication = Nothing

Try
repl = New SqlCeReplication()

repl.InternetUrl = Configuration.GetAppSetting("REPLICATION_URL")
repl.Publisher = Configuration.GetAppSetting("REPLICATION_PUBLISHER")
repl.PublisherDatabase = Configuration.GetAppSetting("REPLICATION_PUBLISHER_DB")
repl.PublisherSecurityMode = SecurityType.NTAuthentication
repl.Publication = Configuration.GetAppSetting("REPLICATION_PUBLICATION")
repl.Subscriber = Configuration.GetAppSetting("REPLICATION_SUBSCRIBER")
repl.SubscriberConnectionString = Configuration.GetAppSetting("REPLICATION_SUBSCRIBER_CONNECTION_STRING")

If Not System.IO.File.Exists(_dbmsFile) Then
repl.AddSubscription(AddOption.CreateDatabase)
End If

Catch ex As Exception
DisplaySQLCEErrors(ex)
Return Nothing
End Try

Return repl

End Function

Where the value of _dbmsFile (in your case) is "\My Documents\Clinic.sdf"

The point of the code sample above is to show you the minumum set of properties you need to set on the SqlCeReplication object in order for it to work, as well as how to handle dynamically creating the SQL Mobile database the first time (if it doesn't already exist)

Since you are using an emulator, you need to ensure that the emulator's network settings are configured to communicate with IIS and SQL Server on the server (which I can see is the same development machine you are running the emulator on). So open Pocket Internet Explorer on the emulator and try the URL http://TOSHIBAMAN/Clinic/sqlcesa30.dll to verify that you can get to the SQL Mobile server tools directory on IIS.

Darren

sql

Thursday, February 9, 2012

Anyone using Win Server 2003 and Shadow Copy to back up SQL.

Anyone using Win Server 2003 and Shadow Copy to back up SQL. If so can you
point me at any resourses. MS KB seems thin on the subject.
Thanks in advance
Allen
This seems like a good start:
http://www.microsoft.com/downloads/d...DisplayLang=en
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Allen Davidson" <allen.davidson@.europe.mccann.com> wrote in message
news:%231k5ReXpEHA.3364@.TK2MSFTNGP10.phx.gbl...
> Anyone using Win Server 2003 and Shadow Copy to back up SQL. If so can you
> point me at any resourses. MS KB seems thin on the subject.
> Thanks in advance
> Allen
>
|||Hi Tibor,
Thanks for the link. I see they have provided a guide on how to use the API
(althought the examplers are in c!)
I probably phrased the question wrongly - I wondered if anyone had
experience of actually using it - it seems from the link that the only way
to use it is to write your own application - or possibly a vs script?
Allen
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:O8kcBIhpEHA.2948@.TK2MSFTNGP11.phx.gbl...
> This seems like a good start:
>
http://www.microsoft.com/downloads/d...a51-65a3-4e8e-
a4c8-adfe15e850fc&DisplayLang=en[vbcol=seagreen]
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Allen Davidson" <allen.davidson@.europe.mccann.com> wrote in message
> news:%231k5ReXpEHA.3364@.TK2MSFTNGP10.phx.gbl...
you
>
|||Seems no-one but me jumped in here... I read somewhere that Shadow Copy will be supported for SQL
Server 2005. This implied that it isn't supported with the current versions. I'm afraid I can't find
that statement, though...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Allen Davidson" <allen.davidson@.europe.mccann.com> wrote in message
news:O4XNfYhpEHA.348@.TK2MSFTNGP15.phx.gbl...
> Hi Tibor,
> Thanks for the link. I see they have provided a guide on how to use the API
> (althought the examplers are in c!)
> I probably phrased the question wrongly - I wondered if anyone had
> experience of actually using it - it seems from the link that the only way
> to use it is to write your own application - or possibly a vs script?
> Allen
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:O8kcBIhpEHA.2948@.TK2MSFTNGP11.phx.gbl...
> http://www.microsoft.com/downloads/d...a51-65a3-4e8e-
> a4c8-adfe15e850fc&DisplayLang=en
> you
>

Anyone using Win Server 2003 and Shadow Copy to back up SQL.

Anyone using Win Server 2003 and Shadow Copy to back up SQL. If so can you
point me at any resourses. MS KB seems thin on the subject.
Thanks in advance
AllenThis seems like a good start:
http://www.microsoft.com/downloads/details.aspx?FamilyID=416f8a51-65a3-4e8e-a4c8-adfe15e850fc&DisplayLang=en
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Allen Davidson" <allen.davidson@.europe.mccann.com> wrote in message
news:%231k5ReXpEHA.3364@.TK2MSFTNGP10.phx.gbl...
> Anyone using Win Server 2003 and Shadow Copy to back up SQL. If so can you
> point me at any resourses. MS KB seems thin on the subject.
> Thanks in advance
> Allen
>|||Hi Tibor,
Thanks for the link. I see they have provided a guide on how to use the API
(althought the examplers are in c!)
I probably phrased the question wrongly - I wondered if anyone had
experience of actually using it - it seems from the link that the only way
to use it is to write your own application - or possibly a vs script?
Allen
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:O8kcBIhpEHA.2948@.TK2MSFTNGP11.phx.gbl...
> This seems like a good start:
>
http://www.microsoft.com/downloads/details.aspx?FamilyID=416f8a51-65a3-4e8e-
a4c8-adfe15e850fc&DisplayLang=en
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Allen Davidson" <allen.davidson@.europe.mccann.com> wrote in message
> news:%231k5ReXpEHA.3364@.TK2MSFTNGP10.phx.gbl...
> > Anyone using Win Server 2003 and Shadow Copy to back up SQL. If so can
you
> > point me at any resourses. MS KB seems thin on the subject.
> >
> > Thanks in advance
> >
> > Allen
> >
> >
>|||Seems no-one but me jumped in here... I read somewhere that Shadow Copy will be supported for SQL
Server 2005. This implied that it isn't supported with the current versions. I'm afraid I can't find
that statement, though...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Allen Davidson" <allen.davidson@.europe.mccann.com> wrote in message
news:O4XNfYhpEHA.348@.TK2MSFTNGP15.phx.gbl...
> Hi Tibor,
> Thanks for the link. I see they have provided a guide on how to use the API
> (althought the examplers are in c!)
> I probably phrased the question wrongly - I wondered if anyone had
> experience of actually using it - it seems from the link that the only way
> to use it is to write your own application - or possibly a vs script?
> Allen
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:O8kcBIhpEHA.2948@.TK2MSFTNGP11.phx.gbl...
> > This seems like a good start:
> >
> http://www.microsoft.com/downloads/details.aspx?FamilyID=416f8a51-65a3-4e8e-
> a4c8-adfe15e850fc&DisplayLang=en
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Allen Davidson" <allen.davidson@.europe.mccann.com> wrote in message
> > news:%231k5ReXpEHA.3364@.TK2MSFTNGP10.phx.gbl...
> > > Anyone using Win Server 2003 and Shadow Copy to back up SQL. If so can
> you
> > > point me at any resourses. MS KB seems thin on the subject.
> > >
> > > Thanks in advance
> > >
> > > Allen
> > >
> > >
> >
> >
>