Database Logins being removed

Brian DonahueBrian Donahue Posts: 6,590 New member
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" <[email protected]> wrote in message
news:[email protected]
> 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" <[email protected]> wrote in message
> > news:[email protected]
> >
> >>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

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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" <[email protected]> wrote in message
    news:[email protected]
    > 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
    >
    >
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

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

    -Brian

    "Brian Donahue (Red Gate)" <[email protected]> wrote in message
    news:[email protected]
    > 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" <[email protected]> wrote in message
    > news:[email protected]
    > > 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" <[email protected]> wrote in message
    > > > news:[email protected]
    > > >
    > > >>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
    > > >>
    > > >>
    > > >
    > > >
    > > >
    > >
    >
    >
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

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

    -Brian

    "Brian Donahue (Red Gate)" <[email protected]> wrote in message
    news:[email protected]
    > 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" <[email protected]> wrote in message
    > news:[email protected]
    > > 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" <[email protected]> wrote in message
    > > > news:[email protected]
    > > >
    > > >>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.