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:[vbcol=seagreen]
> 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:
|||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:[vbcol=seagreen]
> 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.googlegr oups.com...
|||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:
>
|||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:[vbcol=seagreen]
> 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:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment