IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Framework .NET Discussion :

Erreur Synchronize() SyncFramework 2.1


Sujet :

Framework .NET

  1. #1
    Membre à l'essai
    Inscrit en
    Octobre 2006
    Messages
    54
    Détails du profil
    Informations forums :
    Inscription : Octobre 2006
    Messages : 54
    Points : 21
    Points
    21
    Par défaut Erreur Synchronize() SyncFramework 2.1
    Bonjour à tous,

    Voilà j'ai un soucis avec le syncframework 2.1, j'explique :

    Je suis sur SQL Server et je veux synchroniser 2 bases. J'ai utilisé cette procédure : http://msdn.microsoft.com/fr-fr/library/ff928699.aspx.

    Mais quand je lance la synchro, j'ai une erreur :

    Impossible de terminer l'opération en cours car la base de données n'est pas configurée pour la synchronisation ou vous ne disposez pas des autorisations nécessaires dans les tables de synchronisation.
    L'erreur apparait lors de l'éxecution de la ligne :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    SyncOperationStatistics syncStats = syncOrchestrator.Synchronize();
    Est ce que ça concerne les droits de l'utilisateur ? Si oui, comment lui donner les droits ?

    Voici mon code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
     
            SqlConnection serverConn = new SqlConnection("Data Source=****;Initial Catalog=SyncDBServeur;Integrated Security=True");
     
            // define a new scope named ProductsScope
            DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription("maprod");
     
            // get the description of the Products table from SyncDB dtabase
            DbSyncTableDescription tableDesc = SqlSyncDescriptionBuilder.GetDescriptionForTable("Products", serverConn);
     
            // add the table description to the sync scope definition
     
            scopeDesc.Tables.Add(tableDesc);
     
            SqlConnection clientConn = new SqlConnection("Data Source=****;Initial Catalog=SyncDBClient;Integrated Security=True");
     
            // create a server scope provisioning object based on the ProductScope
            SqlSyncScopeProvisioning serverProvision = new SqlSyncScopeProvisioning(clientConn, scopeDesc);
     
            // skipping the creation of table since table already exists on server
            serverProvision.SetCreateTableDefault(DbSyncCreationOption.CreateOrUseExisting);
     
            // start the provisioning process
            serverProvision.Apply();
     
     
            // create the sync orhcestrator
            SyncOrchestrator syncOrchestrator = new SyncOrchestrator();
     
            // set local provider of orchestrator to a CE sync provider associated with the 
            // ProductsScope in the SyncCompactDB compact client database
            syncOrchestrator.LocalProvider = new SqlSyncProvider("maprod", serverConn);
     
            // set the remote provider of orchestrator to a server sync provider associated with
            // the ProductsScope in the SyncDB server database
            syncOrchestrator.RemoteProvider = new SqlSyncProvider("maprod", clientConn);
     
            // set the direction of sync session to Upload and Download
            syncOrchestrator.Direction = SyncDirectionOrder.UploadAndDownload;
     
            ((SqlSyncProvider)syncOrchestrator.LocalProvider).ApplyChangeFailed += new EventHandler<DbApplyChangeFailedEventArgs>(Program_ApplyChangeFailed);
     
            SyncOperationStatistics syncStats = syncOrchestrator.Synchronize();
     
            }

    Merci de votre aide

  2. #2
    Membre à l'essai
    Inscrit en
    Octobre 2006
    Messages
    54
    Détails du profil
    Informations forums :
    Inscription : Octobre 2006
    Messages : 54
    Points : 21
    Points
    21
    Par défaut
    J'ai réinstallé SQL Server ... sans succès.

  3. #3
    Nouveau membre du Club
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Septembre 2005
    Messages
    19
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 19
    Points : 33
    Points
    33
    Par défaut
    Bonjour,

    C'est surement un peu tard, mais as-tu exécutés les deux codes permettant de créer les tables relatives à la synchronisation de tes 2 bases?

    Cordialement,

Discussions similaires

  1. Erreur "Synchronize operation failed"
    Par xoum89 dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 22/03/2014, 05h36
  2. Réponses: 3
    Dernier message: 08/04/2013, 08h26
  3. erreur IDL:omg.org/CORBA/MARSHAL:1.0
    Par Pinggui dans le forum CORBA
    Réponses: 3
    Dernier message: 13/05/2002, 15h05
  4. Réponses: 6
    Dernier message: 25/03/2002, 21h11
  5. [Kylix] Erreur objet
    Par Anonymous dans le forum EDI
    Réponses: 1
    Dernier message: 22/03/2002, 09h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo