I have servers in a merge scenario that replicate every ten minutes. When
changes occur, they need to replicate fairly quickly (within 30 minutes),
but changes may not occur in every hour.
I think it would be most efficient to run continuous rather than every 10
minutes. However, I would really like replication to not be running at all
outside of the 8am-5pm window. Is it possible to have continuous
replication, but only from 8am to 5pm? The SQL Enterprise Manager does not
seem to allow for it.
Rob Kraft
Sure. Add a job that runs at 8AM and again at 5PM. What does this job do?
It changes the schedule on the replication job.
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com
sql
Showing posts with label fairly. Show all posts
Showing posts with label fairly. Show all posts
Wednesday, March 28, 2012
Is it possible to mass update stats?
SQL Server 2000 on Win2k
I'm fairly new to SQL Server and I'm just wondering if it's possible to Update Statistice for all indexes somehow? I'm looking at the Update Statistics command and it doesn't seem to be possible.
The situation we have is a reporting DB that basically has all it's tables truncated and remade every night by some DTS jobs that import from another datasource and change the data and build some denormalzed tables etc.
Some of the large Insert operations go from taking 8 mins to taking several hours sometimes and updating the stats seems to fix the problem for a while. So I'd like to make sure the optimizer has all the latest stats for all tables.
Any other advice would be appreciated.
Cheers.EXECUTE sp_updatestats 'resample' (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ua-uz_14kz.asp)
-PatP|||Cool cheers ... From the help on that it doesn't seem like I can set the sample size.
From that I noticed links to sp_createstats so I might drop the stats and recreate them with a higher sample rate.
THANKS!
I'm fairly new to SQL Server and I'm just wondering if it's possible to Update Statistice for all indexes somehow? I'm looking at the Update Statistics command and it doesn't seem to be possible.
The situation we have is a reporting DB that basically has all it's tables truncated and remade every night by some DTS jobs that import from another datasource and change the data and build some denormalzed tables etc.
Some of the large Insert operations go from taking 8 mins to taking several hours sometimes and updating the stats seems to fix the problem for a while. So I'd like to make sure the optimizer has all the latest stats for all tables.
Any other advice would be appreciated.
Cheers.EXECUTE sp_updatestats 'resample' (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ua-uz_14kz.asp)
-PatP|||Cool cheers ... From the help on that it doesn't seem like I can set the sample size.
From that I noticed links to sp_createstats so I might drop the stats and recreate them with a higher sample rate.
THANKS!
Monday, March 26, 2012
Is it possible to have a matrix row footer?
I have a fairly standard matrix on my report, that looks like this when it
renders (I'm simplifying somewhat to get the idea across):
Account Jan Feb Mar Apr May ..... Dec
Total
Office Supplies 100 150 200 50 100 100
1900
...
Obviously "Account" the the row group, and "Month" is the column group.
This works just fine.
What I'd like to have is have a column AFTER the Total column, that lists
some comments about the account (tied to the Account row group). For
example:
Account Jan Feb Mar Apr May ..... Dec
Total Account comments
Office Supplies 100 150 200 50 100 100
1900 Increased by 5% due to switch to new supplier
I can't figure out how to do this...can someone help?
Thanks,
C17Hi C17,
I understand that you would like to know if you can have a row footer in
the matrix of your report.
If I have misunderstood, please let me know.
I do not think that you can do this in a matrix report. You can only add
row group or column group in the existing matrix. Instead I recommend that
you modify your DataSet query text so that you can use a table for
implementing your requirements. You may refer to PIVOT statement so that
you can rotate the month values from one column to multiple columns.
You may refer to:
Using PIVOT and UNPIVOT
http://msdn2.microsoft.com/en-us/library/ms177410.aspx
Hope this helps. If you have any other questions or concerns, please feel
free to let me know.
Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@.microsoft.com.
===========================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================|||On Mar 21, 3:31=A0pm, "C17" <c...@.community.nospam> wrote:
> I have a fairly standard matrix on my report, that looks like this when it=
> renders (I'm simplifying somewhat to get the idea across):
> =A0 =A0 Account =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Jan =A0 =A0 =A0Feb =A0 =A0 ==A0Mar =A0 =A0 Apr =A0 =A0 May ..... Dec
> Total
> =A0 =A0 Office Supplies =A0 =A0 =A0100 =A0 =A0 150 =A0 =A0 =A0200 =A0 =A0 ==A0 50 =A0 =A0 =A0100 =A0 =A0 =A0 =A0100
> 1900
> =A0 =A0 ...
> Obviously "Account" the the row group, and "Month" is the column group.
> This works just fine.
> What I'd like to have is have a column AFTER the Total column, that lists
> some comments about the account (tied to the Account row group). =A0For
> example:
> =A0 =A0 Account =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Jan =A0 =A0 =A0Feb =A0 =A0 ==A0Mar =A0 =A0 Apr =A0 =A0 May ..... Dec
> Total =A0 =A0 =A0Account comments
> =A0 =A0 Office Supplies =A0 =A0 =A0100 =A0 =A0 150 =A0 =A0 =A0200 =A0 =A0 ==A0 50 =A0 =A0 =A0100 =A0 =A0 =A0 =A0100
> 1900 =A0 =A0 Increased by 5% due to switch to new supplier
> I can't figure out how to do this...can someone help?
> Thanks,
> C17
What I would do is take create a dataset that is a Union of your Data
+ Comments, differentiated by a Group field, then create a Matrix with
the Group field as a Column group, then conditionally hide the
SubTotal on the Comment group.
In english, make a data set that is:
DataType, Account, Month, Amount, Comment
'Amount', 'Office Supplies', #1/1/2007#, 100, Nothing
'Amount', 'Office Supplies', #2/1/2007#, 150, Nothing
'Comment', 'Office Supplies', #1/1/2007#, Nothing, 'Increased by 5%
due to switch to new supplier'
=2E..
The Matrix would be
Column Group1: =3DFields!DataType.Value, Sort Ascending
Column Group2: =3DFields!Month.Value, Sort Ascending
Turn on Column Subtotal2
Maybe add a conditional Hide if InScope(Group2) And Fields!
Group1.Value =3D 'Comment'
Row Group: Account
Details Expression: =3DIIF( First(Fields!DataType.Value) =3D 'Amount',
Sum( Fields!Amount.Value ), First( Fields!Comment.Value ) )
Since I'm not in a Dev environment at the moment, I can't test this,
but you may have to play with the data types to get things to work.
-- Scott
renders (I'm simplifying somewhat to get the idea across):
Account Jan Feb Mar Apr May ..... Dec
Total
Office Supplies 100 150 200 50 100 100
1900
...
Obviously "Account" the the row group, and "Month" is the column group.
This works just fine.
What I'd like to have is have a column AFTER the Total column, that lists
some comments about the account (tied to the Account row group). For
example:
Account Jan Feb Mar Apr May ..... Dec
Total Account comments
Office Supplies 100 150 200 50 100 100
1900 Increased by 5% due to switch to new supplier
I can't figure out how to do this...can someone help?
Thanks,
C17Hi C17,
I understand that you would like to know if you can have a row footer in
the matrix of your report.
If I have misunderstood, please let me know.
I do not think that you can do this in a matrix report. You can only add
row group or column group in the existing matrix. Instead I recommend that
you modify your DataSet query text so that you can use a table for
implementing your requirements. You may refer to PIVOT statement so that
you can rotate the month values from one column to multiple columns.
You may refer to:
Using PIVOT and UNPIVOT
http://msdn2.microsoft.com/en-us/library/ms177410.aspx
Hope this helps. If you have any other questions or concerns, please feel
free to let me know.
Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@.microsoft.com.
===========================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================|||On Mar 21, 3:31=A0pm, "C17" <c...@.community.nospam> wrote:
> I have a fairly standard matrix on my report, that looks like this when it=
> renders (I'm simplifying somewhat to get the idea across):
> =A0 =A0 Account =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Jan =A0 =A0 =A0Feb =A0 =A0 ==A0Mar =A0 =A0 Apr =A0 =A0 May ..... Dec
> Total
> =A0 =A0 Office Supplies =A0 =A0 =A0100 =A0 =A0 150 =A0 =A0 =A0200 =A0 =A0 ==A0 50 =A0 =A0 =A0100 =A0 =A0 =A0 =A0100
> 1900
> =A0 =A0 ...
> Obviously "Account" the the row group, and "Month" is the column group.
> This works just fine.
> What I'd like to have is have a column AFTER the Total column, that lists
> some comments about the account (tied to the Account row group). =A0For
> example:
> =A0 =A0 Account =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Jan =A0 =A0 =A0Feb =A0 =A0 ==A0Mar =A0 =A0 Apr =A0 =A0 May ..... Dec
> Total =A0 =A0 =A0Account comments
> =A0 =A0 Office Supplies =A0 =A0 =A0100 =A0 =A0 150 =A0 =A0 =A0200 =A0 =A0 ==A0 50 =A0 =A0 =A0100 =A0 =A0 =A0 =A0100
> 1900 =A0 =A0 Increased by 5% due to switch to new supplier
> I can't figure out how to do this...can someone help?
> Thanks,
> C17
What I would do is take create a dataset that is a Union of your Data
+ Comments, differentiated by a Group field, then create a Matrix with
the Group field as a Column group, then conditionally hide the
SubTotal on the Comment group.
In english, make a data set that is:
DataType, Account, Month, Amount, Comment
'Amount', 'Office Supplies', #1/1/2007#, 100, Nothing
'Amount', 'Office Supplies', #2/1/2007#, 150, Nothing
'Comment', 'Office Supplies', #1/1/2007#, Nothing, 'Increased by 5%
due to switch to new supplier'
=2E..
The Matrix would be
Column Group1: =3DFields!DataType.Value, Sort Ascending
Column Group2: =3DFields!Month.Value, Sort Ascending
Turn on Column Subtotal2
Maybe add a conditional Hide if InScope(Group2) And Fields!
Group1.Value =3D 'Comment'
Row Group: Account
Details Expression: =3DIIF( First(Fields!DataType.Value) =3D 'Amount',
Sum( Fields!Amount.Value ), First( Fields!Comment.Value ) )
Since I'm not in a Dev environment at the moment, I can't test this,
but you may have to play with the data types to get things to work.
-- Scott
Subscribe to:
Posts (Atom)