Options

Database Logins being removed

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited December 18, 2003 1:01PM in SQL Compare Previous Versions
Hi Chris,

Actually, I can't see this happening in a Toolkit application. I've done
a migration with Options.IncludeDependencies and Options.IgnorePermissions
set, and I don't get an sp_addlogin in my script. Can you give that a try
and see if you get the same results?

Thanks,

Brian Donahue
Red Gate Technical Support


"Chris Tybur" <ctybur@infinitevisions.com> wrote in message
news:U$DOG2kxDHA.304@server53...
> What happens if I need to include dependencies in my comparison, but I
> don't want to sync database users? If this isn't possible then the
> toolkit becomes much less useable for me. I have an app that is run at
> client sites, and I only want to sync specific objects within their
> database. Users are not on that list. I set IncludeDependencies because
> I have several views that depend on other views, and I need the script
> to order all the changes properly. How can I ensure the resulting
> script changes things in the correct dependent order, but only tables,
> views, stored procedures, and user defined functions?
>
> Chris
>
> Brian Donahue (Red Gate) wrote:
> > Hi Tom,
> >
> > I think that what you might want to do is to specify what options
you
> > want when you run a comparison. In particular, IncludeDependencies will
> > cause users to get created or dropped along with the object they're
bound
> > to. If this isn't set in your options for BuildFromDifferences() or
> > CompareWith(), you shouldn't be adding or dropping users any more if
you're
> > not including users in the migration.
> >
> > Please let me know if you run into any more problems.
> >
> > Brian Donahue
> >
> > Red Gate Technical Support
> >
> > "Tom Johnston" <tom@oasis-ac.com> wrote in message
> > news:tJlOdQAxDHA.1244@server53...
> >
> >>We just started using the tools to synchronize databases offline. The
> >>problem is the database is at a client site and they may have different
> >>logins than we have. It seems the update uses the logins in the snapshot

> >
> > to
> >
> >>update the client and removes the logins there. We tried:
> >>For Each difference In differences
> >>
> >>' try not to change users and roles
> >>
> >>If Not (difference.DatabaseObjectType = ObjectType.User Or
> >>difference.DatabaseObjectType = ObjectType.Role) Then
> >>
> >>difference.Selected = True
> >>
> >>End If
> >>
> >>Next
> >>
> >> but the same thing happened. What is the proper way to do this? We
cannot
> >>tell the snapshot to not check logins and I don't see an option to
exclude
> >>logins. Could be I'm blind...
> >>Thanks in advance.
> >>
> >>Tom
> >>
> >>
> >
> >
> >
>

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Tom,

    I think that what you might want to do is to specify what options you
    want when you run a comparison. In particular, IncludeDependencies will
    cause users to get created or dropped along with the object they're bound
    to. If this isn't set in your options for BuildFromDifferences() or
    CompareWith(), you shouldn't be adding or dropping users any more if you're
    not including users in the migration.

    Please let me know if you run into any more problems.

    Brian Donahue

    Red Gate Technical Support

    "Tom Johnston" <tom@oasis-ac.com> wrote in message
    news:tJlOdQAxDHA.1244@server53...
    > We just started using the tools to synchronize databases offline. The
    > problem is the database is at a client site and they may have different
    > logins than we have. It seems the update uses the logins in the snapshot
    to
    > update the client and removes the logins there. We tried:
    > For Each difference In differences
    >
    > ' try not to change users and roles
    >
    > If Not (difference.DatabaseObjectType = ObjectType.User Or
    > difference.DatabaseObjectType = ObjectType.Role) Then
    >
    > difference.Selected = True
    >
    > End If
    >
    > Next
    >
    > but the same thing happened. What is the proper way to do this? We cannot
    > tell the snapshot to not check logins and I don't see an option to exclude
    > logins. Could be I'm blind...
    > Thanks in advance.
    >
    > Tom
    >
    >
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    FYI -- I believe that this problem was fixed in Bundle version 3.15.

    -Brian

    "Brian Donahue (Red Gate)" <brian.donahue@red-gate.com> wrote in message
    news:R8ezq8JyDHA.1600@server53...
    > Hi Chris,
    >
    > Actually, I can't see this happening in a Toolkit application. I've
    done
    > a migration with Options.IncludeDependencies and Options.IgnorePermissions
    > set, and I don't get an sp_addlogin in my script. Can you give that a try
    > and see if you get the same results?
    >
    > Thanks,
    >
    > Brian Donahue
    > Red Gate Technical Support
    >
    >
    > "Chris Tybur" <ctybur@infinitevisions.com> wrote in message
    > news:U$DOG2kxDHA.304@server53...
    > > What happens if I need to include dependencies in my comparison, but I
    > > don't want to sync database users? If this isn't possible then the
    > > toolkit becomes much less useable for me. I have an app that is run at
    > > client sites, and I only want to sync specific objects within their
    > > database. Users are not on that list. I set IncludeDependencies because
    > > I have several views that depend on other views, and I need the script
    > > to order all the changes properly. How can I ensure the resulting
    > > script changes things in the correct dependent order, but only tables,
    > > views, stored procedures, and user defined functions?
    > >
    > > Chris
    > >
    > > Brian Donahue (Red Gate) wrote:
    > > > Hi Tom,
    > > >
    > > > I think that what you might want to do is to specify what options
    > you
    > > > want when you run a comparison. In particular, IncludeDependencies
    will
    > > > cause users to get created or dropped along with the object they're
    > bound
    > > > to. If this isn't set in your options for BuildFromDifferences() or
    > > > CompareWith(), you shouldn't be adding or dropping users any more if
    > you're
    > > > not including users in the migration.
    > > >
    > > > Please let me know if you run into any more problems.
    > > >
    > > > Brian Donahue
    > > >
    > > > Red Gate Technical Support
    > > >
    > > > "Tom Johnston" <tom@oasis-ac.com> wrote in message
    > > > news:tJlOdQAxDHA.1244@server53...
    > > >
    > > >>We just started using the tools to synchronize databases offline. The
    > > >>problem is the database is at a client site and they may have
    different
    > > >>logins than we have. It seems the update uses the logins in the
    snapshot
    >
    > > >
    > > > to
    > > >
    > > >>update the client and removes the logins there. We tried:
    > > >>For Each difference In differences
    > > >>
    > > >>' try not to change users and roles
    > > >>
    > > >>If Not (difference.DatabaseObjectType = ObjectType.User Or
    > > >>difference.DatabaseObjectType = ObjectType.Role) Then
    > > >>
    > > >>difference.Selected = True
    > > >>
    > > >>End If
    > > >>
    > > >>Next
    > > >>
    > > >> but the same thing happened. What is the proper way to do this? We
    > cannot
    > > >>tell the snapshot to not check logins and I don't see an option to
    > exclude
    > > >>logins. Could be I'm blind...
    > > >>Thanks in advance.
    > > >>
    > > >>Tom
    > > >>
    > > >>
    > > >
    > > >
    > > >
    > >
    >
    >
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    FYI -- I believe that this problem was fixed in Bundle version 3.15.

    -Brian

    "Brian Donahue (Red Gate)" <brian.donahue@red-gate.com> wrote in message
    news:R8ezq8JyDHA.1600@server53...
    > Hi Chris,
    >
    > Actually, I can't see this happening in a Toolkit application. I've
    done
    > a migration with Options.IncludeDependencies and Options.IgnorePermissions
    > set, and I don't get an sp_addlogin in my script. Can you give that a try
    > and see if you get the same results?
    >
    > Thanks,
    >
    > Brian Donahue
    > Red Gate Technical Support
    >
    >
    > "Chris Tybur" <ctybur@infinitevisions.com> wrote in message
    > news:U$DOG2kxDHA.304@server53...
    > > What happens if I need to include dependencies in my comparison, but I
    > > don't want to sync database users? If this isn't possible then the
    > > toolkit becomes much less useable for me. I have an app that is run at
    > > client sites, and I only want to sync specific objects within their
    > > database. Users are not on that list. I set IncludeDependencies because
    > > I have several views that depend on other views, and I need the script
    > > to order all the changes properly. How can I ensure the resulting
    > > script changes things in the correct dependent order, but only tables,
    > > views, stored procedures, and user defined functions?
    > >
    > > Chris
    > >
    > > Brian Donahue (Red Gate) wrote:
    > > > Hi Tom,
    > > >
    > > > I think that what you might want to do is to specify what options
    > you
    > > > want when you run a comparison. In particular, IncludeDependencies
    will
    > > > cause users to get created or dropped along with the object they're
    > bound
    > > > to. If this isn't set in your options for BuildFromDifferences() or
    > > > CompareWith(), you shouldn't be adding or dropping users any more if
    > you're
    > > > not including users in the migration.
    > > >
    > > > Please let me know if you run into any more problems.
    > > >
    > > > Brian Donahue
    > > >
    > > > Red Gate Technical Support
    > > >
    > > > "Tom Johnston" <tom@oasis-ac.com> wrote in message
    > > > news:tJlOdQAxDHA.1244@server53...
    > > >
    > > >>We just started using the tools to synchronize databases offline. The
    > > >>problem is the database is at a client site and they may have
    different
    > > >>logins than we have. It seems the update uses the logins in the
    snapshot
    >
    > > >
    > > > to
    > > >
    > > >>update the client and removes the logins there. We tried:
    > > >>For Each difference In differences
    > > >>
    > > >>' try not to change users and roles
    > > >>
    > > >>If Not (difference.DatabaseObjectType = ObjectType.User Or
    > > >>difference.DatabaseObjectType = ObjectType.Role) Then
    > > >>
    > > >>difference.Selected = True
    > > >>
    > > >>End If
    > > >>
    > > >>Next
    > > >>
    > > >> but the same thing happened. What is the proper way to do this? We
    > cannot
    > > >>tell the snapshot to not check logins and I don't see an option to
    > exclude
    > > >>logins. Could be I'm blind...
    > > >>Thanks in advance.
    > > >>
    > > >>Tom
    > > >>
    > > >>
    > > >
    > > >
    > > >
    > >
    >
    >
This discussion has been closed.