Wednesday, March 21, 2012

How can i move logins after a Mirror failover

I've search a lot of articles trying to find a script which not also re
create SQL logins from one server to another but that also makes really
automatically a SQL 2005 Mirror failover (map sql login to database and
set permissions)
Does anybody know how to do this? I am looking for a script.Hi
The logins should be created on the mirror server before you invoke
failover. This is easier if you use trusted connections and have your users
in a windows group (as only the group needs to be added).
See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
http://support.microsoft.com/kb/246133/ for a script.
John
"jocamp3@.gmail.com" wrote:
> I've search a lot of articles trying to find a script which not also re
> create SQL logins from one server to another but that also makes really
> automatically a SQL 2005 Mirror failover (map sql login to database and
> set permissions)
> Does anybody know how to do this? I am looking for a script.
>|||Hello John:
Thanks for reply.
This does not work. Yes .. i can create a login in the Mirror Server
but i can not map that login name to the desired database, because
simply it does not exists or it's in recovery state. So ... when i make
the failover, app. does not have the required credentials to log in,
because the SQL login is there but with no map to the Mirrored
database.
Got my point?
John Bell wrote:
> Hi
> The logins should be created on the mirror server before you invoke
> failover. This is easier if you use trusted connections and have your users
> in a windows group (as only the group needs to be added).
> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
> http://support.microsoft.com/kb/246133/ for a script.
> John
> "jocamp3@.gmail.com" wrote:
> > I've search a lot of articles trying to find a script which not also re
> > create SQL logins from one server to another but that also makes really
> > automatically a SQL 2005 Mirror failover (map sql login to database and
> > set permissions)
> >
> > Does anybody know how to do this? I am looking for a script.
> >
> >|||But the mapping exists *inside* the database, so it is already there.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<jocamp3@.gmail.com> wrote in message news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
> Hello John:
> Thanks for reply.
> This does not work. Yes .. i can create a login in the Mirror Server
> but i can not map that login name to the desired database, because
> simply it does not exists or it's in recovery state. So ... when i make
> the failover, app. does not have the required credentials to log in,
> because the SQL login is there but with no map to the Mirrored
> database.
> Got my point?
>
> John Bell wrote:
>> Hi
>> The logins should be created on the mirror server before you invoke
>> failover. This is easier if you use trusted connections and have your users
>> in a windows group (as only the group needs to be added).
>> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
>> http://support.microsoft.com/kb/246133/ for a script.
>> John
>> "jocamp3@.gmail.com" wrote:
>> > I've search a lot of articles trying to find a script which not also re
>> > create SQL logins from one server to another but that also makes really
>> > automatically a SQL 2005 Mirror failover (map sql login to database and
>> > set permissions)
>> >
>> > Does anybody know how to do this? I am looking for a script.
>> >
>> >
>|||Hello Tibor:
Maybe i'm doin' something wrong ... or i can not explain myself well.
...Could you please provide me the steps order or the whole process?
Mirror 1st? Script first? etc ... i will try to recreate everything
again.
Tibor Karaszi wrote:
> But the mapping exists *inside* the database, so it is already there.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> <jocamp3@.gmail.com> wrote in message news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
> > Hello John:
> >
> > Thanks for reply.
> >
> > This does not work. Yes .. i can create a login in the Mirror Server
> > but i can not map that login name to the desired database, because
> > simply it does not exists or it's in recovery state. So ... when i make
> > the failover, app. does not have the required credentials to log in,
> > because the SQL login is there but with no map to the Mirrored
> > database.
> >
> > Got my point?
> >
> >
> > John Bell wrote:
> >> Hi
> >>
> >> The logins should be created on the mirror server before you invoke
> >> failover. This is easier if you use trusted connections and have your users
> >> in a windows group (as only the group needs to be added).
> >>
> >> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
> >> http://support.microsoft.com/kb/246133/ for a script.
> >>
> >> John
> >>
> >> "jocamp3@.gmail.com" wrote:
> >>
> >> > I've search a lot of articles trying to find a script which not also re
> >> > create SQL logins from one server to another but that also makes really
> >> > automatically a SQL 2005 Mirror failover (map sql login to database and
> >> > set permissions)
> >> >
> >> > Does anybody know how to do this? I am looking for a script.
> >> >
> >> >
> >|||Al that should be needed is to have the same logins existing on the mirror server, and there having
the same name and SID. You can handle that using the sp_help_revlogin procedure in a scheduled job.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<jocamp3@.gmail.com> wrote in message news:1163112082.076012.93440@.e3g2000cwe.googlegroups.com...
> Hello Tibor:
> Maybe i'm doin' something wrong ... or i can not explain myself well.
> ...Could you please provide me the steps order or the whole process?
> Mirror 1st? Script first? etc ... i will try to recreate everything
> again.
> Tibor Karaszi wrote:
>> But the mapping exists *inside* the database, so it is already there.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> <jocamp3@.gmail.com> wrote in message
>> news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
>> > Hello John:
>> >
>> > Thanks for reply.
>> >
>> > This does not work. Yes .. i can create a login in the Mirror Server
>> > but i can not map that login name to the desired database, because
>> > simply it does not exists or it's in recovery state. So ... when i make
>> > the failover, app. does not have the required credentials to log in,
>> > because the SQL login is there but with no map to the Mirrored
>> > database.
>> >
>> > Got my point?
>> >
>> >
>> > John Bell wrote:
>> >> Hi
>> >>
>> >> The logins should be created on the mirror server before you invoke
>> >> failover. This is easier if you use trusted connections and have your users
>> >> in a windows group (as only the group needs to be added).
>> >>
>> >> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
>> >> http://support.microsoft.com/kb/246133/ for a script.
>> >>
>> >> John
>> >>
>> >> "jocamp3@.gmail.com" wrote:
>> >>
>> >> > I've search a lot of articles trying to find a script which not also re
>> >> > create SQL logins from one server to another but that also makes really
>> >> > automatically a SQL 2005 Mirror failover (map sql login to database and
>> >> > set permissions)
>> >> >
>> >> > Does anybody know how to do this? I am looking for a script.
>> >> >
>> >> >
>> >
>|||Hi
sp_help_revlogin and how to use it is described in the second link I posted
http://support.microsoft.com/kb/246133/
John
"jocamp3@.gmail.com" wrote:
> Hello Tibor:
> Maybe i'm doin' something wrong ... or i can not explain myself well.
> ...Could you please provide me the steps order or the whole process?
> Mirror 1st? Script first? etc ... i will try to recreate everything
> again.
> Tibor Karaszi wrote:
> > But the mapping exists *inside* the database, so it is already there.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > <jocamp3@.gmail.com> wrote in message news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
> > > Hello John:
> > >
> > > Thanks for reply.
> > >
> > > This does not work. Yes .. i can create a login in the Mirror Server
> > > but i can not map that login name to the desired database, because
> > > simply it does not exists or it's in recovery state. So ... when i make
> > > the failover, app. does not have the required credentials to log in,
> > > because the SQL login is there but with no map to the Mirrored
> > > database.
> > >
> > > Got my point?
> > >
> > >
> > > John Bell wrote:
> > >> Hi
> > >>
> > >> The logins should be created on the mirror server before you invoke
> > >> failover. This is easier if you use trusted connections and have your users
> > >> in a windows group (as only the group needs to be added).
> > >>
> > >> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
> > >> http://support.microsoft.com/kb/246133/ for a script.
> > >>
> > >> John
> > >>
> > >> "jocamp3@.gmail.com" wrote:
> > >>
> > >> > I've search a lot of articles trying to find a script which not also re
> > >> > create SQL logins from one server to another but that also makes really
> > >> > automatically a SQL 2005 Mirror failover (map sql login to database and
> > >> > set permissions)
> > >> >
> > >> > Does anybody know how to do this? I am looking for a script.
> > >> >
> > >> >
> > >
>|||Ok ... got it! ... and i will post this because there are a lot of
persons with the same problem. I can not believe nobody knows about
this ...
Some times, a step by step explanation helps much more than just point
to a simple script or link ...
1. On the server which will be Principal, create the Login (which the
app. will use to connect) at Server level WITH NO MAPPING to the
database. Put master database at default db instead.
2. Use SSID and execute the required package to copy Logins from one
server to another. If package turns green, it works. You should also be
able to see the Login in the second server.
3. Now, on 1st server again, set database mapping for SQL login. Set
the required permissions to database also (data reader, data writer,
etc)
3. Restore database on 2nd server (future mirror) in recovery mode.
4. Establish the Mirror
5. Test the failover: check the 2nd server (now the Principal) and you
should be able to see the SQL login. Change default database from
master to the desired database (now you can, because you're in the
principal)
6. Make another manual failover. Since now ... SQL server login its
already there and mapping exist with the required permissions also.
Jose Campo
John Bell wrote:
> Hi
> sp_help_revlogin and how to use it is described in the second link I posted
> http://support.microsoft.com/kb/246133/
> John
> "jocamp3@.gmail.com" wrote:
> > Hello Tibor:
> >
> > Maybe i'm doin' something wrong ... or i can not explain myself well.
> > ...Could you please provide me the steps order or the whole process?
> > Mirror 1st? Script first? etc ... i will try to recreate everything
> > again.
> >
> > Tibor Karaszi wrote:
> > > But the mapping exists *inside* the database, so it is already there.
> > >
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > >
> > >
> > > <jocamp3@.gmail.com> wrote in message news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
> > > > Hello John:
> > > >
> > > > Thanks for reply.
> > > >
> > > > This does not work. Yes .. i can create a login in the Mirror Server
> > > > but i can not map that login name to the desired database, because
> > > > simply it does not exists or it's in recovery state. So ... when i make
> > > > the failover, app. does not have the required credentials to log in,
> > > > because the SQL login is there but with no map to the Mirrored
> > > > database.
> > > >
> > > > Got my point?
> > > >
> > > >
> > > > John Bell wrote:
> > > >> Hi
> > > >>
> > > >> The logins should be created on the mirror server before you invoke
> > > >> failover. This is easier if you use trusted connections and have your users
> > > >> in a windows group (as only the group needs to be added).
> > > >>
> > > >> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
> > > >> http://support.microsoft.com/kb/246133/ for a script.
> > > >>
> > > >> John
> > > >>
> > > >> "jocamp3@.gmail.com" wrote:
> > > >>
> > > >> > I've search a lot of articles trying to find a script which not also re
> > > >> > create SQL logins from one server to another but that also makes really
> > > >> > automatically a SQL 2005 Mirror failover (map sql login to database and
> > > >> > set permissions)
> > > >> >
> > > >> > Does anybody know how to do this? I am looking for a script.
> > > >> >
> > > >> >
> > > >
> >
> >|||Corrections... i must say SSIS (old DTS) instead of SSID.
jocamp3@.gmail.com wrote:
> Ok ... got it! ... and i will post this because there are a lot of
> persons with the same problem. I can not believe nobody knows about
> this ...
> Some times, a step by step explanation helps much more than just point
> to a simple script or link ...
> 1. On the server which will be Principal, create the Login (which the
> app. will use to connect) at Server level WITH NO MAPPING to the
> database. Put master database at default db instead.
> 2. Use SSID and execute the required package to copy Logins from one
> server to another. If package turns green, it works. You should also be
> able to see the Login in the second server.
> 3. Now, on 1st server again, set database mapping for SQL login. Set
> the required permissions to database also (data reader, data writer,
> etc)
> 3. Restore database on 2nd server (future mirror) in recovery mode.
> 4. Establish the Mirror
> 5. Test the failover: check the 2nd server (now the Principal) and you
> should be able to see the SQL login. Change default database from
> master to the desired database (now you can, because you're in the
> principal)
> 6. Make another manual failover. Since now ... SQL server login its
> already there and mapping exist with the required permissions also.
> Jose Campo
>
> John Bell wrote:
> > Hi
> >
> > sp_help_revlogin and how to use it is described in the second link I posted
> > http://support.microsoft.com/kb/246133/
> >
> > John
> >
> > "jocamp3@.gmail.com" wrote:
> >
> > > Hello Tibor:
> > >
> > > Maybe i'm doin' something wrong ... or i can not explain myself well.
> > > ...Could you please provide me the steps order or the whole process?
> > > Mirror 1st? Script first? etc ... i will try to recreate everything
> > > again.
> > >
> > > Tibor Karaszi wrote:
> > > > But the mapping exists *inside* the database, so it is already there.
> > > >
> > > > --
> > > > Tibor Karaszi, SQL Server MVP
> > > > http://www.karaszi.com/sqlserver/default.asp
> > > > http://www.solidqualitylearning.com/
> > > >
> > > >
> > > > <jocamp3@.gmail.com> wrote in message news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
> > > > > Hello John:
> > > > >
> > > > > Thanks for reply.
> > > > >
> > > > > This does not work. Yes .. i can create a login in the Mirror Server
> > > > > but i can not map that login name to the desired database, because
> > > > > simply it does not exists or it's in recovery state. So ... when i make
> > > > > the failover, app. does not have the required credentials to log in,
> > > > > because the SQL login is there but with no map to the Mirrored
> > > > > database.
> > > > >
> > > > > Got my point?
> > > > >
> > > > >
> > > > > John Bell wrote:
> > > > >> Hi
> > > > >>
> > > > >> The logins should be created on the mirror server before you invoke
> > > > >> failover. This is easier if you use trusted connections and have your users
> > > > >> in a windows group (as only the group needs to be added).
> > > > >>
> > > > >> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
> > > > >> http://support.microsoft.com/kb/246133/ for a script.
> > > > >>
> > > > >> John
> > > > >>
> > > > >> "jocamp3@.gmail.com" wrote:
> > > > >>
> > > > >> > I've search a lot of articles trying to find a script which not also re
> > > > >> > create SQL logins from one server to another but that also makes really
> > > > >> > automatically a SQL 2005 Mirror failover (map sql login to database and
> > > > >> > set permissions)
> > > > >> >
> > > > >> > Does anybody know how to do this? I am looking for a script.
> > > > >> >
> > > > >> >
> > > > >
> > >
> > >|||Corrections... i must say SSIS (old DTS) instead of SSID.
jocamp3@.gmail.com wrote:
> Ok ... got it! ... and i will post this because there are a lot of
> persons with the same problem. I can not believe nobody knows about
> this ...
> Some times, a step by step explanation helps much more than just point
> to a simple script or link ...
> 1. On the server which will be Principal, create the Login (which the
> app. will use to connect) at Server level WITH NO MAPPING to the
> database. Put master database at default db instead.
> 2. Use SSID and execute the required package to copy Logins from one
> server to another. If package turns green, it works. You should also be
> able to see the Login in the second server.
> 3. Now, on 1st server again, set database mapping for SQL login. Set
> the required permissions to database also (data reader, data writer,
> etc)
> 3. Restore database on 2nd server (future mirror) in recovery mode.
> 4. Establish the Mirror
> 5. Test the failover: check the 2nd server (now the Principal) and you
> should be able to see the SQL login. Change default database from
> master to the desired database (now you can, because you're in the
> principal)
> 6. Make another manual failover. Since now ... SQL server login its
> already there and mapping exist with the required permissions also.
> Jose Campo
>
> John Bell wrote:
> > Hi
> >
> > sp_help_revlogin and how to use it is described in the second link I posted
> > http://support.microsoft.com/kb/246133/
> >
> > John
> >
> > "jocamp3@.gmail.com" wrote:
> >
> > > Hello Tibor:
> > >
> > > Maybe i'm doin' something wrong ... or i can not explain myself well.
> > > ...Could you please provide me the steps order or the whole process?
> > > Mirror 1st? Script first? etc ... i will try to recreate everything
> > > again.
> > >
> > > Tibor Karaszi wrote:
> > > > But the mapping exists *inside* the database, so it is already there.
> > > >
> > > > --
> > > > Tibor Karaszi, SQL Server MVP
> > > > http://www.karaszi.com/sqlserver/default.asp
> > > > http://www.solidqualitylearning.com/
> > > >
> > > >
> > > > <jocamp3@.gmail.com> wrote in message news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
> > > > > Hello John:
> > > > >
> > > > > Thanks for reply.
> > > > >
> > > > > This does not work. Yes .. i can create a login in the Mirror Server
> > > > > but i can not map that login name to the desired database, because
> > > > > simply it does not exists or it's in recovery state. So ... when i make
> > > > > the failover, app. does not have the required credentials to log in,
> > > > > because the SQL login is there but with no map to the Mirrored
> > > > > database.
> > > > >
> > > > > Got my point?
> > > > >
> > > > >
> > > > > John Bell wrote:
> > > > >> Hi
> > > > >>
> > > > >> The logins should be created on the mirror server before you invoke
> > > > >> failover. This is easier if you use trusted connections and have your users
> > > > >> in a windows group (as only the group needs to be added).
> > > > >>
> > > > >> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
> > > > >> http://support.microsoft.com/kb/246133/ for a script.
> > > > >>
> > > > >> John
> > > > >>
> > > > >> "jocamp3@.gmail.com" wrote:
> > > > >>
> > > > >> > I've search a lot of articles trying to find a script which not also re
> > > > >> > create SQL logins from one server to another but that also makes really
> > > > >> > automatically a SQL 2005 Mirror failover (map sql login to database and
> > > > >> > set permissions)
> > > > >> >
> > > > >> > Does anybody know how to do this? I am looking for a script.
> > > > >> >
> > > > >> >
> > > > >
> > >
> > >|||Hi Jose
Thanks for posting your findings. Logins will be less of an issue if you use
windows authentication and are on the same domain (especially if you use
windows groups!), but that is not always possible.
John
"jocamp3@.gmail.com" wrote:
> Corrections... i must say SSIS (old DTS) instead of SSID.
> jocamp3@.gmail.com wrote:
> > Ok ... got it! ... and i will post this because there are a lot of
> > persons with the same problem. I can not believe nobody knows about
> > this ...
> >
> > Some times, a step by step explanation helps much more than just point
> > to a simple script or link ...
> >
> > 1. On the server which will be Principal, create the Login (which the
> > app. will use to connect) at Server level WITH NO MAPPING to the
> > database. Put master database at default db instead.
> > 2. Use SSID and execute the required package to copy Logins from one
> > server to another. If package turns green, it works. You should also be
> > able to see the Login in the second server.
> > 3. Now, on 1st server again, set database mapping for SQL login. Set
> > the required permissions to database also (data reader, data writer,
> > etc)
> > 3. Restore database on 2nd server (future mirror) in recovery mode.
> > 4. Establish the Mirror
> > 5. Test the failover: check the 2nd server (now the Principal) and you
> > should be able to see the SQL login. Change default database from
> > master to the desired database (now you can, because you're in the
> > principal)
> > 6. Make another manual failover. Since now ... SQL server login its
> > already there and mapping exist with the required permissions also.
> >
> > Jose Campo
> >
> >
> > John Bell wrote:
> > > Hi
> > >
> > > sp_help_revlogin and how to use it is described in the second link I posted
> > > http://support.microsoft.com/kb/246133/
> > >
> > > John
> > >
> > > "jocamp3@.gmail.com" wrote:
> > >
> > > > Hello Tibor:
> > > >
> > > > Maybe i'm doin' something wrong ... or i can not explain myself well.
> > > > ...Could you please provide me the steps order or the whole process?
> > > > Mirror 1st? Script first? etc ... i will try to recreate everything
> > > > again.
> > > >
> > > > Tibor Karaszi wrote:
> > > > > But the mapping exists *inside* the database, so it is already there.
> > > > >
> > > > > --
> > > > > Tibor Karaszi, SQL Server MVP
> > > > > http://www.karaszi.com/sqlserver/default.asp
> > > > > http://www.solidqualitylearning.com/
> > > > >
> > > > >
> > > > > <jocamp3@.gmail.com> wrote in message news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
> > > > > > Hello John:
> > > > > >
> > > > > > Thanks for reply.
> > > > > >
> > > > > > This does not work. Yes .. i can create a login in the Mirror Server
> > > > > > but i can not map that login name to the desired database, because
> > > > > > simply it does not exists or it's in recovery state. So ... when i make
> > > > > > the failover, app. does not have the required credentials to log in,
> > > > > > because the SQL login is there but with no map to the Mirrored
> > > > > > database.
> > > > > >
> > > > > > Got my point?
> > > > > >
> > > > > >
> > > > > > John Bell wrote:
> > > > > >> Hi
> > > > > >>
> > > > > >> The logins should be created on the mirror server before you invoke
> > > > > >> failover. This is easier if you use trusted connections and have your users
> > > > > >> in a windows group (as only the group needs to be added).
> > > > > >>
> > > > > >> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
> > > > > >> http://support.microsoft.com/kb/246133/ for a script.
> > > > > >>
> > > > > >> John
> > > > > >>
> > > > > >> "jocamp3@.gmail.com" wrote:
> > > > > >>
> > > > > >> > I've search a lot of articles trying to find a script which not also re
> > > > > >> > create SQL logins from one server to another but that also makes really
> > > > > >> > automatically a SQL 2005 Mirror failover (map sql login to database and
> > > > > >> > set permissions)
> > > > > >> >
> > > > > >> > Does anybody know how to do this? I am looking for a script.
> > > > > >> >
> > > > > >> >
> > > > > >
> > > >
> > > >
>|||Hi John
Exactly! I just work at Database level. Have no authority at app.
level. But developer is planning to use a Windows user. One of the
reason we're currently using an SQL account it's because app. it's
running on a Linux box ...
Best regards,
JC
John Bell wrote:
> Hi Jose
> Thanks for posting your findings. Logins will be less of an issue if you use
> windows authentication and are on the same domain (especially if you use
> windows groups!), but that is not always possible.
> John
> "jocamp3@.gmail.com" wrote:
> > Corrections... i must say SSIS (old DTS) instead of SSID.
> >
> > jocamp3@.gmail.com wrote:
> > > Ok ... got it! ... and i will post this because there are a lot of
> > > persons with the same problem. I can not believe nobody knows about
> > > this ...
> > >
> > > Some times, a step by step explanation helps much more than just point
> > > to a simple script or link ...
> > >
> > > 1. On the server which will be Principal, create the Login (which the
> > > app. will use to connect) at Server level WITH NO MAPPING to the
> > > database. Put master database at default db instead.
> > > 2. Use SSID and execute the required package to copy Logins from one
> > > server to another. If package turns green, it works. You should also be
> > > able to see the Login in the second server.
> > > 3. Now, on 1st server again, set database mapping for SQL login. Set
> > > the required permissions to database also (data reader, data writer,
> > > etc)
> > > 3. Restore database on 2nd server (future mirror) in recovery mode.
> > > 4. Establish the Mirror
> > > 5. Test the failover: check the 2nd server (now the Principal) and you
> > > should be able to see the SQL login. Change default database from
> > > master to the desired database (now you can, because you're in the
> > > principal)
> > > 6. Make another manual failover. Since now ... SQL server login its
> > > already there and mapping exist with the required permissions also.
> > >
> > > Jose Campo
> > >
> > >
> > > John Bell wrote:
> > > > Hi
> > > >
> > > > sp_help_revlogin and how to use it is described in the second link I posted
> > > > http://support.microsoft.com/kb/246133/
> > > >
> > > > John
> > > >
> > > > "jocamp3@.gmail.com" wrote:
> > > >
> > > > > Hello Tibor:
> > > > >
> > > > > Maybe i'm doin' something wrong ... or i can not explain myself well.
> > > > > ...Could you please provide me the steps order or the whole process?
> > > > > Mirror 1st? Script first? etc ... i will try to recreate everything
> > > > > again.
> > > > >
> > > > > Tibor Karaszi wrote:
> > > > > > But the mapping exists *inside* the database, so it is already there.
> > > > > >
> > > > > > --
> > > > > > Tibor Karaszi, SQL Server MVP
> > > > > > http://www.karaszi.com/sqlserver/default.asp
> > > > > > http://www.solidqualitylearning.com/
> > > > > >
> > > > > >
> > > > > > <jocamp3@.gmail.com> wrote in message news:1163105989.698968.293540@.h54g2000cwb.googlegroups.com...
> > > > > > > Hello John:
> > > > > > >
> > > > > > > Thanks for reply.
> > > > > > >
> > > > > > > This does not work. Yes .. i can create a login in the Mirror Server
> > > > > > > but i can not map that login name to the desired database, because
> > > > > > > simply it does not exists or it's in recovery state. So ... when i make
> > > > > > > the failover, app. does not have the required credentials to log in,
> > > > > > > because the SQL login is there but with no map to the Mirrored
> > > > > > > database.
> > > > > > >
> > > > > > > Got my point?
> > > > > > >
> > > > > > >
> > > > > > > John Bell wrote:
> > > > > > >> Hi
> > > > > > >>
> > > > > > >> The logins should be created on the mirror server before you invoke
> > > > > > >> failover. This is easier if you use trusted connections and have your users
> > > > > > >> in a windows group (as only the group needs to be added).
> > > > > > >>
> > > > > > >> See http://msdn2.microsoft.com/en-us/library/ms191458.aspx and
> > > > > > >> http://support.microsoft.com/kb/246133/ for a script.
> > > > > > >>
> > > > > > >> John
> > > > > > >>
> > > > > > >> "jocamp3@.gmail.com" wrote:
> > > > > > >>
> > > > > > >> > I've search a lot of articles trying to find a script which not also re
> > > > > > >> > create SQL logins from one server to another but that also makes really
> > > > > > >> > automatically a SQL 2005 Mirror failover (map sql login to database and
> > > > > > >> > set permissions)
> > > > > > >> >
> > > > > > >> > Does anybody know how to do this? I am looking for a script.
> > > > > > >> >
> > > > > > >> >
> > > > > > >
> > > > >
> > > > >
> >
> >

No comments:

Post a Comment