Showing posts with label size. Show all posts
Showing posts with label size. Show all posts

Sunday, March 25, 2012

Automatically print multiple copies of the same report with different label on letter size p

Hi,

I am new to reporting services and I'm really stuck on a design problem. Can someone please help me?

I would like to design my own print function. When a user clicks on the print icon (preferably the one that came with reporting services), the report is automatically printed twice, once with "For Person A" and the second time with "For Person B" on it. It doesn't matter where these two labels are placed on the page. These two reports need to be printed on letter-size paper regardless of user's selection. How do I do this with minimum amount of code?

Any help would be greatly appreciated!

Depending on how the names of person A and person B actually get onto the report, you could add a grouping by person with a page break and actually make the report have 2 pages, 1 per person.|||

Hi

Thanks for your help.

The names are constant - ie they can be hardcoded.

If I make the report 1 page per person, does that mean the user will see two copies of the report in preview? Is there a way so that the user sees one copy but can print multiple copies with a single click?

Thanks!

|||

Hi

If there is a field with "Person A" and "Person B" you can add
a grouping by that field and set 'Page Break at end' on the grouping to true.

If this is a static value that has to be hard coded I cannot think of anything.

Problem when using the group by person approach is that the report will display
twice in the browser, each seperated by a pagebreak.

G

|||More specifically, the report will indicate that it has multiple pages (hence allowing the user to browse to the next page) but by default only the first page will show. When you export or print, all pages will be outputted.|||

Is there a way to do this without showing multiple copies (show one copy of the report in preview but prints two)?

Ideally I would like to create a print function that can be used across all reports, instead of changing all existing reports.

Thanks

|||

In that case your only other option is write your own rendering extension. That's quite involved and probably not how far you would want to go in this case.

You can't override the default print function.

|||Ok, got it. Thanks for your help :)

Monday, March 19, 2012

Automatic log decresing space used size in AdventureWorks

Hello all, I was making test with AdventureWorks about monitoring the log size and I run script:
-
/*
** This script is used to fill the Northwind transaction
*/

USE AdventureWorks

WHILE 1 = 1
BEGIN
UPDATE Production.Product
SET Name = Name
WAITFOR DELAY '000:00:00:999' --simulates a somewhat realistic OLTP environment
END-

I used a NEW AdventureWorks, just that I changed the recovery model to FULL RECOVERY MODEL.

By default Adventure Works use a log initial file size of 2 MB with automatic increment of 16MB.

The problem is that the log starts to increase his size 0.7 MB, 1.4 MB ... 1.8 MB and later automatically the log used size decrease to 0.5MB... and the process repeat again. Why is the log decreasing his space used size?, it should increase becouse is configurated whit automatic increment.

I support my test with performance monitor, my results are (please see picture):
http://www.compuaulas.com/performance2.gif

1. There is not log file growths, witch is strange becouse the log should growth!! and the log size didn't change his size.

2. The LOG SPACE USED changed. It's starts to growth but suddenly the space used decrease automatically (See Fuchsia line in the picture).

3. After a while, the log started to growth but instead still growing, TRUNCATIONS started to occur, and it's shouldn't be happening.

4. There is not file shrinking.

please help!!, thank you a lot.

Hi !

I found the same problem in SQL 2000. I used log truncations and log used space (kb) counters to see what was happening. I also used DBCC loginfo to see VLFs, but I still have no solution for that...

[]'s

Dennes

|||

Hi!

I found the answer.

The recovery model full is useless until we made a full backup. SQL Server knows that and keep using recovery model simple until that.

[]'s

Dennes

Automatic log decresing space used size in AdventureWorks

Hello all, I was making test with AdventureWorks about monitoring the log size and I run script:
-
/*
** This script is used to fill the Northwind transaction
*/

USE AdventureWorks

WHILE 1 = 1
BEGIN
UPDATE Production.Product
SET Name = Name
WAITFOR DELAY '000:00:00:999' --simulates a somewhat realistic OLTP environment
END-

I used a NEW AdventureWorks, just that I changed the recovery model to FULL RECOVERY MODEL.

By default Adventure Works use a log initial file size of 2 MB with automatic increment of 16MB.

The problem is that the log starts to increase his size 0.7 MB, 1.4 MB ... 1.8 MB and later automatically the log used size decrease to 0.5MB... and the process repeat again. Why is the log decreasing his space used size?, it should increase becouse is configurated whit automatic increment.

I support my test with performance monitor, my results are (please see picture):
http://www.compuaulas.com/performance2.gif

1. There is not log file growths, witch is strange becouse the log should growth!! and the log size didn't change his size.

2. The LOG SPACE USED changed. It's starts to growth but suddenly the space used decrease automatically (See Fuchsia line in the picture).

3. After a while, the log started to growth but instead still growing, TRUNCATIONS started to occur, and it's shouldn't be happening.

4. There is not file shrinking.

please help!!, thank you a lot.

Hi !

I found the same problem in SQL 2000. I used log truncations and log used space (kb) counters to see what was happening. I also used DBCC loginfo to see VLFs, but I still have no solution for that...

[]'s

Dennes

|||

Hi!

I found the answer.

The recovery model full is useless until we made a full backup. SQL Server knows that and keep using recovery model simple until that.

[]'s

Dennes

Automatic FileGrowth

At what point does SQL actually begin the file growth?
Is it when the database reaches a secific percentage of
the file size or when the database reaches a specific
size. For example, if I have a 100GB database (90 GB
used, 10GB free) and it is set to grow 10%, does the
database grow 10% when the database reaches 91GB or when
it reaches 100GB?It doesn't grow until it is 100% full and more space is needed due to some
SQL statement is executed (an INSERT, for instance).
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Philip Wilhelm" <philip.wilhelm@.astongroup-us.com> wrote in message
news:05ca01c3a92e$c81d2990$a501280a@.phx.gbl...
> At what point does SQL actually begin the file growth?
> Is it when the database reaches a secific percentage of
> the file size or when the database reaches a specific
> size. For example, if I have a 100GB database (90 GB
> used, 10GB free) and it is set to grow 10%, does the
> database grow 10% when the database reaches 91GB or when
> it reaches 100GB?|||Philip
http://www.sql-server-performance.com/database_settings.asp
"Philip Wilhelm" <philip.wilhelm@.astongroup-us.com> wrote in message
news:05ca01c3a92e$c81d2990$a501280a@.phx.gbl...
> At what point does SQL actually begin the file growth?
> Is it when the database reaches a secific percentage of
> the file size or when the database reaches a specific
> size. For example, if I have a 100GB database (90 GB
> used, 10GB free) and it is set to grow 10%, does the
> database grow 10% when the database reaches 91GB or when
> it reaches 100GB?

Sunday, March 11, 2012

Automatic Defragmentation?

Hi!
I have sql server system and in the diary backup i have
seen that the database size has been reduced a lot, from
one day to another.
I have any deframentation actived, Is the defragmentation
activated by defect in sql server'
Thanks.
Best RegardsThere is no automatic method for controlling fragmentation. See the
whitepaper at
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/maintain/optimize/ss2kidbp.asp
for more details.
--
Paul Randal
DBCC Technical Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"fran" <gimmacks@.telepolis.com> wrote in message
news:001901c37938$47abd980$a101280a@.phx.gbl...
> Hi!
>
> I have sql server system and in the diary backup i have
> seen that the database size has been reduced a lot, from
> one day to another.
> I have any deframentation actived, Is the defragmentation
> activated by defect in sql server'
>
> Thanks.
> Best Regards|||Hi!
Thanks for your response.
If there is any automatic method for controlling
defragmentation, Do you have any idea why this has
happend'
Thanks
>--Original Message--
>There is no automatic method for controlling
fragmentation. See the
>whitepaper at
>http://www.microsoft.com/technet/treeview/default.asp?
url=/technet/prodtechnol/sql/maintain/optimize/ss2kidbp.asp
>for more details.
>--
>Paul Randal
>DBCC Technical Lead, Microsoft SQL Server Storage Engine
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"fran" <gimmacks@.telepolis.com> wrote in message
>news:001901c37938$47abd980$a101280a@.phx.gbl...
>> Hi!
>>
>> I have sql server system and in the diary backup i have
>> seen that the database size has been reduced a lot, from
>> one day to another.
>> I have any deframentation actived, Is the
defragmentation
>> activated by defect in sql server'
>>
>> Thanks.
>> Best Regards
>
>.
>|||No there isn't. Please read the whitepaper which should explain everything
you've asked.
--
Paul Randal
DBCC Technical Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"fran" <pnoia@.iespana.es> wrote in message
news:06ee01c37b6c$d3589c30$a101280a@.phx.gbl...
> Hi!
> Thanks for your response.
> If there is any automatic method for controlling
> defragmentation, Do you have any idea why this has
> happend'
>
> Thanks
>
> >--Original Message--
> >There is no automatic method for controlling
> fragmentation. See the
> >whitepaper at
> >http://www.microsoft.com/technet/treeview/default.asp?
> url=/technet/prodtechnol/sql/maintain/optimize/ss2kidbp.asp
> >for more details.
> >
> >--
> >Paul Randal
> >DBCC Technical Lead, Microsoft SQL Server Storage Engine
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >"fran" <gimmacks@.telepolis.com> wrote in message
> >news:001901c37938$47abd980$a101280a@.phx.gbl...
> >> Hi!
> >>
> >>
> >> I have sql server system and in the diary backup i have
> >> seen that the database size has been reduced a lot, from
> >> one day to another.
> >> I have any deframentation actived, Is the
> defragmentation
> >> activated by defect in sql server'
> >>
> >>
> >> Thanks.
> >>
> >> Best Regards
> >
> >
> >.
> >

AutoMatic Configuration Differential Backup

hello every one
i am using Microsoft SQL Server 2000
Enterprise Edition and running four data bases on
server.All on Local Areal Network the size of every data
bases is 1 GB and changing occour every Second and minute
so i want to implement Differential Backup after every One
Hours using SQL Server agent and schedule task can any
body guide me properly and any tutorial like web site that
help me step by step ......Documentation etc...
Second i also want replicated to another machine on LAN
thank
IrfanIn SQL Enterprise Manager, select SQL Agent->jobs, New job
Give the job a name and go to steps -> new Step... Choose t-sql step...
The command should be
backup database yourdbname to disk =
'\\servername\sharename\backupfilename.bkp' with init,differential
OK this and add similar steps for each of the other databases.
Then go to schedule and choose a schedule for this to run...
Save it and see if it works...
More details can be found in SQL Server Books On Line...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Irfan" <mirfanaslam@.hotmail.com> wrote in message
news:0ca401c48b8c$9c5f9a90$a301280a@.phx.gbl...
> hello every one
> i am using Microsoft SQL Server 2000
> Enterprise Edition and running four data bases on
> server.All on Local Areal Network the size of every data
> bases is 1 GB and changing occour every Second and minute
> so i want to implement Differential Backup after every One
> Hours using SQL Server agent and schedule task can any
> body guide me properly and any tutorial like web site that
> help me step by step ......Documentation etc...
> Second i also want replicated to another machine on LAN
> thank
> Irfan
>

AutoMatic Configuration Differential Backup

hello every one
i am using Microsoft SQL Server 2000
Enterprise Edition and running four data bases on
server.All on Local Areal Network the size of every data
bases is 1 GB and changing occour every Second and minute
so i want to implement Differential Backup after every One
Hours using SQL Server agent and schedule task can any
body guide me properly and any tutorial like web site that
help me step by step ......Documentation etc...
Second i also want replicated to another machine on LAN
thank
Irfan
In SQL Enterprise Manager, select SQL Agent->jobs, New job
Give the job a name and go to steps -> new Step... Choose t-sql step...
The command should be
backup database yourdbname to disk =
'\\servername\sharename\backupfilename.bkp' with init,differential
OK this and add similar steps for each of the other databases.
Then go to schedule and choose a schedule for this to run...
Save it and see if it works...
More details can be found in SQL Server Books On Line...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Irfan" <mirfanaslam@.hotmail.com> wrote in message
news:0ca401c48b8c$9c5f9a90$a301280a@.phx.gbl...
> hello every one
> i am using Microsoft SQL Server 2000
> Enterprise Edition and running four data bases on
> server.All on Local Areal Network the size of every data
> bases is 1 GB and changing occour every Second and minute
> so i want to implement Differential Backup after every One
> Hours using SQL Server agent and schedule task can any
> body guide me properly and any tutorial like web site that
> help me step by step ......Documentation etc...
> Second i also want replicated to another machine on LAN
> thank
> Irfan
>

AutoMatic Configuration Differential Backup

hello every one
i am using Microsoft SQL Server 2000
Enterprise Edition and running four data bases on
server.All on Local Areal Network the size of every data
bases is 1 GB and changing occour every Second and minute
so i want to implement Differential Backup after every One
Hours using SQL Server agent and schedule task can any
body guide me properly and any tutorial like web site that
help me step by step ......Documentation etc...
Second i also want replicated to another machine on LAN
thank
IrfanIn SQL Enterprise Manager, select SQL Agent->jobs, New job
Give the job a name and go to steps -> new Step... Choose t-sql step...
The command should be
backup database yourdbname to disk ='\\servername\sharename\backupfilename.bkp' with init,differential
OK this and add similar steps for each of the other databases.
Then go to schedule and choose a schedule for this to run...
Save it and see if it works...
More details can be found in SQL Server Books On Line...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Irfan" <mirfanaslam@.hotmail.com> wrote in message
news:0ca401c48b8c$9c5f9a90$a301280a@.phx.gbl...
> hello every one
> i am using Microsoft SQL Server 2000
> Enterprise Edition and running four data bases on
> server.All on Local Areal Network the size of every data
> bases is 1 GB and changing occour every Second and minute
> so i want to implement Differential Backup after every One
> Hours using SQL Server agent and schedule task can any
> body guide me properly and any tutorial like web site that
> help me step by step ......Documentation etc...
> Second i also want replicated to another machine on LAN
> thank
> Irfan
>

Friday, February 24, 2012

auto-grow gotcha

I made a database to hold recordings of calls made to our customers.
When I made it I set the size of the primary datafile to 18GB. It's
been running flawlessly for over 10 months. A few days ago the users
were suddenly no longer able to save the recordings to the database.
They got an error message to the effect that the timeout had expired.
The failure occurred on the .Execute statement of the Command that
calls the stored procedure.

I noticed that the data had reached the size allocated for the file.
The file was set to auto-grow (5%). However, since I couldn't find
anything else wrong, and since the test version of the database (which
only has 15GB of data in an 18GB-dimensioned file) did not exhibit the
same behavior, I decided to try increasing the size of the file with
an ALTER DATABASE statement. I increased it to 21GB. Lo and behold,
the problem disappeared.

Here's what I think might be going on: The default timeout for the
ADO Command object is 30 seconds... this is probably not long enough
for SQL Server to add 900 MB to the datafile, therefore the Command
timeout expired. So from now on instead of relying on auto-grow, I'm
going to just make sure the datafile always has plenty of headroom.

FWIW."Ellen K." <72322.enno.esspeeayem.1016@.compuserve.com> wrote in message
news:0rlntvou1j40dr2fbo1fs5uv06ir3cf89a@.4ax.com...
> I made a database to hold recordings of calls made to our customers.
> When I made it I set the size of the primary datafile to 18GB. It's
> been running flawlessly for over 10 months. A few days ago the users
> were suddenly no longer able to save the recordings to the database.
> They got an error message to the effect that the timeout had expired.
> The failure occurred on the .Execute statement of the Command that
> calls the stored procedure.
> I noticed that the data had reached the size allocated for the file.
> The file was set to auto-grow (5%). However, since I couldn't find
> anything else wrong, and since the test version of the database (which
> only has 15GB of data in an 18GB-dimensioned file) did not exhibit the
> same behavior, I decided to try increasing the size of the file with
> an ALTER DATABASE statement. I increased it to 21GB. Lo and behold,
> the problem disappeared.
> Here's what I think might be going on: The default timeout for the
> ADO Command object is 30 seconds... this is probably not long enough
> for SQL Server to add 900 MB to the datafile, therefore the Command
> timeout expired. So from now on instead of relying on auto-grow, I'm
> going to just make sure the datafile always has plenty of headroom.

The other option is to set it to grow by a fixed amount (say 500 MB) each
time rather than a %. As you found out, that % growth adds up quickly.

But I think your solution is the best, to pro-actively grow it.

(Since the next problem you'll encounter is is needing to grow say 900MB,
but finding out you have 500 MB free. Autogrow won't work and you're
basically stuck. :-)

And yes, I've been bit by this too.

> FWIW.

AutoGrow DB option

Hi all, what i really want to know is what actualy tells sql server to grow
the database, file, i found a post that says something about xmb size, what
can find no other impormation, So my question is what event promts sql to
autogrow its database file,
Thanks Andrew
Whenever a connection is executing a query where space needed to be allocated (read about extents in
Books Online), and there is not space in the database file (or files if that object is on a
filegroup constituted of several files).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"andrew bourne" <andrewbourne@.vardells.com> wrote in message
news:uYmvtb3ZFHA.3320@.TK2MSFTNGP12.phx.gbl...
> Hi all, what i really want to know is what actualy tells sql server to grow the database, file, i
> found a post that says something about xmb size, what can find no other impormation, So my
> question is what event promts sql to autogrow its database file,
> Thanks Andrew
>

AutoGrow DB option

Hi all, what i really want to know is what actualy tells sql server to grow
the database, file, i found a post that says something about xmb size, what
can find no other impormation, So my question is what event promts sql to
autogrow its database file,
Thanks AndrewWhenever a connection is executing a query where space needed to be allocate
d (read about extents in
Books Online), and there is not space in the database file (or files if that
object is on a
filegroup constituted of several files).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"andrew bourne" <andrewbourne@.vardells.com> wrote in message
news:uYmvtb3ZFHA.3320@.TK2MSFTNGP12.phx.gbl...
> Hi all, what i really want to know is what actualy tells sql server to gro
w the database, file, i
> found a post that says something about xmb size, what can find no other im
pormation, So my
> question is what event promts sql to autogrow its database file,
> Thanks Andrew
>

AutoGrow DB option

Hi all, what i really want to know is what actualy tells sql server to grow
the database, file, i found a post that says something about xmb size, what
can find no other impormation, So my question is what event promts sql to
autogrow its database file,
Thanks AndrewWhenever a connection is executing a query where space needed to be allocated (read about extents in
Books Online), and there is not space in the database file (or files if that object is on a
filegroup constituted of several files).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"andrew bourne" <andrewbourne@.vardells.com> wrote in message
news:uYmvtb3ZFHA.3320@.TK2MSFTNGP12.phx.gbl...
> Hi all, what i really want to know is what actualy tells sql server to grow the database, file, i
> found a post that says something about xmb size, what can find no other impormation, So my
> question is what event promts sql to autogrow its database file,
> Thanks Andrew
>