We are moving our asp application from SQL2k to SQL2k5. I implemented
database mirroring for my critical databases, which is setup & running. I
modified the connection string in the Global.asa to point to my new servers.
When both SQL servers are up & running I connect to the primary database.
However, when the server hosting the primary database is stopped, I get an
error regarding the connection string.
Is this an application error that needs to be resolved? What do I tell the
developers to do?
Is this a problem with the SQL connection string? Does anyone have working
examples?
Also, I am using a witness server.
Does anyone have any test procedures/scripts/scenarios to insure mirroring
is working as it should. I thought I could stop SQL on a server run a test,
restart SQL & then check the databases.
I'm ok at server & database admin but poor at database programming. And
brand new to SQL2k5 mirroring.
Thanks"BigSam" <BigSam@.discussions.microsoft.com> wrote in message
news:26E0585C-23F3-4C84-B466-B8EFB44504B4@.microsoft.com...
> We are moving our asp application from SQL2k to SQL2k5. I implemented
> database mirroring for my critical databases, which is setup & running. I
> modified the connection string in the Global.asa to point to my new
> servers.
> When both SQL servers are up & running I connect to the primary database.
> However, when the server hosting the primary database is stopped, I get an
> error regarding the connection string.
> Is this an application error that needs to be resolved? What do I tell the
> developers to do?
> Is this a problem with the SQL connection string? Does anyone have working
> examples?
> Also, I am using a witness server.
> Does anyone have any test procedures/scripts/scenarios to insure mirroring
> is working as it should. I thought I could stop SQL on a server run a
> test,
> restart SQL & then check the databases.
> I'm ok at server & database admin but poor at database programming. And
> brand new to SQL2k5 mirroring.
>
Does your connection string specify both the principal and the mirror? If
not, failover will work, but startup when the principal is down will not.
See:
System.Data.SqlConnection.ConnectionString Property
Failover Partner
N/A
The name of the failover partner server where database mirroring is
configured.
The Failover Partner keyword is not supported by .NET Framework version 1.0
or 1.1.
http://msdn2.microsoft.com/en-us/li...tionstring.aspx
David|||"David Browne" wrote:
>
> "BigSam" <BigSam@.discussions.microsoft.com> wrote in message
> news:26E0585C-23F3-4C84-B466-B8EFB44504B4@.microsoft.com...
> Does your connection string specify both the principal and the mirror? If
> not, failover will work, but startup when the principal is down will not.
> See:
> System.Data.SqlConnection.ConnectionString Property
> Failover Partner
> N/A
> The name of the failover partner server where database mirroring is
> configured.
> The Failover Partner keyword is not supported by .NET Framework version 1.
0
> or 1.1.
> http://msdn2.microsoft.com/en-us/li...tionstring.aspx
>
> David
> This is the connection string set in the Global.asa:
Application("ConnectionString") = "Provider=sqloledb;Server=SQL1;Failover
Partner=SQL2;Initial Catalog=MainDB;UID=TestUser;Pwd=Test99"
Also, we're not using asp.net - just plain old ASP.|||"BigSam" <BigSam@.discussions.microsoft.com> wrote in message
news:E89D67CA-4BA6-4A87-B053-F3F10BC1D3AC@.microsoft.com...
>
> "David Browne" wrote:
>
> Application("ConnectionString") = "Provider=sqloledb;Server=SQL1;Failover
> Partner=SQL2;Initial Catalog=MainDB;UID=TestUser;Pwd=Test99"
> Also, we're not using asp.net - just plain old ASP.
>
The OleDb provider you're using isn't mirroring-aware. The SQLNCLI the new
SqlServer Native Client provider, if it works correctly with your
application. See:
Using ADO with SQL Native Client
http://msdn2.microsoft.com/en-us/library/ms130978.aspx
If you stick with SQLOLEDB, then you can use DNS or BigIP to manually switch
the traffic between servers, or just change your config and boune the site.
David|||Thanks for your reply.
Yesterday & was able to determine that without mirroring I could connect to
each server with the SQL login. However, with mirroring enabled I could only
connect to SQL1 with the SQL login. I began to suspect the SID & found this
article: http://support.microsoft.com/default.aspx/kb/918992/
"Magas" wrote:
[vbcol=seagreen]
> If you use SQL Server login to connect to the mirror database - make sure
> logins on both mirror servers have the same SID. The easiest way to do it
-
> copy login from one server to another using SSIS package.
>
> "BigSam" wrote:
>
Showing posts with label sql2k. Show all posts
Showing posts with label sql2k. Show all posts
Wednesday, March 28, 2012
Mirroring
We are moving our asp application from SQL2k to SQL2k5. I implemented
database mirroring for my critical databases, which is setup & running. I
modified the connection string in the Global.asa to point to my new servers.
When both SQL servers are up & running I connect to the primary database.
However, when the server hosting the primary database is stopped, I get an
error regarding the connection string.
Is this an application error that needs to be resolved? What do I tell the
developers to do?
Is this a problem with the SQL connection string? Does anyone have working
examples?
Also, I am using a witness server.
Does anyone have any test procedures/scripts/scenarios to insure mirroring
is working as it should. I thought I could stop SQL on a server run a test,
restart SQL & then check the databases.
I'm ok at server & database admin but poor at database programming. And
brand new to SQL2k5 mirroring.
Thanks
"BigSam" <BigSam@.discussions.microsoft.com> wrote in message
news:26E0585C-23F3-4C84-B466-B8EFB44504B4@.microsoft.com...
> We are moving our asp application from SQL2k to SQL2k5. I implemented
> database mirroring for my critical databases, which is setup & running. I
> modified the connection string in the Global.asa to point to my new
> servers.
> When both SQL servers are up & running I connect to the primary database.
> However, when the server hosting the primary database is stopped, I get an
> error regarding the connection string.
> Is this an application error that needs to be resolved? What do I tell the
> developers to do?
> Is this a problem with the SQL connection string? Does anyone have working
> examples?
> Also, I am using a witness server.
> Does anyone have any test procedures/scripts/scenarios to insure mirroring
> is working as it should. I thought I could stop SQL on a server run a
> test,
> restart SQL & then check the databases.
> I'm ok at server & database admin but poor at database programming. And
> brand new to SQL2k5 mirroring.
>
Does your connection string specify both the principal and the mirror? If
not, failover will work, but startup when the principal is down will not.
See:
System.Data.SqlConnection.ConnectionString Property
Failover Partner
N/A
The name of the failover partner server where database mirroring is
configured.
The Failover Partner keyword is not supported by .NET Framework version 1.0
or 1.1.
[url]http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstri ng.aspx[/url]
David
|||"David Browne" wrote:
>
> "BigSam" <BigSam@.discussions.microsoft.com> wrote in message
> news:26E0585C-23F3-4C84-B466-B8EFB44504B4@.microsoft.com...
> Does your connection string specify both the principal and the mirror? If
> not, failover will work, but startup when the principal is down will not.
> See:
> System.Data.SqlConnection.ConnectionString Property
> Failover Partner
> N/A
> The name of the failover partner server where database mirroring is
> configured.
> The Failover Partner keyword is not supported by .NET Framework version 1.0
> or 1.1.
> [url]http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstri ng.aspx[/url]
>
> David
> This is the connection string set in the Global.asa:
Application("ConnectionString") = "Provider=sqloledb;Server=SQL1;Failover
Partner=SQL2;Initial Catalog=MainDB;UID=TestUser;Pwd=Test99"
Also, we're not using asp.net - just plain old ASP.
|||"BigSam" <BigSam@.discussions.microsoft.com> wrote in message
news:E89D67CA-4BA6-4A87-B053-F3F10BC1D3AC@.microsoft.com...
>
> "David Browne" wrote:
> Application("ConnectionString") = "Provider=sqloledb;Server=SQL1;Failover
> Partner=SQL2;Initial Catalog=MainDB;UID=TestUser;Pwd=Test99"
> Also, we're not using asp.net - just plain old ASP.
>
The OleDb provider you're using isn't mirroring-aware. The SQLNCLI the new
SqlServer Native Client provider, if it works correctly with your
application. See:
Using ADO with SQL Native Client
http://msdn2.microsoft.com/en-us/library/ms130978.aspx
If you stick with SQLOLEDB, then you can use DNS or BigIP to manually switch
the traffic between servers, or just change your config and boune the site.
David
|||Thanks for your reply.
Yesterday & was able to determine that without mirroring I could connect to
each server with the SQL login. However, with mirroring enabled I could only
connect to SQL1 with the SQL login. I began to suspect the SID & found this
article: http://support.microsoft.com/default.aspx/kb/918992/
"Magas" wrote:
[vbcol=seagreen]
> If you use SQL Server login to connect to the mirror database - make sure
> logins on both mirror servers have the same SID. The easiest way to do it -
> copy login from one server to another using SSIS package.
>
> "BigSam" wrote:
sql
database mirroring for my critical databases, which is setup & running. I
modified the connection string in the Global.asa to point to my new servers.
When both SQL servers are up & running I connect to the primary database.
However, when the server hosting the primary database is stopped, I get an
error regarding the connection string.
Is this an application error that needs to be resolved? What do I tell the
developers to do?
Is this a problem with the SQL connection string? Does anyone have working
examples?
Also, I am using a witness server.
Does anyone have any test procedures/scripts/scenarios to insure mirroring
is working as it should. I thought I could stop SQL on a server run a test,
restart SQL & then check the databases.
I'm ok at server & database admin but poor at database programming. And
brand new to SQL2k5 mirroring.
Thanks
"BigSam" <BigSam@.discussions.microsoft.com> wrote in message
news:26E0585C-23F3-4C84-B466-B8EFB44504B4@.microsoft.com...
> We are moving our asp application from SQL2k to SQL2k5. I implemented
> database mirroring for my critical databases, which is setup & running. I
> modified the connection string in the Global.asa to point to my new
> servers.
> When both SQL servers are up & running I connect to the primary database.
> However, when the server hosting the primary database is stopped, I get an
> error regarding the connection string.
> Is this an application error that needs to be resolved? What do I tell the
> developers to do?
> Is this a problem with the SQL connection string? Does anyone have working
> examples?
> Also, I am using a witness server.
> Does anyone have any test procedures/scripts/scenarios to insure mirroring
> is working as it should. I thought I could stop SQL on a server run a
> test,
> restart SQL & then check the databases.
> I'm ok at server & database admin but poor at database programming. And
> brand new to SQL2k5 mirroring.
>
Does your connection string specify both the principal and the mirror? If
not, failover will work, but startup when the principal is down will not.
See:
System.Data.SqlConnection.ConnectionString Property
Failover Partner
N/A
The name of the failover partner server where database mirroring is
configured.
The Failover Partner keyword is not supported by .NET Framework version 1.0
or 1.1.
[url]http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstri ng.aspx[/url]
David
|||"David Browne" wrote:
>
> "BigSam" <BigSam@.discussions.microsoft.com> wrote in message
> news:26E0585C-23F3-4C84-B466-B8EFB44504B4@.microsoft.com...
> Does your connection string specify both the principal and the mirror? If
> not, failover will work, but startup when the principal is down will not.
> See:
> System.Data.SqlConnection.ConnectionString Property
> Failover Partner
> N/A
> The name of the failover partner server where database mirroring is
> configured.
> The Failover Partner keyword is not supported by .NET Framework version 1.0
> or 1.1.
> [url]http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstri ng.aspx[/url]
>
> David
> This is the connection string set in the Global.asa:
Application("ConnectionString") = "Provider=sqloledb;Server=SQL1;Failover
Partner=SQL2;Initial Catalog=MainDB;UID=TestUser;Pwd=Test99"
Also, we're not using asp.net - just plain old ASP.
|||"BigSam" <BigSam@.discussions.microsoft.com> wrote in message
news:E89D67CA-4BA6-4A87-B053-F3F10BC1D3AC@.microsoft.com...
>
> "David Browne" wrote:
> Application("ConnectionString") = "Provider=sqloledb;Server=SQL1;Failover
> Partner=SQL2;Initial Catalog=MainDB;UID=TestUser;Pwd=Test99"
> Also, we're not using asp.net - just plain old ASP.
>
The OleDb provider you're using isn't mirroring-aware. The SQLNCLI the new
SqlServer Native Client provider, if it works correctly with your
application. See:
Using ADO with SQL Native Client
http://msdn2.microsoft.com/en-us/library/ms130978.aspx
If you stick with SQLOLEDB, then you can use DNS or BigIP to manually switch
the traffic between servers, or just change your config and boune the site.
David
|||Thanks for your reply.
Yesterday & was able to determine that without mirroring I could connect to
each server with the SQL login. However, with mirroring enabled I could only
connect to SQL1 with the SQL login. I began to suspect the SID & found this
article: http://support.microsoft.com/default.aspx/kb/918992/
"Magas" wrote:
[vbcol=seagreen]
> If you use SQL Server login to connect to the mirror database - make sure
> logins on both mirror servers have the same SID. The easiest way to do it -
> copy login from one server to another using SSIS package.
>
> "BigSam" wrote:
sql
Monday, March 12, 2012
Million records table
Hi everybody,
I set up a merge replication on Sql2K with one publisher/distributor
and 6 anonymous subscribers that run msde.
The db is growing bigger and bigger and i can't understand why.
I noticed that some of the MS_xxxxx tables are very large: in
particular one is 16.7 millions and another over 770K. Is there a way
to reduce/shrink these tables?
Thanks
Lorenzo
How many rows are being modified (inserted/updated/deleted) in the replicated
articles? I would expect this to be a similar order of magnitude to the
msmerge-contents, msmerge_tombstone tables. These tables will be
automatically cleared down during synchronization as part of the meta data
cleanup naturally run in merge by sp_mergemetadataretentioncleanup so
normally you don't need to do anything - the rows will be removed as they
reach the retention period defined in the publication.
HTH,
Paul Ibison
|||On 17 Mag, 17:32, Paul Ibison <Paul.Ibi...@.Pygmalion.Com> wrote:
> How many rows are being modified (inserted/updated/deleted) in the replicated
> articles? I would expect this to be a similar order of magnitude to the
> msmerge-contents, msmerge_tombstone tables. These tables will be
> automatically cleared down during synchronization as part of the meta data
> cleanup naturally run in merge by sp_mergemetadataretentioncleanup so
> normally you don't need to do anything - the rows will be removed as they
> reach the retention period defined in the publication.
> HTH,
> Paul Ibison
Hi Paul,
i don't know exactly haw many rows are being modified, but i can tell
you that the largest replicated table counts less than 130000 records
and i'm sure only a small part of these are changed/added/deleted
the msmerge_tombstone now counts almost 7 millions rows
i'm having some timeout troubles when i synchronize and i often get
the "can't enumerate changes" error
now i'm checking all my tables and indexes to see if some are missing
(the publication is partitioned with dynamic filtering)
thanks a lot for your help
lorenzo
|||Paul Ibison:
> I'd do a join between the msmerge_tombstone table and sysmergearticles. Make
> it a group by on article name and count the records per article then compare
> this to the rowcounts. It may be that there are other articles/publications
> contributing that you haven't accounted for, but even if not, this should
> clarify the situation a bit.
> HTH,
> Paul Ibison
that was a great idea, Paul
i found that there are over 5 million rows relating to a view that
returns 4800!
now i know what to investigate ;-)
I set up a merge replication on Sql2K with one publisher/distributor
and 6 anonymous subscribers that run msde.
The db is growing bigger and bigger and i can't understand why.
I noticed that some of the MS_xxxxx tables are very large: in
particular one is 16.7 millions and another over 770K. Is there a way
to reduce/shrink these tables?
Thanks
Lorenzo
How many rows are being modified (inserted/updated/deleted) in the replicated
articles? I would expect this to be a similar order of magnitude to the
msmerge-contents, msmerge_tombstone tables. These tables will be
automatically cleared down during synchronization as part of the meta data
cleanup naturally run in merge by sp_mergemetadataretentioncleanup so
normally you don't need to do anything - the rows will be removed as they
reach the retention period defined in the publication.
HTH,
Paul Ibison
|||On 17 Mag, 17:32, Paul Ibison <Paul.Ibi...@.Pygmalion.Com> wrote:
> How many rows are being modified (inserted/updated/deleted) in the replicated
> articles? I would expect this to be a similar order of magnitude to the
> msmerge-contents, msmerge_tombstone tables. These tables will be
> automatically cleared down during synchronization as part of the meta data
> cleanup naturally run in merge by sp_mergemetadataretentioncleanup so
> normally you don't need to do anything - the rows will be removed as they
> reach the retention period defined in the publication.
> HTH,
> Paul Ibison
Hi Paul,
i don't know exactly haw many rows are being modified, but i can tell
you that the largest replicated table counts less than 130000 records
and i'm sure only a small part of these are changed/added/deleted
the msmerge_tombstone now counts almost 7 millions rows
i'm having some timeout troubles when i synchronize and i often get
the "can't enumerate changes" error
now i'm checking all my tables and indexes to see if some are missing
(the publication is partitioned with dynamic filtering)
thanks a lot for your help
lorenzo
|||Paul Ibison:
> I'd do a join between the msmerge_tombstone table and sysmergearticles. Make
> it a group by on article name and count the records per article then compare
> this to the rowcounts. It may be that there are other articles/publications
> contributing that you haven't accounted for, but even if not, this should
> clarify the situation a bit.
> HTH,
> Paul Ibison
that was a great idea, Paul
i found that there are over 5 million rows relating to a view that
returns 4800!
now i know what to investigate ;-)
Subscribe to:
Posts (Atom)