Showing posts with label certain. Show all posts
Showing posts with label certain. Show all posts

Friday, March 23, 2012

Forced failover taking too long ... am I missing something?

Hi all,

We have to support forced failover under certain scenarios. Whilst using 'ForceFailoverAndAllowDataLoss' work perfectly the database is not available for several minutes. The failover command returns very quickly, but the database enters a recovery/restore state and will not accept connections for up to 2 minutes.

Am I missing an additional step that would speed this up?

Many thanks,

Nick

Hi Nick,

When you force failover, the mirror database first redoes whatever outstanding log it has received from the principal and then restarts the database so it goes through normal crash recovery.

You can monitor the duration of the first phase by looking at the "Redo Queue KB" and the "Redo Bytes/sec" performance counters - the DBM redo is running as long as the redo queue is non-zero. Then, for the second phase there should be entries in the errorlog saying when crash recovery started, what it's doing - redo or undo and when it has completed.

Hope this helps.

Cheers,

Kaloian.

|||Also can you see anything such as warning or error on the SQL Server error log.ssql

Monday, March 19, 2012

Force Invalidate Snapshot???

I am sorry to post about this again, but I can't put my finger on what is wrong.
When we upgraded our ERP to a new version, I am almost certain that I setup Transactional Replication the exact same way....
I did the following to drop an article from a publication:
sp_dropsubscription
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.subscriber = 'SQL-05'
go
sp_droparticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.force_invalidate_snapshot = 1 (I HAVE TO DO THIS OR IT WON'T DROP THE ARTICLE & I Don't know why, it didn't used to be this way.....)
go
sp_refreshsubscriptions 'ReportsPUBL'
go
I made my change to the en_csrep_tbl_usr & did the following;
/* Add the Article back */
sp_addarticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.source_table = 'en_csrep_tbl_usr'
go
When I start the Snapshot agent it is doing a snapshot of everything & not just the one table!!!!
Anonymous Subscriptions are NOT allowed.
Can you tell me where to look or why it is making me do the @.force_invalidate_snapshot = 1 now?
thanx!
JUDE
Actually the one difference is that the subscriber is doing a PULL now as opposed to the Publisher doing a PUSH as it was setup in the past.
JUDE
"Jude" <judes@.email.uophx.edu> wrote in message news:ec29Ryv7GHA.4288@.TK2MSFTNGP02.phx.gbl...
I am sorry to post about this again, but I can't put my finger on what is wrong.
When we upgraded our ERP to a new version, I am almost certain that I setup Transactional Replication the exact same way....
I did the following to drop an article from a publication:
sp_dropsubscription
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.subscriber = 'SQL-05'
go
sp_droparticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.force_invalidate_snapshot = 1 (I HAVE TO DO THIS OR IT WON'T DROP THE ARTICLE & I Don't know why, it didn't used to be this way.....)
go
sp_refreshsubscriptions 'ReportsPUBL'
go
I made my change to the en_csrep_tbl_usr & did the following;
/* Add the Article back */
sp_addarticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.source_table = 'en_csrep_tbl_usr'
go
When I start the Snapshot agent it is doing a snapshot of everything & not just the one table!!!!
Anonymous Subscriptions are NOT allowed.
Can you tell me where to look or why it is making me do the @.force_invalidate_snapshot = 1 now?
thanx!
JUDE
|||Does this difference explain the problem?
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's positions, strategies or opinions.
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
"Jude" <judes@.email.uophx.edu> wrote in message news:enUr06v7GHA.4708@.TK2MSFTNGP05.phx.gbl...
Actually the one difference is that the subscriber is doing a PULL now as opposed to the Publisher doing a PUSH as it was setup in the past.
JUDE
"Jude" <judes@.email.uophx.edu> wrote in message news:ec29Ryv7GHA.4288@.TK2MSFTNGP02.phx.gbl...
I am sorry to post about this again, but I can't put my finger on what is wrong.
When we upgraded our ERP to a new version, I am almost certain that I setup Transactional Replication the exact same way....
I did the following to drop an article from a publication:
sp_dropsubscription
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.subscriber = 'SQL-05'
go
sp_droparticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.force_invalidate_snapshot = 1 (I HAVE TO DO THIS OR IT WON'T DROP THE ARTICLE & I Don't know why, it didn't used to be this way.....)
go
sp_refreshsubscriptions 'ReportsPUBL'
go
I made my change to the en_csrep_tbl_usr & did the following;
/* Add the Article back */
sp_addarticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.source_table = 'en_csrep_tbl_usr'
go
When I start the Snapshot agent it is doing a snapshot of everything & not just the one table!!!!
Anonymous Subscriptions are NOT allowed.
Can you tell me where to look or why it is making me do the @.force_invalidate_snapshot = 1 now?
thanx!
JUDE
|||No, should it? Should I change it to a PUSH & I won't have this issue any longer?
JUDE
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message news:u4Lb1ry7GHA.4552@.TK2MSFTNGP05.phx.gbl...
Does this difference explain the problem?
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's positions, strategies or opinions.
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
"Jude" <judes@.email.uophx.edu> wrote in message news:enUr06v7GHA.4708@.TK2MSFTNGP05.phx.gbl...
Actually the one difference is that the subscriber is doing a PULL now as opposed to the Publisher doing a PUSH as it was setup in the past.
JUDE
"Jude" <judes@.email.uophx.edu> wrote in message news:ec29Ryv7GHA.4288@.TK2MSFTNGP02.phx.gbl...
I am sorry to post about this again, but I can't put my finger on what is wrong.
When we upgraded our ERP to a new version, I am almost certain that I setup Transactional Replication the exact same way....
I did the following to drop an article from a publication:
sp_dropsubscription
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.subscriber = 'SQL-05'
go
sp_droparticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.force_invalidate_snapshot = 1 (I HAVE TO DO THIS OR IT WON'T DROP THE ARTICLE & I Don't know why, it didn't used to be this way.....)
go
sp_refreshsubscriptions 'ReportsPUBL'
go
I made my change to the en_csrep_tbl_usr & did the following;
/* Add the Article back */
sp_addarticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.source_table = 'en_csrep_tbl_usr'
go
When I start the Snapshot agent it is doing a snapshot of everything & not just the one table!!!!
Anonymous Subscriptions are NOT allowed.
Can you tell me where to look or why it is making me do the @.force_invalidate_snapshot = 1 now?
thanx!
JUDE
|||It shouldn't matter, but I thought you were implying it did.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's positions, strategies or opinions.
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
"Jude" <judes@.email.uophx.edu> wrote in message news:OPbRK4M8GHA.3280@.TK2MSFTNGP02.phx.gbl...
No, should it? Should I change it to a PUSH & I won't have this issue any longer?
JUDE
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message news:u4Lb1ry7GHA.4552@.TK2MSFTNGP05.phx.gbl...
Does this difference explain the problem?
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's positions, strategies or opinions.
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
"Jude" <judes@.email.uophx.edu> wrote in message news:enUr06v7GHA.4708@.TK2MSFTNGP05.phx.gbl...
Actually the one difference is that the subscriber is doing a PULL now as opposed to the Publisher doing a PUSH as it was setup in the past.
JUDE
"Jude" <judes@.email.uophx.edu> wrote in message news:ec29Ryv7GHA.4288@.TK2MSFTNGP02.phx.gbl...
I am sorry to post about this again, but I can't put my finger on what is wrong.
When we upgraded our ERP to a new version, I am almost certain that I setup Transactional Replication the exact same way....
I did the following to drop an article from a publication:
sp_dropsubscription
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.subscriber = 'SQL-05'
go
sp_droparticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.force_invalidate_snapshot = 1 (I HAVE TO DO THIS OR IT WON'T DROP THE ARTICLE & I Don't know why, it didn't used to be this way.....)
go
sp_refreshsubscriptions 'ReportsPUBL'
go
I made my change to the en_csrep_tbl_usr & did the following;
/* Add the Article back */
sp_addarticle
@.publication = 'ReportsPUBL'
, @.article = 'en_csrep_tbl_usr'
, @.source_table = 'en_csrep_tbl_usr'
go
When I start the Snapshot agent it is doing a snapshot of everything & not just the one table!!!!
Anonymous Subscriptions are NOT allowed.
Can you tell me where to look or why it is making me do the @.force_invalidate_snapshot = 1 now?
thanx!
JUDE

Wednesday, March 7, 2012

FOR XML AUTO returns incomplete xml

I have two SQL tables that are populated based on data in SQL system tables.
When I run the FOR XML AUTO select statement on these tables, certain fields
will be missing end tags AND the data will not all be returned. In some
cases the end tags are there but the data is incomplete. When running the
query against the actual system table I'll get similar results but not
exactly the same. Any suggestions?
Using sql 2000 sp3. SQLXML 3 sp2
--master..sysaltfiles table data. Return only a few db's and an incomplete
select rtrim(filename) filename from mridiag..tbldbfiles for xml auto
<mridiag..tbldbfiles filename="C:\Program Files\Microsoft SQL
Server\MSSQL$CLIENT\data\Dont-Do-This_Data.MDF"/>
<mridiag..tbldbfiles filename="C:\Program Files\Microsoft SQL
Server\MSSQL$CLIENT\data\Dont-Do-This_Log.LDF"/>
<mridiag..tbldbfiles filename="C:\Program Files\Microsoft SQL
Server\MSSQL$CLIENT\data\master.mdf
NT\data\pubs_log.ldf
(24 row(s) affected)
--master..sysprocesses table. Only returns 1 incomplete record
select LASTWAITTYPE test from master..sysprocesses for xml auto
<master..sysprocesses test="SLEEP
(15 row(s) affected)
"TMcC" <TMcC@.discussions.microsoft.com> wrote in message
news:B6CB3F5F-9790-4D97-9FB7-660DC8A8981E@.microsoft.com...
>I have two SQL tables that are populated based on data in SQL system
>tables.
> When I run the FOR XML AUTO select statement on these tables, certain
> fields
> will be missing end tags AND the data will not all be returned. In some
> cases the end tags are there but the data is incomplete. When running the
> query against the actual system table I'll get similar results but not
> exactly the same. Any suggestions?
What client are you using to retrieve the results?
You might also check this FAQ:
http://sqlxml.org/faqs.aspx?faq=76
Bryant
|||Thanks for the response.
I reviewed the link to the FAQ and compared it to how I'm doing it. First,
the information I posted was using Query Analyzer but I get the same results
when executing it from my vb script.
I am using SQLOLEDB provider and strems. I'm using VB Script not VB. The
link I based my code on is below. It's basically the same as the "VB
Example" on the faq you pointed me to but the version of XML on the FAQ is
3.0 and the version used in my script is 4.0. Other than that, I can't see
any differences.
Any more suggestions or questions? It really has me puzzled.
Thanks again.
"Bryant Likes" wrote:

> "TMcC" <TMcC@.discussions.microsoft.com> wrote in message
> news:B6CB3F5F-9790-4D97-9FB7-660DC8A8981E@.microsoft.com...
> What client are you using to retrieve the results?
> You might also check this FAQ:
> http://sqlxml.org/faqs.aspx?faq=76
> --
> Bryant
>
>
|||Here is the link I mentioned.
http://www.sqlxml.org/faqs.aspx?faq=10
"Bryant Likes" wrote:

> "TMcC" <TMcC@.discussions.microsoft.com> wrote in message
> news:B6CB3F5F-9790-4D97-9FB7-660DC8A8981E@.microsoft.com...
> What client are you using to retrieve the results?
> You might also check this FAQ:
> http://sqlxml.org/faqs.aspx?faq=76
> --
> Bryant
>
>
|||The query analyzer is using ODBC and not the OLEDB stream object and thus
only get junked XML back. Also, unless you increase the number of bytes
displayed per line, it does drop information.
If you are using the SQLOLEDB stream interface, you should get the XML back.
Can you try it with the SQLXML HTTP component to see if the XML is correctly
generated by the FOR XML query?
Thanks
Michael
"TMcC" <TMcC@.discussions.microsoft.com> wrote in message
news:9679959F-BC15-48CC-B4F9-7B521D883DCC@.microsoft.com...[vbcol=seagreen]
> Thanks for the response.
> I reviewed the link to the FAQ and compared it to how I'm doing it.
> First,
> the information I posted was using Query Analyzer but I get the same
> results
> when executing it from my vb script.
> I am using SQLOLEDB provider and strems. I'm using VB Script not VB. The
> link I based my code on is below. It's basically the same as the "VB
> Example" on the faq you pointed me to but the version of XML on the FAQ is
> 3.0 and the version used in my script is 4.0. Other than that, I can't
> see
> any differences.
> Any more suggestions or questions? It really has me puzzled.
> Thanks again.
> "Bryant Likes" wrote: