Showing posts with label mirrored. Show all posts
Showing posts with label mirrored. Show all posts

Friday, March 30, 2012

Mirroring and orphaned users

Hi there!

There is still a problem with mirrored (mapped) SQL Users. If you mirror a database where an application connects with an sql user, the mapping (login / user) will be lost on the mirror server. After a failover occurs, it it not possible to log onto the new principal database because the database use will be an orphaned user and has to be remapped to the login (using sp_change_users_login 'update_one', 'user', 'user').

Is there any chance to do it in a system trigger? What is the firing event after the failover occurs? I've tried something like following, but it doesn't fire.

alter TRIGGER map_orphaned_users

ON ALL SERVER

FOR ALTER_DATABASE

AS

execute sp_change_users_login 'update_one', 'easyris_41', 'easyris_41';

Someone an idea how to automate these usermapping after failover on the (new) principal server?

Based on:

http://www.microsoft.com/technet/prodtechnol/sql/2005/mirroringevents.mspx#EDBAC

you can be set up to be notified (or run a job or particular sp) when the server becomes the principal.

Thanks,

mark

|||

Hmm, maybe thats a workaround.

But in my mind it doesn't confirm with the requirement of high availability with automatic failover. Furthermore, clients application could run into another exception (Login fails or something like that), what has to be adapted in applications what are designed for high avilibility.

Otherway all the stuff works with domain users. So it seems like a real bug. I can't see any conceptional reason for this behavior. Hope that will be fixed in SP2...

Torsten

|||

OK, I am going to try to write a bit.

1. I completely agree that from a customer's point of view, if when using sql logins, if the database fails over and the clients cannot get to the database (for whatever reason. Here it is a mixed mapping from login on a different server to a user in a "new" database ), then the system is not "highly available." So, we haven't made it easy to use mirroring in certain scenarios. I may try to create a script that solves this problem this weekend.

2. On the other hand, this problem has been here at least since 7.0. In log shipping, backup/restore, and attach/detach this problem of moving the database to a different server where the meta data in master and msdb are different on different servers. The problem is that we have made moving a database to a different server so much easier that the problems that were small earlier are becoming bigger.

So, this really isn't a bug IMHO, but it is unexpected behavior (which is still bad from a customer's point of view).

Thanks,

Mark

|||I am just starting to look into mirroring and had run across this same problem. I have not had a chance to look into this but supposedly there is a task in SSIS that allows you to transfer logins from one server to another.
|||

Hi guys,

I've asked MS about using sqlusers on a mirrored database and got this reply from Hugo Nunes, support Engineer at Microsoft.

In order to avoid orphaned users on the mirror database you’ll have to copy the logins corresponding to the database users, to the standby server. The copy must be made before restoring the database on the standby server. You’ll also need to copy the user with his SID. The Transfer Logins Task from SSIS performs that task for you as long you set the CopySids property to true.

It works.

|||

yes. but it doesn't solve the issue of default database for a login,

which leads to the same issue - login does not work.

|||

Hi to All,

We are currently having issues like that before, the fix that we do is adding a short dynamic script that will remove orphaned user by executing sp_change_users_login 'update_one', '<user1>','<user1>' on the mirrored database everytime a switch occur.

hope this helps!

regards,

|||

Hi Anders,

Did you ever got this to work? Do you know of any documents that walk you thought on how to do this? I am new with SSIS.

Thanks

Rick

|||

Hi Rick,

Yes, it's been up and running for almost a year now.

Im sorry i dont have a walk through for you but the SSIS bit is pretty straight forward.

These documents should get you started.

Transfer Logins Task

http://msdn2.microsoft.com/en-us/library/ms137870.aspx

Set Task Properties

http://msdn2.microsoft.com/en-us/library/ms139733.aspx

/Anders

Mirroring and orphaned users

Hi there!

There is still a problem with mirrored (mapped) SQL Users. If you mirror a database where an application connects with an sql user, the mapping (login / user) will be lost on the mirror server. After a failover occurs, it it not possible to log onto the new principal database because the database use will be an orphaned user and has to be remapped to the login (using sp_change_users_login 'update_one', 'user', 'user').

Is there any chance to do it in a system trigger? What is the firing event after the failover occurs? I've tried something like following, but it doesn't fire.

alter TRIGGER map_orphaned_users

ON ALL SERVER

FOR ALTER_DATABASE

AS

execute sp_change_users_login 'update_one', 'easyris_41', 'easyris_41';

Someone an idea how to automate these usermapping after failover on the (new) principal server?

Based on:

http://www.microsoft.com/technet/prodtechnol/sql/2005/mirroringevents.mspx#EDBAC

you can be set up to be notified (or run a job or particular sp) when the server becomes the principal.

Thanks,

mark

|||

Hmm, maybe thats a workaround.

But in my mind it doesn't confirm with the requirement of high availability with automatic failover. Furthermore, clients application could run into another exception (Login fails or something like that), what has to be adapted in applications what are designed for high avilibility.

Otherway all the stuff works with domain users. So it seems like a real bug. I can't see any conceptional reason for this behavior. Hope that will be fixed in SP2...

Torsten

|||

OK, I am going to try to write a bit.

1. I completely agree that from a customer's point of view, if when using sql logins, if the database fails over and the clients cannot get to the database (for whatever reason. Here it is a mixed mapping from login on a different server to a user in a "new" database ), then the system is not "highly available." So, we haven't made it easy to use mirroring in certain scenarios. I may try to create a script that solves this problem this weekend.

2. On the other hand, this problem has been here at least since 7.0. In log shipping, backup/restore, and attach/detach this problem of moving the database to a different server where the meta data in master and msdb are different on different servers. The problem is that we have made moving a database to a different server so much easier that the problems that were small earlier are becoming bigger.

So, this really isn't a bug IMHO, but it is unexpected behavior (which is still bad from a customer's point of view).

Thanks,

Mark

|||I am just starting to look into mirroring and had run across this same problem. I have not had a chance to look into this but supposedly there is a task in SSIS that allows you to transfer logins from one server to another.
|||

Hi guys,

I've asked MS about using sqlusers on a mirrored database and got this reply from Hugo Nunes, support Engineer at Microsoft.

In order to avoid orphaned users on the mirror database you’ll have to copy the logins corresponding to the database users, to the standby server. The copy must be made before restoring the database on the standby server. You’ll also need to copy the user with his SID. The Transfer Logins Task from SSIS performs that task for you as long you set the CopySids property to true.

It works.

|||

yes. but it doesn't solve the issue of default database for a login,

which leads to the same issue - login does not work.

|||

Hi to All,

We are currently having issues like that before, the fix that we do is adding a short dynamic script that will remove orphaned user by executing sp_change_users_login 'update_one', '<user1>','<user1>' on the mirrored database everytime a switch occur.

hope this helps!

regards,

|||

Hi Anders,

Did you ever got this to work? Do you know of any documents that walk you thought on how to do this? I am new with SSIS.

Thanks

Rick

|||

Hi Rick,

Yes, it's been up and running for almost a year now.

Im sorry i dont have a walk through for you but the SSIS bit is pretty straight forward.

These documents should get you started.

Transfer Logins Task

http://msdn2.microsoft.com/en-us/library/ms137870.aspx

Set Task Properties

http://msdn2.microsoft.com/en-us/library/ms139733.aspx

/Anders

Mirroring and orphaned users

Hi there!

There is still a problem with mirrored (mapped) SQL Users. If you mirror a database where an application connects with an sql user, the mapping (login / user) will be lost on the mirror server. After a failover occurs, it it not possible to log onto the new principal database because the database use will be an orphaned user and has to be remapped to the login (using sp_change_users_login 'update_one', 'user', 'user').

Is there any chance to do it in a system trigger? What is the firing event after the failover occurs? I've tried something like following, but it doesn't fire.

alter TRIGGER map_orphaned_users

ON ALL SERVER

FOR ALTER_DATABASE

AS

execute sp_change_users_login 'update_one', 'easyris_41', 'easyris_41';

Someone an idea how to automate these usermapping after failover on the (new) principal server?

Based on:

http://www.microsoft.com/technet/prodtechnol/sql/2005/mirroringevents.mspx#EDBAC

you can be set up to be notified (or run a job or particular sp) when the server becomes the principal.

Thanks,

mark

|||

Hmm, maybe thats a workaround.

But in my mind it doesn't confirm with the requirement of high availability with automatic failover. Furthermore, clients application could run into another exception (Login fails or something like that), what has to be adapted in applications what are designed for high avilibility.

Otherway all the stuff works with domain users. So it seems like a real bug. I can't see any conceptional reason for this behavior. Hope that will be fixed in SP2...

Torsten

|||

OK, I am going to try to write a bit.

1. I completely agree that from a customer's point of view, if when using sql logins, if the database fails over and the clients cannot get to the database (for whatever reason. Here it is a mixed mapping from login on a different server to a user in a "new" database ), then the system is not "highly available." So, we haven't made it easy to use mirroring in certain scenarios. I may try to create a script that solves this problem this weekend.

2. On the other hand, this problem has been here at least since 7.0. In log shipping, backup/restore, and attach/detach this problem of moving the database to a different server where the meta data in master and msdb are different on different servers. The problem is that we have made moving a database to a different server so much easier that the problems that were small earlier are becoming bigger.

So, this really isn't a bug IMHO, but it is unexpected behavior (which is still bad from a customer's point of view).

Thanks,

Mark

|||I am just starting to look into mirroring and had run across this same problem. I have not had a chance to look into this but supposedly there is a task in SSIS that allows you to transfer logins from one server to another.
|||

Hi guys,

I've asked MS about using sqlusers on a mirrored database and got this reply from Hugo Nunes, support Engineer at Microsoft.

In order to avoid orphaned users on the mirror database you’ll have to copy the logins corresponding to the database users, to the standby server. The copy must be made before restoring the database on the standby server. You’ll also need to copy the user with his SID. The Transfer Logins Task from SSIS performs that task for you as long you set the CopySids property to true.

It works.

|||

yes. but it doesn't solve the issue of default database for a login,

which leads to the same issue - login does not work.

|||

Hi to All,

We are currently having issues like that before, the fix that we do is adding a short dynamic script that will remove orphaned user by executing sp_change_users_login 'update_one', '<user1>','<user1>' on the mirrored database everytime a switch occur.

hope this helps!

regards,

|||

Hi Anders,

Did you ever got this to work? Do you know of any documents that walk you thought on how to do this? I am new with SSIS.

Thanks

Rick

|||

Hi Rick,

Yes, it's been up and running for almost a year now.

Im sorry i dont have a walk through for you but the SSIS bit is pretty straight forward.

These documents should get you started.

Transfer Logins Task

http://msdn2.microsoft.com/en-us/library/ms137870.aspx

Set Task Properties

http://msdn2.microsoft.com/en-us/library/ms139733.aspx

/Anders

Mirroring and orphaned users

Hi there!

There is still a problem with mirrored (mapped) SQL Users. If you mirror a database where an application connects with an sql user, the mapping (login / user) will be lost on the mirror server. After a failover occurs, it it not possible to log onto the new principal database because the database use will be an orphaned user and has to be remapped to the login (using sp_change_users_login 'update_one', 'user', 'user').

Is there any chance to do it in a system trigger? What is the firing event after the failover occurs? I've tried something like following, but it doesn't fire.

alter TRIGGER map_orphaned_users

ON ALL SERVER

FOR ALTER_DATABASE

AS

execute sp_change_users_login 'update_one', 'easyris_41', 'easyris_41';

Someone an idea how to automate these usermapping after failover on the (new) principal server?

Based on:

http://www.microsoft.com/technet/prodtechnol/sql/2005/mirroringevents.mspx#EDBAC

you can be set up to be notified (or run a job or particular sp) when the server becomes the principal.

Thanks,

mark

|||

Hmm, maybe thats a workaround.

But in my mind it doesn't confirm with the requirement of high availability with automatic failover. Furthermore, clients application could run into another exception (Login fails or something like that), what has to be adapted in applications what are designed for high avilibility.

Otherway all the stuff works with domain users. So it seems like a real bug. I can't see any conceptional reason for this behavior. Hope that will be fixed in SP2...

Torsten

|||

OK, I am going to try to write a bit.

1. I completely agree that from a customer's point of view, if when using sql logins, if the database fails over and the clients cannot get to the database (for whatever reason. Here it is a mixed mapping from login on a different server to a user in a "new" database ), then the system is not "highly available." So, we haven't made it easy to use mirroring in certain scenarios. I may try to create a script that solves this problem this weekend.

2. On the other hand, this problem has been here at least since 7.0. In log shipping, backup/restore, and attach/detach this problem of moving the database to a different server where the meta data in master and msdb are different on different servers. The problem is that we have made moving a database to a different server so much easier that the problems that were small earlier are becoming bigger.

So, this really isn't a bug IMHO, but it is unexpected behavior (which is still bad from a customer's point of view).

Thanks,

Mark

|||I am just starting to look into mirroring and had run across this same problem. I have not had a chance to look into this but supposedly there is a task in SSIS that allows you to transfer logins from one server to another.
|||

Hi guys,

I've asked MS about using sqlusers on a mirrored database and got this reply from Hugo Nunes, support Engineer at Microsoft.

In order to avoid orphaned users on the mirror database you’ll have to copy the logins corresponding to the database users, to the standby server. The copy must be made before restoring the database on the standby server. You’ll also need to copy the user with his SID. The Transfer Logins Task from SSIS performs that task for you as long you set the CopySids property to true.

It works.

|||

yes. but it doesn't solve the issue of default database for a login,

which leads to the same issue - login does not work.

|||

Hi to All,

We are currently having issues like that before, the fix that we do is adding a short dynamic script that will remove orphaned user by executing sp_change_users_login 'update_one', '<user1>','<user1>' on the mirrored database everytime a switch occur.

hope this helps!

regards,

|||

Hi Anders,

Did you ever got this to work? Do you know of any documents that walk you thought on how to do this? I am new with SSIS.

Thanks

Rick

|||

Hi Rick,

Yes, it's been up and running for almost a year now.

Im sorry i dont have a walk through for you but the SSIS bit is pretty straight forward.

These documents should get you started.

Transfer Logins Task

http://msdn2.microsoft.com/en-us/library/ms137870.aspx

Set Task Properties

http://msdn2.microsoft.com/en-us/library/ms139733.aspx

/Anders

Mirroring and logins

Hi,
I am maintaining a mirroring set up that I did not create. I have two
boxes with the same logins and 15-20 mirrored databases. My issue is
that I know some of the sids for SQL logins are different between the
boxes so that when we fail over in a crisis, some of the apps are not
going to be able to connect because of the ophaned login process. Is
there any way that I can run an automated process/script to find out
in advance what sids don't match. We have over 100 SQL logins that
exist on each server but may be mis-matched. I don't want to mirror
over and run the EXEC sp_change_users_login for each user on each
database.
Thanks in advance...
Kristina
> over and run the EXEC sp_change_users_login for each user on each
> database.
If you have SP2 you ca use ALTER USER username WITH LOGIN ='login'
"Kristina" <KristinaDBA@.gmail.com> wrote in message
news:d00cdbcb-7985-4c4b-b3fe-b8ef64d8eeb4@.m3g2000hsc.googlegroups.com...
> Hi,
> I am maintaining a mirroring set up that I did not create. I have two
> boxes with the same logins and 15-20 mirrored databases. My issue is
> that I know some of the sids for SQL logins are different between the
> boxes so that when we fail over in a crisis, some of the apps are not
> going to be able to connect because of the ophaned login process. Is
> there any way that I can run an automated process/script to find out
> in advance what sids don't match. We have over 100 SQL logins that
> exist on each server but may be mis-matched. I don't want to mirror
> over and run the EXEC sp_change_users_login for each user on each
> database.
> Thanks in advance...
|||On Apr 16, 10:30Xam, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Kristina> over and run the EXEC sp_change_users_login for each user Xon each
> If you have SP2 you ca use ALTER USER username WITH LOGIN ='login'
> "Kristina" <Kristina...@.gmail.com> wrote in message
> news:d00cdbcb-7985-4c4b-b3fe-b8ef64d8eeb4@.m3g2000hsc.googlegroups.com...
>
>
>
> - Show quoted text -
I don't think that will do the trick. On a mirrored instance the
databases are in a restoring mode so we can't do that. The databases
are not accessible.
|||Perhaps you can create a snapshot of your mirrored database? That should get you to
sys.database_principals (in the snapshot database) which you can check against
sys.server_principals.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Kristina" <KristinaDBA@.gmail.com> wrote in message
news:d00cdbcb-7985-4c4b-b3fe-b8ef64d8eeb4@.m3g2000hsc.googlegroups.com...
> Hi,
> I am maintaining a mirroring set up that I did not create. I have two
> boxes with the same logins and 15-20 mirrored databases. My issue is
> that I know some of the sids for SQL logins are different between the
> boxes so that when we fail over in a crisis, some of the apps are not
> going to be able to connect because of the ophaned login process. Is
> there any way that I can run an automated process/script to find out
> in advance what sids don't match. We have over 100 SQL logins that
> exist on each server but may be mis-matched. I don't want to mirror
> over and run the EXEC sp_change_users_login for each user on each
> database.
> Thanks in advance...
|||On Apr 16, 10:26Xpm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> Perhaps you can create a snapshot of your mirrored database? That should get you to
> sys.database_principals (in the snapshot database) which you can check against
> sys.server_principals.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "Kristina" <Kristina...@.gmail.com> wrote in message
> news:d00cdbcb-7985-4c4b-b3fe-b8ef64d8eeb4@.m3g2000hsc.googlegroups.com...
>
>
>
> - Show quoted text -
GREAT IDEA!!! Thanks! Now I know how to solve my problelm. I don't
know why I didn't think of this myself.

Mirroring and logins

Hi,
I am maintaining a mirroring set up that I did not create. I have two
boxes with the same logins and 15-20 mirrored databases. My issue is
that I know some of the sids for SQL logins are different between the
boxes so that when we fail over in a crisis, some of the apps are not
going to be able to connect because of the ophaned login process. Is
there any way that I can run an automated process/script to find out
in advance what sids don't match. We have over 100 SQL logins that
exist on each server but may be mis-matched. I don't want to mirror
over and run the EXEC sp_change_users_login for each user on each
database.
Thanks in advance...Kristina
> over and run the EXEC sp_change_users_login for each user on each
> database.
If you have SP2 you ca use ALTER USER username WITH LOGIN ='login'
"Kristina" <KristinaDBA@.gmail.com> wrote in message
news:d00cdbcb-7985-4c4b-b3fe-b8ef64d8eeb4@.m3g2000hsc.googlegroups.com...
> Hi,
> I am maintaining a mirroring set up that I did not create. I have two
> boxes with the same logins and 15-20 mirrored databases. My issue is
> that I know some of the sids for SQL logins are different between the
> boxes so that when we fail over in a crisis, some of the apps are not
> going to be able to connect because of the ophaned login process. Is
> there any way that I can run an automated process/script to find out
> in advance what sids don't match. We have over 100 SQL logins that
> exist on each server but may be mis-matched. I don't want to mirror
> over and run the EXEC sp_change_users_login for each user on each
> database.
> Thanks in advance...|||On Apr 16, 10:30=A0am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Kristina> over and run the EXEC sp_change_users_login for each user =A0on =each
> > database.
> If you have SP2 you ca use ALTER USER username WITH LOGIN =3D'login'
> "Kristina" <Kristina...@.gmail.com> wrote in message
> news:d00cdbcb-7985-4c4b-b3fe-b8ef64d8eeb4@.m3g2000hsc.googlegroups.com...
>
> > Hi,
> > I am maintaining a mirroring set up that I did not create. I have two
> > boxes with the same logins and 15-20 mirrored databases. My issue is
> > that I know some of the sids for SQL logins are different between the
> > boxes so that when we fail over in a crisis, some of the apps are not
> > going to be able to connect because of the ophaned login process. Is
> > there any way that I can run an automated process/script to find out
> > in advance what sids don't match. We have over 100 SQL logins that
> > exist on each server but may be mis-matched. I don't want to mirror
> > over and run the EXEC sp_change_users_login for each user =A0on each
> > database.
> > Thanks in advance...- Hide quoted text -
> - Show quoted text -
I don't think that will do the trick. On a mirrored instance the
databases are in a restoring mode so we can't do that. The databases
are not accessible.|||Perhaps you can create a snapshot of your mirrored database? That should get you to
sys.database_principals (in the snapshot database) which you can check against
sys.server_principals.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Kristina" <KristinaDBA@.gmail.com> wrote in message
news:d00cdbcb-7985-4c4b-b3fe-b8ef64d8eeb4@.m3g2000hsc.googlegroups.com...
> Hi,
> I am maintaining a mirroring set up that I did not create. I have two
> boxes with the same logins and 15-20 mirrored databases. My issue is
> that I know some of the sids for SQL logins are different between the
> boxes so that when we fail over in a crisis, some of the apps are not
> going to be able to connect because of the ophaned login process. Is
> there any way that I can run an automated process/script to find out
> in advance what sids don't match. We have over 100 SQL logins that
> exist on each server but may be mis-matched. I don't want to mirror
> over and run the EXEC sp_change_users_login for each user on each
> database.
> Thanks in advance...|||On Apr 16, 10:26=A0pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> Perhaps you can create a snapshot of your mirrored database? That should g=et you to
> sys.database_principals (in the snapshot database) which you can check aga=inst
> sys.server_principals.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asph=
ttp://sqlblog.com/blogs/tibor_karaszi
> "Kristina" <Kristina...@.gmail.com> wrote in message
> news:d00cdbcb-7985-4c4b-b3fe-b8ef64d8eeb4@.m3g2000hsc.googlegroups.com...
>
> > Hi,
> > I am maintaining a mirroring set up that I did not create. I have two
> > boxes with the same logins and 15-20 mirrored databases. My issue is
> > that I know some of the sids for SQL logins are different between the
> > boxes so that when we fail over in a crisis, some of the apps are not
> > going to be able to connect because of the ophaned login process. Is
> > there any way that I can run an automated process/script to find out
> > in advance what sids don't match. We have over 100 SQL logins that
> > exist on each server but may be mis-matched. I don't want to mirror
> > over and run the EXEC sp_change_users_login for each user =A0on each
> > database.
> > Thanks in advance...- Hide quoted text -
> - Show quoted text -
GREAT IDEA!!! Thanks! Now I know how to solve my problelm. I don't
know why I didn't think of this myself.

Mirroring and Log File Growth

We currently have a 10GB database that is functioning properly mirrored. The only issue we have is that the log files grow very quickly during the early morning hours when a large number of transactions hit our DB from scheduled jobs. We have transaction log backup and shrink job that runs every 3 hours to backup the log and shrink the logical file to 10GB. In most cases this will shrink the log back down to it's desired size of 10GB. However, on some mornings it takes more repetitions of the log backup/shrink job to return the log size back to "normal". During this these times when it does not shrink the DB effectively, I get a report of the job process by email that states "Cannot shrink log file 2 (e_Log) because all logical log files are in use." I run a DBCC OPENTRAN command, and there are no open transactions. Eventually, the log file will return to it's normal size of 10GB through the log file backup job. I have a few questions though.

1. Is this normal behavior during moderate database use?
2. Does mirroring have any effect on the SIZE of the log file?
3. Is it normal for the size of the data file to be smaller than the size of the log file on a heavily used database?
4. Does anyone have any suggestions to better maintain the log file size?

Thank you,
Greg

Mirroring won't affect the log, unless the Principal can't connect to the mirror in which case transactions will queue in the log and may cause issues.

Why are you shrinking your log? It should be as big as it needs to be, i.e. large enough to hold the transactions from your scheduled jobs. Having it auto-grow then re-shinking it is a waste of time and resources (it will slow down your scheduled jobs while the log grows).

The reason you can't shrink it sometimes is because the log actually consists of Virtual Log Files (VLFs). If the active one of these is near the end of the log file, it won't be shrinkable until it moves back to the beginning of the log file due to transactions having happened.

Normally the log file is smaller than the data file, but there may be exceptions. The bottom line is, the log needs to be as big as is required by the size and volume of transactions using the database.

Ensure you have adequate log backups of a suitable frequency all the time, and especially during your batch processing.

mirroring & backups

Hi,
I have a mirrored databased, which is in FULL recovery mode. I take log
backups every 1 hour and db backups every night. However, the log file keeps
increasing and due to mirroring I can’t shrink the log with shrinkfile. Is
this the recommended set-up for mirroring, am I trying to be too safe? Thanks.
Panos
You might want to try to backup more frequently. See if you have any open
transactions which might be causing log bloat.
DBCC Opentran
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Panos Stavroulis." <PanosStavroulis@.discussions.microsoft.com> wrote in
message news:EDBAC239-0B9A-4A2F-BE3B-D5A2C60A03D0@.microsoft.com...
> Hi,
> I have a mirrored databased, which is in FULL recovery mode. I take log
> backups every 1 hour and db backups every night. However, the log file
> keeps
> increasing and due to mirroring I can't shrink the log with shrinkfile. Is
> this the recommended set-up for mirroring, am I trying to be too safe?
> Thanks.
> Panos
>
|||Hilary, are you talking about backing up the log or the database? or both?
There are no open transactions I've checked that before. I assume that when
the backup log happens there are no open transactions.
Do you know how many rows I should get when I do dbcc loginfo? I get 397, 6
are of status 2, 4 rows at the beginning and 2 close to the end. When I
backup manually it goes to 1 close to the end. but always have at least one
row with status 2 close to the end. Thanks.
Panos.
"Hilary Cotter" wrote:

> You might want to try to backup more frequently. See if you have any open
> transactions which might be causing log bloat.
> DBCC Opentran
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Panos Stavroulis." <PanosStavroulis@.discussions.microsoft.com> wrote in
> message news:EDBAC239-0B9A-4A2F-BE3B-D5A2C60A03D0@.microsoft.com...
>
>
|||OK that seems to work fine. Even though my transaction log has stayed the
same size it hasn't increased since I've increased the frequency of the Log
backups. This is what I wanted.
"Panos Stavroulis." wrote:
[vbcol=seagreen]
> Hilary, are you talking about backing up the log or the database? or both?
> There are no open transactions I've checked that before. I assume that when
> the backup log happens there are no open transactions.
> Do you know how many rows I should get when I do dbcc loginfo? I get 397, 6
> are of status 2, 4 rows at the beginning and 2 close to the end. When I
> backup manually it goes to 1 close to the end. but always have at least one
> row with status 2 close to the end. Thanks.
> Panos.
> "Hilary Cotter" wrote:
sql

Wednesday, March 28, 2012

mirrored sql servers

Hello:
I have 2 MS SQL Servers 2000 Developer edition.
Both have same settings and databases. I'd like to have them as mirrored
servers - all transaction on one server must be performed on the other
automatically. More than that I'd like to get possible if something happened
to one server, all transactions will be performed on another one.
Please, give me a hint how to do that.

Thanks,
GBGB (v7v1k3@.hotmail.com) writes:
> I have 2 MS SQL Servers 2000 Developer edition.
> Both have same settings and databases. I'd like to have them as mirrored
> servers - all transaction on one server must be performed on the other
> automatically. More than that I'd like to get possible if something
> happened to one server, all transactions will be performed on another
> one.

Symmetric or one-way? If one server is a main server, and the other is a
standby server, you can use either log shipping or transactional
replication. Log shipping is easier to manage, as transactional
replication leaves its mark on the source database. On the other hand,
the standby server will not be accessible each time a log is applied,
and the lag time is longer.

If it is symmetric, that actions are to be replicated in both directions,
then you may want to look into merge replication. But this sounds anything
about trivial to me. What about if the same row was updated in both
databases? Who wins?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||The only purpose I have is to have a "backup" server to be ready
to substitute main server at any time with recent data in it
and "seamless" switching in production mode.

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns970419D43A88Yazorman@.127.0.0.1...
> GB (v7v1k3@.hotmail.com) writes:
> > I have 2 MS SQL Servers 2000 Developer edition.
> > Both have same settings and databases. I'd like to have them as mirrored
> > servers - all transaction on one server must be performed on the other
> > automatically. More than that I'd like to get possible if something
> > happened to one server, all transactions will be performed on another
> > one.
> Symmetric or one-way? If one server is a main server, and the other is a
> standby server, you can use either log shipping or transactional
> replication. Log shipping is easier to manage, as transactional
> replication leaves its mark on the source database. On the other hand,
> the standby server will not be accessible each time a log is applied,
> and the lag time is longer.
> If it is symmetric, that actions are to be replicated in both directions,
> then you may want to look into merge replication. But this sounds anything
> about trivial to me. What about if the same row was updated in both
> databases? Who wins?
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||GB (v7v1k3@.hotmail.com) writes:
> The only purpose I have is to have a "backup" server to be ready
> to substitute main server at any time with recent data in it
> and "seamless" switching in production mode.

OK. The I would suggest log shipping.

However, you cannot really switch into real production mode with
Developer Edition, as you don't have a license for it. But it is
of course, perfectly OK to set up log shipping to learn how to
use it for a production scenario.

Oh, I should add that once you come to production, you may only
have Standard or Workgroup Edition. Log Shipping is included in
Enterprise Edition only, so for these edition replication is about
the only option.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||In message <Xns97047DCD3077Yazorman@.127.0.0.1>, Erland Sommarskog
<esquel@.sommarskog.se> writes
>GB (v7v1k3@.hotmail.com) writes:
>> The only purpose I have is to have a "backup" server to be ready
>> to substitute main server at any time with recent data in it
>> and "seamless" switching in production mode.
>OK. The I would suggest log shipping.
>However, you cannot really switch into real production mode with
>Developer Edition, as you don't have a license for it. But it is
>of course, perfectly OK to set up log shipping to learn how to
>use it for a production scenario.
>Oh, I should add that once you come to production, you may only
>have Standard or Workgroup Edition. Log Shipping is included in
>Enterprise Edition only, so for these edition replication is about
>the only option.

If GB wants clustering and failover I think he will need the enterprise
edition.

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author.|||Bernard Peek (bap@.shrdlu.com) writes:
> If GB wants clustering and failover I think he will need the enterprise
> edition.

That is correct. (OK, since Developer Edition has all that Enterprise
Edition has, you can put that on a cluster. But if you put Developer
Edition on a cluster, then your hardware budget for your development
environment is quite excessive.)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Bernard Peek" <bap@.shrdlu.com> wrote in message
news:ahtXDqTk30aDFwG3@.shrdlu.com...
> In message <Xns97047DCD3077Yazorman@.127.0.0.1>, Erland Sommarskog
> <esquel@.sommarskog.se> writes
> >GB (v7v1k3@.hotmail.com) writes:
> >> The only purpose I have is to have a "backup" server to be ready
> >> to substitute main server at any time with recent data in it
> >> and "seamless" switching in production mode.
> >OK. The I would suggest log shipping.
> >However, you cannot really switch into real production mode with
> >Developer Edition, as you don't have a license for it. But it is
> >of course, perfectly OK to set up log shipping to learn how to
> >use it for a production scenario.
> >Oh, I should add that once you come to production, you may only
> >have Standard or Workgroup Edition. Log Shipping is included in
> >Enterprise Edition only, so for these edition replication is about
> >the only option.
> If GB wants clustering and failover I think he will need the enterprise
> edition.

SQL Server 2005 will be released with DB mirroring, though in a "beta form".

He may want to look at this.

> --
> Bernard Peek
> London, UK. DBA, Manager, Trainer & Author.

Mirrored Records?

Hi I need some SQL script help. Need script to delete all table rows that
are duplicates in mirror image. Table has 2 columns, ColumnA and ColumnB.
Row1: ColumnA = x, ColumnB = y
Row2: ColumnA = y, ColumnB = x
Those 2 rows are exactly the same for me. Need a script that will delete
Row2 and all other rows where they're mirrored duplicates.
Thanks DarenDaren,
Once you do this, you should consider putting a constraint on the
table to enforce ColumnA <= ColumnB so this doesn't happen again.
It's a bad model if there are two ways of representing the same facts.
delete from T as T1
where ColumnA > ColumnB
and exists (
select * from T as T2
where T2.ColumnA = T1.ColumnB
and T2.ColumnB = T1.ColumnA
)
If you want to delete only these "mirror duplicates"
when they exist for the same customer/transaction/whatever,
you will need something like
delete from T as T1
where ColumnA > ColumnB
and exists (
select * from T as T2
where T2.customer = T1.customer
and T2.ColumnA = T1.ColumnB
and T2.ColumnB = T1.ColumnA
)
Steve Kass
Drew University
Daren Hawes wrote:

>Hi I need some SQL script help. Need script to delete all table rows that
>are duplicates in mirror image. Table has 2 columns, ColumnA and ColumnB.
>Row1: ColumnA = x, ColumnB = y
>Row2: ColumnA = y, ColumnB = x
>Those 2 rows are exactly the same for me. Need a script that will delete
>Row2 and all other rows where they're mirrored duplicates.
>Thanks Daren
>
>|||Thanks. I am a little with T and T2
Do I need to create a new Table? I have added the actual names below.
Column a = FromID ; Column b = ToID
CREATE TABLE [dbo].[tbl_Matrix] (
[FareID] [int] IDENTITY (1, 1) NOT NULL ,
[FromID] [int] NULL ,
[ToID] [int] NULL ,
[PriceCode] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tbl_Matrix] ADD
CONSTRAINT [PK_tbl_Matrix] PRIMARY KEY CLUSTERED
(
[FareID]
) ON [PRIMARY]
GO
"Steve Kass" <skass@.drew.edu> wrote in message
news:%23eKPQBxZFHA.2212@.TK2MSFTNGP14.phx.gbl...
> Daren,
> Once you do this, you should consider putting a constraint on the
> table to enforce ColumnA <= ColumnB so this doesn't happen again.
> It's a bad model if there are two ways of representing the same facts.
> delete from T as T1
> where ColumnA > ColumnB
> and exists (
> select * from T as T2
> where T2.ColumnA = T1.ColumnB
> and T2.ColumnB = T1.ColumnA
> )
> If you want to delete only these "mirror duplicates"
> when they exist for the same customer/transaction/whatever,
> you will need something like
> delete from T as T1
> where ColumnA > ColumnB
> and exists (
> select * from T as T2
> where T2.customer = T1.customer
> and T2.ColumnA = T1.ColumnB
> and T2.ColumnB = T1.ColumnA
> )
> Steve Kass
> Drew University
>
> Daren Hawes wrote:
>|||Try the following untested DELETE statement:
DELETE FROM tbl_Matrix
WHERE EXISTS
(SELECT *
FROM tbl_Matrix AS T
WHERE T.fromid = tbl_Matrix.fromid
AND T.toid = tbl_Matrix.toid
AND T.fareid < tbl_Matrix.fareid)
Now make FromID and ToID not nullable and add a unqiue constraint on those
two columns.
David Portas
SQL Server MVP
--|||Thanks for the reply Dave (I'm working with Daren),
Tryed that 1, deleted nothing, modified it to this...
DELETE FROM tbl_Matrix
WHERE EXISTS
(SELECT *
FROM tbl_Matrix AS T
WHERE T.fromid = tbl_Matrix.toid
AND T.toid = tbl_Matrix.fromid)
...and it deleted everything.
This is a copy of the script we've used to create the table's data, perhaps
if we wrote this script a bit better, wouldn't need another script to clean
it up...
declare @.Counter int
declare @.Counter2 int
select @.Counter=1
select @.Counter2=1
while @.Counter < 136
begin
while @.Counter2 < 136
Begin
Insert into dbo.tbl_Matrix (FromID,ToID)
Values (@.Counter,@.Counter2)
set @.Counter2 = @.Counter2 + 1
End
set @.Counter = @.Counter + 1
set @.Counter2 = 1
end
Regards,
Offal Eater
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:xZ6dndpRhvr8_gPfRVn-sw@.giganews.com...
> Try the following untested DELETE statement:
> DELETE FROM tbl_Matrix
> WHERE EXISTS
> (SELECT *
> FROM tbl_Matrix AS T
> WHERE T.fromid = tbl_Matrix.fromid
> AND T.toid = tbl_Matrix.toid
> AND T.fareid < tbl_Matrix.fareid)
> Now make FromID and ToID not nullable and add a unqiue constraint on those
> two columns.
> --
> David Portas
> SQL Server MVP
> --
>|||Thanks for the reply Dave (I'm working with Daren),
Not having any luck with these scripts, I've included the script we've used
to create the table. Perhaps if we wrote this differently, wouldn't have
need for the 'clean-up' script.
declare @.Counter int
declare @.Counter2 int
select @.Counter=1
select @.Counter2=1
while @.Counter < 136
begin
while @.Counter2 < 136
Begin
Insert into dbo.tbl_Matrix (FromID,ToID)
Values (@.Counter,@.Counter2)
set @.Counter2 = @.Counter2 + 1
End
set @.Counter = @.Counter + 1
set @.Counter2 = 1
end
Any feedback would be great.
Thx,
Offal Eater
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:xZ6dndpRhvr8_gPfRVn-sw@.giganews.com...
> Try the following untested DELETE statement:
> DELETE FROM tbl_Matrix
> WHERE EXISTS
> (SELECT *
> FROM tbl_Matrix AS T
> WHERE T.fromid = tbl_Matrix.fromid
> AND T.toid = tbl_Matrix.toid
> AND T.fareid < tbl_Matrix.fareid)
> Now make FromID and ToID not nullable and add a unqiue constraint on those
> two columns.
> --
> David Portas
> SQL Server MVP
> --
>|||T1 and T2 are table aliases. You need to compare each
row of T with the rest of T, and to distinguish the "this row"
table and the "rest of" table, you need the aliases:
Since FareID is the primary key, this will do
delete from tbl_Matrix as T1
where ToID > FromID
and exists (
select * from tbl_Matrix as T2
where T2.FromID = T1.ToID
and T2.ToID = T1.FromID
)
This will arbitrarily remove the one of the two mirror duplicates
for which ToID < FromID. If you want to remove, say, the
one with the smaller FareID, you could do this instead:
delete from tbl_Matrix as T1
where exists (
select * from tbl_Matrix as T2
where T2.FromID = T1.ToID
and T2.ToID = T1.FromID
and T2.FareID > T1.FareID
)
Seeing your table now, I'd recommend you change the primary
key to (FromID, ToID), and add a table constraint to enforce
FromID < ToID, or at least put a UNIQUE constraint on
(FromID, ToID), and make those two columns NOT NULL (if
not all columns). I don't see much use to the column FareID,
actually, but removing it might mess up other thing you rely on.
There could be other problems, too. You could have many rows
with the same FromID, ToID pair in the same order, but with
different FareID values. So you might want to do this:
delete from tbl_Matrix as T1
where exists (
select * from tbl_Matrix as T2
where (
T2.FromID = T1.ToID
and T2.ToID = T1.FromID
) or (
T2.FromID = T1.FromID
and T2.ToID = T1.ToID
)
and T2.FareID > T1.FareID
)
If you have rows where FromID = ToID, you can delete them
separately. I assume those would make no sense, but you have
nothing to prevent that from occurring right now.
SK
Daren Hawes wrote:

>Thanks. I am a little with T and T2
>Do I need to create a new Table? I have added the actual names below.
>Column a = FromID ; Column b = ToID
>CREATE TABLE [dbo].[tbl_Matrix] (
> [FareID] [int] IDENTITY (1, 1) NOT NULL ,
> [FromID] [int] NULL ,
> [ToID] [int] NULL ,
> [PriceCode] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL
> ) ON [PRIMARY]
>GO
>ALTER TABLE [dbo].[tbl_Matrix] ADD
> CONSTRAINT [PK_tbl_Matrix] PRIMARY KEY CLUSTERED
> (
> [FareID]
> ) ON [PRIMARY]
>GO
>
>"Steve Kass" <skass@.drew.edu> wrote in message
>news:%23eKPQBxZFHA.2212@.TK2MSFTNGP14.phx.gbl...
>
>
>|||> Tryed that 1, deleted nothing, modified it to this...
I ran your script and it didn't generate any duplicates so there is nothing
to delete - the combination of (FromID, ToID) is already unique (18225
rows). If you have something different in your data then please post a few
INSERT statements to generate some sample data that we can use to test it
out.

> This is a copy of the script we've used to create the table's data,
> perhaps if we wrote this script a bit better, wouldn't need another script
> to clean it up...
I posted a different solution to this in reply to Daren's post earlier
today.
David Portas
SQL Server MVP
--|||Here's a much better way to create the table. It uses
just one insert and no loops, and has much less chance of
off-by-one errors:
-- create a temporary table full of integers
declare @.Ints table (
IntVal int primary key
)
insert into @.Ints
select OrderID-10247
from Northwind..Orders
where OrderID-10247 between 1 and 136
-- Insert everything at once:
insert into dbo.tbl_Matrix(FromID, ToID)
select N1.IntVal, N2.IntVal
from @.Ints as N1 join @.Ints as N2
on N1.IntVal between 1 and 136
and N2.IntVal between N1.IntVal and 136
-- or N2.IntVal between N1.IntVal+1 and 136
If you want loops, but no mirror duplicates, replace
set @.Counter2 = 1
with
set @.Counter2 = @.Counter
This will continue to give you rows where FromID = ToID. If you don't
want those, start @.Counter2 one higher. Here's a guess, cleaned up
a bit, but I'd never trust this as much as the first suggestion I gave.
declare @.Counter int
declare @.Counter2 int
select @.Counter=0
while @.Counter < 135
begin
set @.Counter = @.Counter + 1
set @.Counter2 = @.Counter
while @.Counter2 < 135
Begin
set @.Counter2 = @.Counter2 + 1
Insert into dbo.tbl_Matrix (FromID,ToID)
Values (@.Counter,@.Counter2)
End
end
SK
Offal Eater wrote:

>Thanks for the reply Dave (I'm working with Daren),
>Not having any luck with these scripts, I've included the script we've used
>to create the table. Perhaps if we wrote this differently, wouldn't have
>need for the 'clean-up' script.
>declare @.Counter int
>declare @.Counter2 int
>select @.Counter=1
>select @.Counter2=1
>while @.Counter < 136
>begin
> while @.Counter2 < 136
> Begin
> Insert into dbo.tbl_Matrix (FromID,ToID)
> Values (@.Counter,@.Counter2)
> set @.Counter2 = @.Counter2 + 1
> End
>set @.Counter = @.Counter + 1
>set @.Counter2 = 1
>end
>Any feedback would be great.
>Thx,
>Offal Eater
>"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
>news:xZ6dndpRhvr8_gPfRVn-sw@.giganews.com...
>
>
>|||David,
I don't think the OP wants both (a, b) and (b, a). The 18225 rows
from the script are all (a,b) where a and b are between 1 and 135.
One way to eliminate the "mirror duplicates" is to generate only pairs
where a <= b (or perhaps a < b). There should be either 9180 or
9045 rows, depending on whether = is included.
SK
David Portas wrote:

>I ran your script and it didn't generate any duplicates so there is nothing
>to delete - the combination of (FromID, ToID) is already unique (18225
>rows). If you have something different in your data then please post a few
>INSERT statements to generate some sample data that we can use to test it
>out.
>
>
>I posted a different solution to this in reply to Daren's post earlier
>today.
>
>

Mirrored linked server failover.

We have a mirrored db setup, with a third server that needs to be linked to this mirrored setup as a linked server. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks

It's not clear which way you are creating the linked server:

If it is from the primary->third server then you will need to create the linked server on both the principal and mirror since it does not automatically failover (it's defined at the instance level and not the database level).

If it is from the third server->primary then ensure you set the failover partner property in the linked server and that the default database is specified (catalog in provider speak). For example

EXEC master.dbo.sp_addlinkedserver

@.server = N'matthol11',

@.srvproduct=N'',

@.provider=N'SQLNCLI',

@.catalog=N'test',

@.provstr=N'Server=matthol11;FailoverPartner=matthol6;'

select*from matthol11.test.dbo.test

Regards,

Matt

Mirrored linked server failover.

We have a mirror setup, with a third server that needs to be linked to this mirrored setup. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks

Andre,

You can specify the partner name in the linked server server properties and the linked server will automatically failover from the principal to the mirror if the principal is failed over.

Regards,

Matt Hollingswort

Sr. Program Manager

Microsoft SQL Server

sql

Mirrored linked server failover.

We have a mirrored db setup, with a third server that needs to be linked to this mirrored setup as a linked server. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks

It's not clear which way you are creating the linked server:

If it is from the primary->third server then you will need to create the linked server on both the principal and mirror since it does not automatically failover (it's defined at the instance level and not the database level).

If it is from the third server->primary then ensure you set the failover partner property in the linked server and that the default database is specified (catalog in provider speak). For example

EXEC master.dbo.sp_addlinkedserver

@.server = N'matthol11',

@.srvproduct=N'',

@.provider=N'SQLNCLI',

@.catalog=N'test',

@.provstr=N'Server=matthol11;FailoverPartner=matthol6;'

select * from matthol11.test.dbo.test

Regards,

Matt

Mirrored linked server failover.

We have a mirror setup, with a third server that needs to be linked to this mirrored setup. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks

Andre,

You can specify the partner name in the linked server server properties and the linked server will automatically failover from the principal to the mirror if the principal is failed over.

Regards,

Matt Hollingswort

Sr. Program Manager

Microsoft SQL Server

Mirrored db - Witness server multiple networks

All,
I've just completed setting up a mirrored db with 2 servers that reside on
different networks. All the appropriate routes are added and the boxes see
each other fine both at the OS level and the SQL server level. My witness
server is a machine with 2 nics, each can talk to each network and it sees
both sql servers just fine. IP Forwarding is enabled. I've succesfully
configured the Primary to use the witness server and it sees it fine. However
the Mirror server is constantly reporting that the witness server is
disconnected. I can connect through management studio and every other just
fine. Anything I need due to the fact that the primary and the mirror are on
different networks when it comes to the witness box? Any suggestions
appreciated. There are no firewalls in play.
Thanks.
Hi
I am not sure why you have not configured these on their own subnet? I would
contact PSS to see if this is possible.
John
"sqlboy2000" wrote:

> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine. However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.
|||You won't be able to use Windows authentication across networks - you will
need to use certificates.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine.
> However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are
> on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.
|||By "different networks" I meant different subnets.
"Roger Wolter[MSFT]" wrote:

> You won't be able to use Windows authentication across networks - you will
> need to use certificates.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
>
>

Mirrored db - Witness server multiple networks

All,
I've just completed setting up a mirrored db with 2 servers that reside on
different networks. All the appropriate routes are added and the boxes see
each other fine both at the OS level and the SQL server level. My witness
server is a machine with 2 nics, each can talk to each network and it sees
both sql servers just fine. IP Forwarding is enabled. I've succesfully
configured the Primary to use the witness server and it sees it fine. However
the Mirror server is constantly reporting that the witness server is
disconnected. I can connect through management studio and every other just
fine. Anything I need due to the fact that the primary and the mirror are on
different networks when it comes to the witness box? Any suggestions
appreciated. There are no firewalls in play.
Thanks.Hi
I am not sure why you have not configured these on their own subnet? I would
contact PSS to see if this is possible.
John
"sqlboy2000" wrote:
> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine. However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.|||You won't be able to use Windows authentication across networks - you will
need to use certificates.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine.
> However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are
> on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.

Mirrored db - Witness server multiple networks

All,
I've just completed setting up a mirrored db with 2 servers that reside on
different networks. All the appropriate routes are added and the boxes see
each other fine both at the OS level and the SQL server level. My witness
server is a machine with 2 nics, each can talk to each network and it sees
both sql servers just fine. IP Forwarding is enabled. I've succesfully
configured the Primary to use the witness server and it sees it fine. Howeve
r
the Mirror server is constantly reporting that the witness server is
disconnected. I can connect through management studio and every other just
fine. Anything I need due to the fact that the primary and the mirror are on
different networks when it comes to the witness box? Any suggestions
appreciated. There are no firewalls in play.
Thanks.Hi
I am not sure why you have not configured these on their own subnet? I would
contact PSS to see if this is possible.
John
"sqlboy2000" wrote:

> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine. Howe
ver
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are
on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.|||You won't be able to use Windows authentication across networks - you will
need to use certificates.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
> All,
> I've just completed setting up a mirrored db with 2 servers that reside on
> different networks. All the appropriate routes are added and the boxes see
> each other fine both at the OS level and the SQL server level. My witness
> server is a machine with 2 nics, each can talk to each network and it sees
> both sql servers just fine. IP Forwarding is enabled. I've succesfully
> configured the Primary to use the witness server and it sees it fine.
> However
> the Mirror server is constantly reporting that the witness server is
> disconnected. I can connect through management studio and every other just
> fine. Anything I need due to the fact that the primary and the mirror are
> on
> different networks when it comes to the witness box? Any suggestions
> appreciated. There are no firewalls in play.
> Thanks.|||By "different networks" I meant different subnets.
"Roger Wolter[MSFT]" wrote:

> You won't be able to use Windows authentication across networks - you will
> need to use certificates.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:6605AA68-D48F-4827-A583-1302CBEB55C5@.microsoft.com...
>
>sql

Mirrored databases and Witness server

We are upgrading to 2005 and have decided to go to a mirrored 2005
environment. We have picked out the production server (principal) 16
gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
having difficulty finding out how "beefy" a box we need for the Witness
server. Does anyone have any experience with this and can you assist me
in specs. I am working with our Network Administrator.
Thanks for all the help!
KristinaAm 11 Jan 2007 06:32:20 -0800 schrieb KristinaDBA@.gmail.com:

> We are upgrading to 2005 and have decided to go to a mirrored 2005
> environment. We have picked out the production server (principal) 16
> gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
> having difficulty finding out how "beefy" a box we need for the Witness
> server. Does anyone have any experience with this and can you assist me
> in specs. I am working with our Network Administrator.
> Thanks for all the help!
> Kristina
Hi, the whitness Server don't need to be so big ;-)
You should install the right editon of SQL Server to be Witness.
The relevance of your sizing are the other roles/jobs this server will do
beside beeing witness.
thats my opinion. hope I could help a little
greetings
Rouven|||Hi,
Kristina - your witness server can be a single processor box with
1/2 GB memory. You can even use SQL Server express. The resources
needed for the witness server is minimum.
This from our Microsoft pre-sales rep.
hth
KristinaDBA@.gmail.com wrote:
> We are upgrading to 2005 and have decided to go to a mirrored 2005
> environment. We have picked out the production server (principal) 16
> gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
> having difficulty finding out how "beefy" a box we need for the Witness
> server. Does anyone have any experience with this and can you assist me
> in specs. I am working with our Network Administrator.
> Thanks for all the help!
> Kristina|||Hey - thanks everyone for the help! I love this group!
JoeyD wrote:[vbcol=seagreen]
> Hi,
> Kristina - your witness server can be a single processor box with
> 1/2 GB memory. You can even use SQL Server express. The resources
> needed for the witness server is minimum.
> This from our Microsoft pre-sales rep.
> hth
>
> KristinaDBA@.gmail.com wrote:|||While being a witness is not a very hard job, it is important because when
the witness is down, automatic failover won't happen so while you can get by
without a lot of processor or memory resources, you don't want to use your
kid's old game machine for this. Get a good quality machine with a good NIC
card and maybe even a UPS.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
<KristinaDBA@.gmail.com> wrote in message
news:1168528668.044990.221330@.i56g2000hsf.googlegroups.com...
> Hey - thanks everyone for the help! I love this group!
> JoeyD wrote:
>

Mirrored databases and Witness server

We are upgrading to 2005 and have decided to go to a mirrored 2005
environment. We have picked out the production server (principal) 16
gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
having difficulty finding out how "beefy" a box we need for the Witness
server. Does anyone have any experience with this and can you assist me
in specs. I am working with our Network Administrator.
Thanks for all the help!
Kristina
Hi,
Kristina - your witness server can be a single processor box with
1/2 GB memory. You can even use SQL Server express. The resources
needed for the witness server is minimum.
This from our Microsoft pre-sales rep.
hth
KristinaDBA@.gmail.com wrote:
> We are upgrading to 2005 and have decided to go to a mirrored 2005
> environment. We have picked out the production server (principal) 16
> gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
> having difficulty finding out how "beefy" a box we need for the Witness
> server. Does anyone have any experience with this and can you assist me
> in specs. I am working with our Network Administrator.
> Thanks for all the help!
> Kristina
|||Hey - thanks everyone for the help! I love this group!
JoeyD wrote:[vbcol=seagreen]
> Hi,
> Kristina - your witness server can be a single processor box with
> 1/2 GB memory. You can even use SQL Server express. The resources
> needed for the witness server is minimum.
> This from our Microsoft pre-sales rep.
> hth
>
> KristinaDBA@.gmail.com wrote:
|||While being a witness is not a very hard job, it is important because when
the witness is down, automatic failover won't happen so while you can get by
without a lot of processor or memory resources, you don't want to use your
kid's old game machine for this. Get a good quality machine with a good NIC
card and maybe even a UPS.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
<KristinaDBA@.gmail.com> wrote in message
news:1168528668.044990.221330@.i56g2000hsf.googlegr oups.com...
> Hey - thanks everyone for the help! I love this group!
> JoeyD wrote:
>

Mirrored databases and Witness server

We are upgrading to 2005 and have decided to go to a mirrored 2005
environment. We have picked out the production server (principal) 16
gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
having difficulty finding out how "beefy" a box we need for the Witness
server. Does anyone have any experience with this and can you assist me
in specs. I am working with our Network Administrator.
Thanks for all the help!
KristinaAm 11 Jan 2007 06:32:20 -0800 schrieb KristinaDBA@.gmail.com:
> We are upgrading to 2005 and have decided to go to a mirrored 2005
> environment. We have picked out the production server (principal) 16
> gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
> having difficulty finding out how "beefy" a box we need for the Witness
> server. Does anyone have any experience with this and can you assist me
> in specs. I am working with our Network Administrator.
> Thanks for all the help!
> Kristina
Hi, the whitness Server don't need to be so big ;-)
You should install the right editon of SQL Server to be Witness.
The relevance of your sizing are the other roles/jobs this server will do
beside beeing witness.
thats my opinion. hope I could help a little
greetings
Rouven|||Hi,
Kristina - your witness server can be a single processor box with
1/2 GB memory. You can even use SQL Server express. The resources
needed for the witness server is minimum.
This from our Microsoft pre-sales rep.
hth
KristinaDBA@.gmail.com wrote:
> We are upgrading to 2005 and have decided to go to a mirrored 2005
> environment. We have picked out the production server (principal) 16
> gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
> having difficulty finding out how "beefy" a box we need for the Witness
> server. Does anyone have any experience with this and can you assist me
> in specs. I am working with our Network Administrator.
> Thanks for all the help!
> Kristina|||Hey - thanks everyone for the help! I love this group!
JoeyD wrote:
> Hi,
> Kristina - your witness server can be a single processor box with
> 1/2 GB memory. You can even use SQL Server express. The resources
> needed for the witness server is minimum.
> This from our Microsoft pre-sales rep.
> hth
>
> KristinaDBA@.gmail.com wrote:
> > We are upgrading to 2005 and have decided to go to a mirrored 2005
> > environment. We have picked out the production server (principal) 16
> > gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
> > having difficulty finding out how "beefy" a box we need for the Witness
> > server. Does anyone have any experience with this and can you assist me
> > in specs. I am working with our Network Administrator.
> >
> > Thanks for all the help!
> >
> > Kristina|||While being a witness is not a very hard job, it is important because when
the witness is down, automatic failover won't happen so while you can get by
without a lot of processor or memory resources, you don't want to use your
kid's old game machine for this. Get a good quality machine with a good NIC
card and maybe even a UPS.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
<KristinaDBA@.gmail.com> wrote in message
news:1168528668.044990.221330@.i56g2000hsf.googlegroups.com...
> Hey - thanks everyone for the help! I love this group!
> JoeyD wrote:
>> Hi,
>> Kristina - your witness server can be a single processor box with
>> 1/2 GB memory. You can even use SQL Server express. The resources
>> needed for the witness server is minimum.
>> This from our Microsoft pre-sales rep.
>> hth
>>
>> KristinaDBA@.gmail.com wrote:
>> > We are upgrading to 2005 and have decided to go to a mirrored 2005
>> > environment. We have picked out the production server (principal) 16
>> > gigs memory, dual proc quad core, Server 2003 Enterprise Edition. I am
>> > having difficulty finding out how "beefy" a box we need for the Witness
>> > server. Does anyone have any experience with this and can you assist me
>> > in specs. I am working with our Network Administrator.
>> >
>> > Thanks for all the help!
>> >
>> > Kristina
>