Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Friday, March 30, 2012

Layout problem

Layout problem -
I've created a report with the wizard and it looks fine.
It have a TITLE, a few SUB TITLES (all are textbox with values) and a textbox with JUMP TO link that use as a back button. beneath is a table.
Whan I run ut it look fine (In the first page there is the header and underneath there is the table) but I've noticed that whan the report have more then one page, all of my header (e.g. TITLE,SUBTITLE,BUTTON) is not showen in the second page and above and only the table is.
I've tried to move the title to the header part but it give me an error the the value of the textbox in the header refers to a field and field can't be use in a page header.
Can anybody help me with the title part to make it visible in all pages?
Thank alot in advance,
Roy.
From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comIf you click on the header in the designer and then look at the properties
there is a property that is PrintOnFirstPage. This defaults to True, I think
if you set this to False the report will behave the way you want.
Stuart
"roy mm" wrote:
> Layout problem -
> I've created a report with the wizard and it looks fine.
> It have a TITLE, a few SUB TITLES (all are textbox with values) and a textbox with JUMP TO link that use as a back button. beneath is a table.
> Whan I run ut it look fine (In the first page there is the header and underneath there is the table) but I've noticed that whan the report have more then one page, all of my header (e.g. TITLE,SUBTITLE,BUTTON) is not showen in the second page and above and only the table is.
> I've tried to move the title to the header part but it give me an error the the value of the textbox in the header refers to a field and field can't be use in a page header.
> Can anybody help me with the title part to make it visible in all pages?
> Thank alot in advance,
> Roy.
>
> From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
>

Layout problem

Layout problem -
I've created a report with the wizard and it looks fine.
It have a TITLE, a few SUB TITLES (all are textbox with values) and a textbox with JUMP TO link that use as a back button. beneath is a table.

Whan I run ut it look fine (In the first page there is the header and underneath there is the table) but I've noticed that whan the report have more then one page, all of my header (e.g. TITLE,SUBTITLE,BUTTON) is not showen in the second page and above and only the table is.

I've tried to move the title to the header part but it give me an error the the value of the textbox in the header refers to a field and field can't be use in a page header.

Can anybody help me with the title part to make it visible in all pages?

Thank alot in advance,
Roy.Are you using a true page header or just a couple of test fields at the top of the page. Click the Report menu and see if you have a Page Header selected.

Layout problem

Layout problem -
I've created a report with the wizard and it looks fine.
It have a TITLE, a few SUB TITLES (all are textbox with values) and a textbox with JUMP TO link that use as a back button. beneath is a table.

Whan I run ut it look fine (In the first page there is the header and underneath there is the table) but I've noticed that whan the report have more then one page, all of my header (e.g. TITLE,SUBTITLE,BUTTON) is not showen in the second page and above and only the table is.

I've tried to move the title to the header part but it give me an error the the value of the textbox in the header refers to a field and field can't be use in a page header.

Can anybody help me with the title part to make it visible in all pages?

Thank alot in advance,
Roy.

Firstly, there is no way to specify that an item should appear on all pages.

However, you do have a few options:

Can you change the textbox contents so it doesn't refrence a field but a parameter instead?|||Hi.
1) the first solution is no good since i can't (I'm getting one value as parameter and need to get his match value from the db)
2) I didn't quit get that part, can you please explain me again?
3) ok, this look like a solution, but it realy not that nice.
To make the header look like he is now i'll need a table with only header for my first header line and another tabke with just a header a 5 cells for each value i want to show.
meanwhile it look like the only solution i have.

I wrote to myself your comment about the display in the exporting! Its importent.

Thank,
Roy.|||

A list control allows you to define grouping in your data. It also has the option of adding a page break before/after each group. For export to Excel this forces each group onto a separate tab.

If you drop a table or matrix into a list control then you can control how the data is groupped and hence paged by setting the attibutes of the list control.

So as an example imagine I have a query with 5 fields (or dimensions) country, sales person, month, product and sales amount. My target audience aim to export to Excel. I can configure the report so that in excel it will end up having a tab per country, on each tab have a grid per sales person and in the grid have month and product on the rows and columns. This can be achieved using a matrix nested inside 2 list controls. List 1 groupped by country with a page break, list 2 groupped by sales person with no page break and the other 2 fileds in the matrix.

The point is, you can then include textboxes within the lists and they will repeat in a similar fassion.

Once again, paging in the web will potentially break certain pages up further if they are too long. 400 pages in the web doesn't mean there will be 400 tabs in Excel.

|||

Thanks heaps ! this post did help me with finding a solution for another problem of exporting data to multiple worksheets in Excel.

Nadeem

Layout problem

Layout problem -
I've created a report with the wizard and it looks fine.
It have a TITLE, a few SUB TITLES (all are textbox with values) and a textbox with JUMP TO link that use as a back button. beneath is a table.

Whan I run ut it look fine (In the first page there is the header and underneath there is the table) but I've noticed that whan the report have more then one page, all of my header (e.g. TITLE,SUBTITLE,BUTTON) is not showen in the second page and above and only the table is.

I've tried to move the title to the header part but it give me an error the the value of the textbox in the header refers to a field and field can't be use in a page header.

Can anybody help me with the title part to make it visible in all pages?

Thank alot in advance,
Roy.

Firstly, there is no way to specify that an item should appear on all pages.

However, you do have a few options:

Can you change the textbox contents so it doesn't refrence a field but a parameter instead?|||Hi.
1) the first solution is no good since i can't (I'm getting one value as parameter and need to get his match value from the db)
2) I didn't quit get that part, can you please explain me again?
3) ok, this look like a solution, but it realy not that nice.
To make the header look like he is now i'll need a table with only header for my first header line and another tabke with just a header a 5 cells for each value i want to show.
meanwhile it look like the only solution i have.

I wrote to myself your comment about the display in the exporting! Its importent.

Thank,
Roy.|||

A list control allows you to define grouping in your data. It also has the option of adding a page break before/after each group. For export to Excel this forces each group onto a separate tab.

If you drop a table or matrix into a list control then you can control how the data is groupped and hence paged by setting the attibutes of the list control.

So as an example imagine I have a query with 5 fields (or dimensions) country, sales person, month, product and sales amount. My target audience aim to export to Excel. I can configure the report so that in excel it will end up having a tab per country, on each tab have a grid per sales person and in the grid have month and product on the rows and columns. This can be achieved using a matrix nested inside 2 list controls. List 1 groupped by country with a page break, list 2 groupped by sales person with no page break and the other 2 fileds in the matrix.

The point is, you can then include textboxes within the lists and they will repeat in a similar fassion.

Once again, paging in the web will potentially break certain pages up further if they are too long. 400 pages in the web doesn't mean there will be 400 tabs in Excel.

|||

Thanks heaps ! this post did help me with finding a solution for another problem of exporting data to multiple worksheets in Excel.

Nadeem

sql

Layout incorrect when using ReportViewer

Please can someone help me with this.

I have created a very simple SQL report which has a title, Image, 3 subtitles and some data fields.

When I view it is my VS designer and preview it looks perfect, however when I deploy and view the the report through my ReportViewer control all the labels get moved around and the entire thing is a mess.

If I then export it to PDF it looks perfect again... I am sure I am missing something obvious but I can't find it.

I have done absolutely no expression formatting or coding at all. It's a plain SQL query and plain result textboxes.

Could be that something is overlapping in your report. Make sure that none of the components or fields are overlapping even slightly with each other. Overlapping items usually do not get rendered correctly when viewed on HTML.

-Aayush

|||

Aayush Goyal wrote:

Could be that something is overlapping in your report. Make sure that none of the components or fields are overlapping even slightly with each other. Overlapping items usually do not get rendered correctly when viewed on HTML.

-Aayush

It actually turned out to be a combination of two things, I had some overlapping but it still failed after I fixed that. I then checked it in IE and it worked this time.

Now I need to find out why it is not working in Firefox?

Launch Subscription via VB Code

I have created a subscription via Report Manager & would like to launch it
via vb code or rs script on any given date or time. That is, even though the
subcription may have a set date/time, via CODe I would launch it & modified
its date & time as necessary.
--
EdgarNot particularly elegant, but you can do this in the following way:
1) create a shared schedule that fires once, in the past. Save the Schedule
ID you get back
2) create a subscription that is triggered by this shared schedule.
3) use some code to call the FireEvent method and submit the
TimedSubscription event as the EventType and the schedule ID from (1) as the
MatchData.
-Lukasz
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"mresanchez" <mresanchez@.donot-spam.com> wrote in message
news:045CCA4A-B712-489D-8609-068642154128@.microsoft.com...
>I have created a subscription via Report Manager & would like to launch it
> via vb code or rs script on any given date or time. That is, even though
> the
> subcription may have a set date/time, via CODe I would launch it &
> modified
> its date & time as necessary.
> --
> Edgar|||Lukasz,
I tried your solution & everything works fine except that I get an error
saying that the subscription cannot be found. Even though the subscription
ID is listed within SQL Server. Below is the output I get with the error. I
also Echo the subscription ID & the line so I can see the ID which later I
find in the subscriptions table in SQL Svr. Is there a particular way to
format the subscriptionID in order for RS to see it?
The Current Subscription is: 0d49d301-ecd8-43fc-8319-21ec19e82f77
==========================================System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: The subsc
ription cannot be found. The subscription identifier that is provided to an
operation cannot be located in the report server database. -->
Microsoft.ReportingServices.Diagnostics.Utilities.Subscrip
tionNotFoundException: The subscription cannot be found. The subscription
identifier that is provid
ed to an operation cannot be located in the report server database.
-- End of inner exception stack trace --
at
Microsoft.ReportingServices.WebServer.ReportingService.GetSubscriptionProperties(String Subsc
riptionID, String& Owner, ExtensionSettings& ExtensionSettings, String&
Description, ActiveState& A
ctive, String& Status, String& EventType, String& MatchData,
ParameterValue[]& Parameters)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message,
WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] param
eters)
at
Microsoft.SqlServer.ReportingServices.ReportingService.GetSubscriptionProperties(String Subsc
riptionID, ExtensionSettings& ExtensionSettings, String& Description,
ActiveState& Active, String&
Status, String& EventType, String& MatchData, ParameterValue[]& Parameters)
at ____ScriptClass.Main()
The command completed successfullysql

Wednesday, March 28, 2012

Latest updated date of a Stored Procedure

How to get the last updated date of a Stored procedure... From the sysobjects, we are able to get the created date... but how to get the latest updated date...?
Tx
Gkhttp://www.dbforums.com/archives/t317417.html

Monday, March 19, 2012

Last Modified to Store Procedure

Hello everyone,

I have store procedure that was created on 9/15/2005. It went through some modificiations since then. How can I find out when was the last updated or last two update on this object?

Thanks

select modify_date from sys.objects

where name = '<object_name>'

Thanks

|||

Thanks Zoya.

It workout perfectly

Tom

Monday, March 12, 2012

Last Date Stored Proc Updated??

Is there such a date/time?

I see the Created date on the list of stored procs, but really want a
Date Last Updated. After changing code for 3 hours, I tend to forget
which procs I've worked on, and which need to be move to production.
any simple way to keep track of the last procs played with?

thanks in advance...
john@.ViridianTech.comDo you mean you've used ALTER PROC and you want to see when it was
ALTERed? If so, then this isn't currently possible in MSSQL (although
it is in SQL 2005).

In any case, you should hopefully be using some sort of source control
system to store your object creation scripts, and a deployment process
which would help to track your changes. You might also want to consider
a database comparison tool, which can quickly show you the differences
between databases.

Simon|||Actually, we're not using any source control on the stored procs, like
we do on the project source code. How would you do that? is there
something in MSSQL for that? the .NWT IDE for VB make it easy to
integrate with Source Safe, what do you use for stored procs, views and
table creation scripts? You advice would be much appreciated.

john|||<John@.ViridianTech.com> wrote in message
news:1120484863.856415.206040@.o13g2000cwo.googlegr oups.com...
> Actually, we're not using any source control on the stored procs, like
> we do on the project source code. How would you do that? is there
> something in MSSQL for that? the .NWT IDE for VB make it easy to
> integrate with Source Safe, what do you use for stored procs, views and
> table creation scripts? You advice would be much appreciated.
> john

Personally, I simply check code out of VSS and work with it in Query
Analyzer - there's no source control integration in the MSSQL tools
themselves. I believe Visual Studio has some sort of support for SQL code
and VSS, although I don't use VS often myself, so I may be wrong about that.

Even using just QA and VSS, a few scripts can make things easier - the
Customize menu in QA allows you to pass a few useful parameters to batch
files or other programs, so it's not too difficult to script checking in and
out of VSS (SQL 2005 has source control integration in the Management
Studio).

Erland has an interesting toolset for working with SQL source code and VSS,
written in Perl, which might be worth looking at if you want to develop your
own solution or just need some ideas about managing and deploying SQL code:

http://www.abaris.se/abaperls/index.html

Simon|||(John@.ViridianTech.com) writes:
> Actually, we're not using any source control on the stored procs, like
> we do on the project source code. How would you do that?

You just do it!

> is there something in MSSQL for that? the .NWT IDE for VB make it easy
> to integrate with Source Safe,

Hrmpf! Nothing in Visual Studio is easy. (I understand less and less of
it for each new version they come out with.) And in our shop, you may
use the SourceSafe integration for the VB code, but if you mess up,
our build people will tell you to stop doing it.

The absolutely best too to work with SourceSafe is the VSS Explorer.

> what do you use for stored procs, views and
> table creation scripts? You advice would be much appreciated.

Actually, we don't even use QA for editing, but use Textpad instead,
simply because it's a better editor.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||If you're not going to have access to a source control tool or
methodology any time soon, here's a workaround; but there's nothing
foo-proof about this, so you still have to be careful:

Just drop and create your stored procedures instead of altering them.
This modifies the crdate in sysobjects, which is reflected in
Enterprise Manager.

drop procedure proc_mytest
go

create procedure proc_mytest
as
< whatever
hth,

victor dileo|||vjdileo (vic_technews@.yahoo.com) writes:
> If you're not going to have access to a source control tool or
> methodology any time soon, here's a workaround; but there's nothing
> foo-proof about this, so you still have to be careful:
> Just drop and create your stored procedures instead of altering them.
> This modifies the crdate in sysobjects, which is reflected in
> Enterprise Manager.

And there is actually a way of detecting that a procedure have
been altered. sysobjects.schema_ver is incremented with 16 each
you alter the procedure.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Guys, there really is a great way of working with your SQL code in just
the same way as you do for your application code and it's called DB
Ghost (www.dbghost.com). It's the ONLY SQL Server tool on the market
that can build a brand new database from a set of object creation
scripts taking care of all dependencies. This database is then used by
D Ghost to compare and upgrade any target database.

The upshot of our approach is that you have ALL database objects as
'create' scripts under source control and just modify those. You work
in a familiar manner and the source control system becomes your friend
rather than a necessary evil. Most other approaches to having SQL in
source control involve having to do two things for each update:
1. Update the create script.
2. Write an ALTER script.

DB Ghost does away with the second of these not just for stored
procedures but for EVERY database object.

Honestly, you may think this approach cannot work but it does and our
customers use phrases like 'religious experience' when they talk about
it. You just have to take the time to 'get' it...|||We just do a generate sql script for all procs (separate file for each)
and add them to a source safe project and use that through visual
studio. Pretty easy and works great. If you make the project a database
project in visual studio it will let you execute them from there as
well.

Friday, February 24, 2012

Large selection in multiple parameters

I have a problem and was wondering if someone might have some good
suggestions. I've created a report that shows the number of loans that
have been given to students at various colleges by various vendors.
The report has parameters for vendor and for college, and I created the
parameters as multi-value drop down boxes. The source for the schools
box is a query against my data table for the distinct Schools that
appear.
The problem I'm having is this: There are approximately 4000 schools
in the table, and when the user does a Select All on the web site, the
report chugs away for a while and then returns nothing. It works fine
in Visual Studio (slowly, but it returns everything) but not on the
website. I don't get any error messages.
The WHERE clause in my main script is simply:
Where SchoolName in (@.schoolName)
My guess is that there are simply too much being shoved into the
parameter when I try to select all. Just wondering if anyone has a
reasonable way to get around this. I've managed a rather kludgy method
where I have an additional boolean parameter and then logic to bypass
the WHERE if it's true, but I'd rather just have the thing work
normally (via the drop-down) if that's possible.
The drop down for the Vendors works just fine, whether I select one,
many, or all of the vendors. But there are only 30 of those, so the
cause seems to be the number of choices. Is there a set limit to the
number of choices in a drop down, or a set size that can be passed
perhaps?
Using Reporting Services 2005.How about doing a bit of processing before the query gets run. Something
along the lines of
IIF parameter!School.Item(0) = true, select data regardless of school (no
whereclause on Schoolname) else select data with whereclause.
I'm not quite sure how to check if the Select All parameter was selected or
not, but it might be food for thought anyway.
Kaisa M. Lindahl Lervik
<cphite@.gmail.com> wrote in message
news:1162419349.183710.148290@.h48g2000cwc.googlegroups.com...
>I have a problem and was wondering if someone might have some good
> suggestions. I've created a report that shows the number of loans that
> have been given to students at various colleges by various vendors.
> The report has parameters for vendor and for college, and I created the
> parameters as multi-value drop down boxes. The source for the schools
> box is a query against my data table for the distinct Schools that
> appear.
> The problem I'm having is this: There are approximately 4000 schools
> in the table, and when the user does a Select All on the web site, the
> report chugs away for a while and then returns nothing. It works fine
> in Visual Studio (slowly, but it returns everything) but not on the
> website. I don't get any error messages.
> The WHERE clause in my main script is simply:
> Where SchoolName in (@.schoolName)
> My guess is that there are simply too much being shoved into the
> parameter when I try to select all. Just wondering if anyone has a
> reasonable way to get around this. I've managed a rather kludgy method
> where I have an additional boolean parameter and then logic to bypass
> the WHERE if it's true, but I'd rather just have the thing work
> normally (via the drop-down) if that's possible.
> The drop down for the Vendors works just fine, whether I select one,
> many, or all of the vendors. But there are only 30 of those, so the
> cause seems to be the number of choices. Is there a set limit to the
> number of choices in a drop down, or a set size that can be passed
> perhaps?
> Using Reporting Services 2005.
>|||What I have done in the case is as follows. I found this function
CREATE FUNCTION [dbo].[fn_MVParam](@.RepParam nvarchar(max), @.Delim char(1)=',')
RETURNS @.VALUES TABLE (Param nvarchar(max))AS
BEGIN
DECLARE @.chrind INT
DECLARE @.Piece nvarchar(max)
SELECT @.chrind = 1
WHILE @.chrind > 0
BEGIN
SELECT @.chrind = CHARINDEX(@.Delim,@.RepParam)
IF @.chrind > 0
SELECT @.Piece = LEFT(@.RepParam,@.chrind - 1)
ELSE
SELECT @.Piece = @.RepParam
INSERT @.VALUES(Param) VALUES(@.Piece)
SELECT @.RepParam = RIGHT(@.RepParam,LEN(@.RepParam) - @.chrind)
IF LEN(@.RepParam) = 0 BREAK
END
RETURN
END
This will break the comma separated string passed into your stored proc into
a table. Thow the results of this function into a temp table, and filter you
results with a join, instead of an in.
Ken
"Kaisa M. Lindahl Lervik" wrote:
> How about doing a bit of processing before the query gets run. Something
> along the lines of
> IIF parameter!School.Item(0) = true, select data regardless of school (no
> whereclause on Schoolname) else select data with whereclause.
> I'm not quite sure how to check if the Select All parameter was selected or
> not, but it might be food for thought anyway.
> Kaisa M. Lindahl Lervik
> <cphite@.gmail.com> wrote in message
> news:1162419349.183710.148290@.h48g2000cwc.googlegroups.com...
> >I have a problem and was wondering if someone might have some good
> > suggestions. I've created a report that shows the number of loans that
> > have been given to students at various colleges by various vendors.
> > The report has parameters for vendor and for college, and I created the
> > parameters as multi-value drop down boxes. The source for the schools
> > box is a query against my data table for the distinct Schools that
> > appear.
> >
> > The problem I'm having is this: There are approximately 4000 schools
> > in the table, and when the user does a Select All on the web site, the
> > report chugs away for a while and then returns nothing. It works fine
> > in Visual Studio (slowly, but it returns everything) but not on the
> > website. I don't get any error messages.
> >
> > The WHERE clause in my main script is simply:
> > Where SchoolName in (@.schoolName)
> >
> > My guess is that there are simply too much being shoved into the
> > parameter when I try to select all. Just wondering if anyone has a
> > reasonable way to get around this. I've managed a rather kludgy method
> > where I have an additional boolean parameter and then logic to bypass
> > the WHERE if it's true, but I'd rather just have the thing work
> > normally (via the drop-down) if that's possible.
> >
> > The drop down for the Vendors works just fine, whether I select one,
> > many, or all of the vendors. But there are only 30 of those, so the
> > cause seems to be the number of choices. Is there a set limit to the
> > number of choices in a drop down, or a set size that can be passed
> > perhaps?
> >
> > Using Reporting Services 2005.
> >
>
>|||Ken Reitmeyer wrote:
> What I have done in the case is as follows. I found this function
> CREATE FUNCTION [dbo].[fn_MVParam](@.RepParam nvarchar(max), @.Delim char(1)=> ',')
> RETURNS @.VALUES TABLE (Param nvarchar(max))AS
> BEGIN
> DECLARE @.chrind INT
> DECLARE @.Piece nvarchar(max)
> SELECT @.chrind = 1
> WHILE @.chrind > 0
> BEGIN
> SELECT @.chrind = CHARINDEX(@.Delim,@.RepParam)
> IF @.chrind > 0
> SELECT @.Piece = LEFT(@.RepParam,@.chrind - 1)
> ELSE
> SELECT @.Piece = @.RepParam
> INSERT @.VALUES(Param) VALUES(@.Piece)
> SELECT @.RepParam = RIGHT(@.RepParam,LEN(@.RepParam) - @.chrind)
> IF LEN(@.RepParam) = 0 BREAK
> END
> RETURN
> END
> This will break the comma separated string passed into your stored proc into
> a table. Thow the results of this function into a temp table, and filter you
> results with a join, instead of an in.
Ken,
When I use this function it works for one selection, but when I select
more than one school it tells me I have too many parameters.|||This is how I am using the function to pass a long parameter list
--temp table to hold parameters
declare @.tbl_WorkCenters table
(
work_center int
)
declare @.sql varchar(max)
--@.work_centers is the comma separated parameter list passed in from the
reprot
set @.sql = 'select ltrim(param) from fn_MVParam(''' + @.work_centers + ''',
'','')'
insert into @.tbl_WorkCenters
exec (@.sql)
Not sure if that answers your question or not.
"cphite@.gmail.com" wrote:
> Ken Reitmeyer wrote:
> > What I have done in the case is as follows. I found this function
> >
> > CREATE FUNCTION [dbo].[fn_MVParam](@.RepParam nvarchar(max), @.Delim char(1)=> > ',')
> > RETURNS @.VALUES TABLE (Param nvarchar(max))AS
> > BEGIN
> > DECLARE @.chrind INT
> > DECLARE @.Piece nvarchar(max)
> > SELECT @.chrind = 1
> > WHILE @.chrind > 0
> > BEGIN
> > SELECT @.chrind = CHARINDEX(@.Delim,@.RepParam)
> > IF @.chrind > 0
> > SELECT @.Piece = LEFT(@.RepParam,@.chrind - 1)
> > ELSE
> > SELECT @.Piece = @.RepParam
> > INSERT @.VALUES(Param) VALUES(@.Piece)
> > SELECT @.RepParam = RIGHT(@.RepParam,LEN(@.RepParam) - @.chrind)
> > IF LEN(@.RepParam) = 0 BREAK
> > END
> > RETURN
> > END
> >
> > This will break the comma separated string passed into your stored proc into
> > a table. Thow the results of this function into a temp table, and filter you
> > results with a join, instead of an in.
> Ken,
> When I use this function it works for one selection, but when I select
> more than one school it tells me I have too many parameters.
>

Monday, February 20, 2012

Large log backups

I noticed that my log backups are very very large after doing a full backup of my databases and was confused why that was.

I created 2 maintenance plans
- one for full backups and DB maintenance that runs nightly
- one for log backups that run at 4hr intervals

For whatever reason, the first transaction log backup that is performed after the full backup of the database is as large if not larger than my full backup, while subsequant log backups are more reasonable in size. Until the next full backup is performed, that is, then the next log backup is HUGE again...

Example:

05/04/2006 01:16 AM 35,801,484,800 TPRO_backup_200605032323.bak
05/04/2006 10:12 AM 31,236,731,392 TPRO_backup_200605040800.trn
05/04/2006 11:00 AM 159,274,496 TPRO_backup_200605041100.trn

No work is done in the database until after 8am, so nothing is going on in the database between the full backup (starts sometime after 10pm ) and the first transaction log backup (starts at 8AM), yet the first transaction log is nearly as large as the full backup that was done. Why?!? Sometimes the first log backup is even larger than the full backup.

If anyone can explain why this is the case and how I can fix it so that my log backups are more realistic, I would greatly appreciate it!

Thanks

Brandon

You mention DB maintenance that is run nightly but don't specify what that maintenance might be. If you're rebuilding indexes on all the tables it's quite conceivable your transaction logs are as large as the full backup file.|||

The order of tasks in the nightly maintenance job is as follows:

Check DB Integrity