importing asp.net membership tables

Discussion in 'ASP .Net' started by JJ, May 30, 2007.

  1. JJ

    JJ Guest

    How can I import my current asp.net membership records in my local sql
    server to the empty tables on the live server?

    I've tried removing contraints with:

    ALTER TABLE aspnet_Applications NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_Membership NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_Paths NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_PersonalizationAllUsers NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_PersonalizationPerUser NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_Profile NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_Roles NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_SchemaVersions NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_Users NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_UsersInRoles NOCHECK CONSTRAINT ALL
    ALTER TABLE aspnet_WebEvent_Events NOCHECK CONSTRAINT ALL

    Then importing and selecting 'Enable identity insert' on each table, but I
    still get errors relating to conflicting Keys.

    I assume either I need to temporarily remove some other constraints or
    import in a certain order (if so which order?)

    Thanks in advance,

    JJ
    JJ, May 30, 2007
    #1
    1. Advertising

  2. JJ

    KJ Guest

    Try using the Database Publishing Wizard:

    http://www.microsoft.com/downloads/...C5-BF17-42E0-A410-371A838E570A&displaylang=en

    It *should* generate the T-SQL script you need.

    "JJ" <> wrote in message
    news:uh%...
    > How can I import my current asp.net membership records in my local sql
    > server to the empty tables on the live server?
    >
    > I've tried removing contraints with:
    >
    > ALTER TABLE aspnet_Applications NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_Membership NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_Paths NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_PersonalizationAllUsers NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_PersonalizationPerUser NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_Profile NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_Roles NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_SchemaVersions NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_Users NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_UsersInRoles NOCHECK CONSTRAINT ALL
    > ALTER TABLE aspnet_WebEvent_Events NOCHECK CONSTRAINT ALL
    >
    > Then importing and selecting 'Enable identity insert' on each table, but I
    > still get errors relating to conflicting Keys.
    >
    > I assume either I need to temporarily remove some other constraints or
    > import in a certain order (if so which order?)
    >
    > Thanks in advance,
    >
    > JJ
    >
    KJ, May 30, 2007
    #2
    1. Advertising

  3. JJ

    JJ Guest

    thanks - I'm trying that. I keep getting this error when trying run the
    publish script on my shared hosts' sql server:

    I've have set my database to use SQL_Latin1_General_CP1_CI_AS as instructed
    by my hoster, but why then am I getting these errors???


    Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    Line 45
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    Line 52
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    Line 76
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    Line 83
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    Line 90
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure
    aspnet_UsersInRoles_RemoveUsersFromRoles, Line 50
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure
    aspnet_UsersInRoles_RemoveUsersFromRoles, Line 58
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure
    aspnet_UsersInRoles_RemoveUsersFromRoles, Line 84
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 468, Level 16, State 9, Procedure
    aspnet_UsersInRoles_RemoveUsersFromRoles, Line 92
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    Msg 15151, Level 16, State 1, Line 1
    Cannot find the object 'aspnet_UsersInRoles_AddUsersToRoles', because it
    does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 1
    Cannot find the object 'aspnet_UsersInRoles_RemoveUsersFromRoles', because
    it does not exist or you do not have permission

    "KJ" <> wrote in message
    news:...
    > Try using the Database Publishing Wizard:
    >
    > http://www.microsoft.com/downloads/...C5-BF17-42E0-A410-371A838E570A&displaylang=en
    >
    > It *should* generate the T-SQL script you need.
    >
    > "JJ" <> wrote in message
    > news:uh%...
    >> How can I import my current asp.net membership records in my local sql
    >> server to the empty tables on the live server?
    >>
    >> I've tried removing contraints with:
    >>
    >> ALTER TABLE aspnet_Applications NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_Membership NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_Paths NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_PersonalizationAllUsers NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_PersonalizationPerUser NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_Profile NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_Roles NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_SchemaVersions NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_Users NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_UsersInRoles NOCHECK CONSTRAINT ALL
    >> ALTER TABLE aspnet_WebEvent_Events NOCHECK CONSTRAINT ALL
    >>
    >> Then importing and selecting 'Enable identity insert' on each table, but
    >> I still get errors relating to conflicting Keys.
    >>
    >> I assume either I need to temporarily remove some other constraints or
    >> import in a certain order (if so which order?)
    >>
    >> Thanks in advance,
    >>
    >> JJ
    >>

    >
    >
    JJ, May 30, 2007
    #3
  4. JJ

    KJ Guest

    Check this out:

    http://community.sgdotnet.org/blogs/darenhan/archive/2006/11/17/49593.aspx

    "JJ" <> wrote in message
    news:...
    > thanks - I'm trying that. I keep getting this error when trying run the
    > publish script on my shared hosts' sql server:
    >
    > I've have set my database to use SQL_Latin1_General_CP1_CI_AS as
    > instructed by my hoster, but why then am I getting these errors???
    >
    >
    > Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    > Line 45
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    > Line 52
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    > Line 76
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    > Line 83
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles,
    > Line 90
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 468, Level 16, State 9, Procedure
    > aspnet_UsersInRoles_RemoveUsersFromRoles, Line 50
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 468, Level 16, State 9, Procedure
    > aspnet_UsersInRoles_RemoveUsersFromRoles, Line 58
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 468, Level 16, State 9, Procedure
    > aspnet_UsersInRoles_RemoveUsersFromRoles, Line 84
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 468, Level 16, State 9, Procedure
    > aspnet_UsersInRoles_RemoveUsersFromRoles, Line 92
    > Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    > "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    > Msg 15151, Level 16, State 1, Line 1
    > Cannot find the object 'aspnet_UsersInRoles_AddUsersToRoles', because it
    > does not exist or you do not have permission.
    > Msg 15151, Level 16, State 1, Line 1
    > Cannot find the object 'aspnet_UsersInRoles_RemoveUsersFromRoles', because
    > it does not exist or you do not have permission
    >
    > "KJ" <> wrote in message
    > news:...
    >> Try using the Database Publishing Wizard:
    >>
    >> http://www.microsoft.com/downloads/...C5-BF17-42E0-A410-371A838E570A&displaylang=en
    >>
    >> It *should* generate the T-SQL script you need.
    >>
    >> "JJ" <> wrote in message
    >> news:uh%...
    >>> How can I import my current asp.net membership records in my local sql
    >>> server to the empty tables on the live server?
    >>>
    >>> I've tried removing contraints with:
    >>>
    >>> ALTER TABLE aspnet_Applications NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_Membership NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_Paths NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_PersonalizationAllUsers NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_PersonalizationPerUser NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_Profile NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_Roles NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_SchemaVersions NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_Users NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_UsersInRoles NOCHECK CONSTRAINT ALL
    >>> ALTER TABLE aspnet_WebEvent_Events NOCHECK CONSTRAINT ALL
    >>>
    >>> Then importing and selecting 'Enable identity insert' on each table, but
    >>> I still get errors relating to conflicting Keys.
    >>>
    >>> I assume either I need to temporarily remove some other constraints or
    >>> import in a certain order (if so which order?)
    >>>
    >>> Thanks in advance,
    >>>
    >>> JJ
    >>>

    >>
    >>

    >
    >
    KJ, May 30, 2007
    #4
  5. JJ

    JJ Guest

    Thanks. I'd got around the problem somehow, but that page explains exactly
    what was happening and how I _should_ have solved it.

    JJ

    "KJ" <> wrote in message
    news:...
    > Check this out:
    >
    > http://community.sgdotnet.org/blogs/darenhan/archive/2006/11/17/49593.aspx
    >
    > "JJ" <> wrote in message
    > news:...
    >> thanks - I'm trying that. I keep getting this error when trying run the
    >> publish script on my shared hosts' sql server:
    >>
    >> I've have set my database to use SQL_Latin1_General_CP1_CI_AS as
    >> instructed by my hoster, but why then am I getting these errors???
    >>
    >>
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_AddUsersToRoles, Line 45
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_AddUsersToRoles, Line 52
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_AddUsersToRoles, Line 76
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_AddUsersToRoles, Line 83
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_AddUsersToRoles, Line 90
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_RemoveUsersFromRoles, Line 50
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_RemoveUsersFromRoles, Line 58
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_RemoveUsersFromRoles, Line 84
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 468, Level 16, State 9, Procedure
    >> aspnet_UsersInRoles_RemoveUsersFromRoles, Line 92
    >> Cannot resolve the collation conflict between "Latin1_General_CI_AS" and
    >> "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    >> Msg 15151, Level 16, State 1, Line 1
    >> Cannot find the object 'aspnet_UsersInRoles_AddUsersToRoles', because it
    >> does not exist or you do not have permission.
    >> Msg 15151, Level 16, State 1, Line 1
    >> Cannot find the object 'aspnet_UsersInRoles_RemoveUsersFromRoles',
    >> because it does not exist or you do not have permission
    >>
    >> "KJ" <> wrote in message
    >> news:...
    >>> Try using the Database Publishing Wizard:
    >>>
    >>> http://www.microsoft.com/downloads/...C5-BF17-42E0-A410-371A838E570A&displaylang=en
    >>>
    >>> It *should* generate the T-SQL script you need.
    >>>
    >>> "JJ" <> wrote in message
    >>> news:uh%...
    >>>> How can I import my current asp.net membership records in my local sql
    >>>> server to the empty tables on the live server?
    >>>>
    >>>> I've tried removing contraints with:
    >>>>
    >>>> ALTER TABLE aspnet_Applications NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_Membership NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_Paths NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_PersonalizationAllUsers NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_PersonalizationPerUser NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_Profile NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_Roles NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_SchemaVersions NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_Users NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_UsersInRoles NOCHECK CONSTRAINT ALL
    >>>> ALTER TABLE aspnet_WebEvent_Events NOCHECK CONSTRAINT ALL
    >>>>
    >>>> Then importing and selecting 'Enable identity insert' on each table,
    >>>> but I still get errors relating to conflicting Keys.
    >>>>
    >>>> I assume either I need to temporarily remove some other constraints or
    >>>> import in a certain order (if so which order?)
    >>>>
    >>>> Thanks in advance,
    >>>>
    >>>> JJ
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    JJ, May 30, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dawg1998
    Replies:
    2
    Views:
    1,416
  2. keith
    Replies:
    2
    Views:
    472
    keith
    Feb 26, 2007
  3. Brandon Holliday
    Replies:
    2
    Views:
    2,364
    Brandon Holliday
    May 18, 2007
  4. Tino Donderwinkel
    Replies:
    2
    Views:
    735
    Tino Donderwinkel
    Jun 18, 2008
  5. Replies:
    1
    Views:
    170
    Dominick Baier [DevelopMentor]
    Jan 21, 2006
Loading...

Share This Page