Showing posts with label resizing. Show all posts
Showing posts with label resizing. Show all posts

Wednesday, March 28, 2012

Resizing TempDB From a Trigger

I understand that a SQL Server can slow down if TempDB runs out of space and
must be resized. So, towards keeping TempDB "big enough" I'm wondering if it
would be a great idea to do the following:
1. Create a stored procedure that checks the size of TempDB and causes it to
increase in size if necessary
2. Call that stored procedure from a trigger (Before Insert)
Generally speaking, is this a reasonable course of action?Egads, the subject alone is giving me shivers. {shudder}

> 1. Create a stored procedure that checks the size of TempDB and causes it
> to increase in size if necessary
I'd be curious to see the algorithm you expect to perform to determine if
the not-yet-committed transaction is going to require more space in tempdb.

> 2. Call that stored procedure from a trigger (Before Insert)
How is this supposed to speed up your insert?

> Generally speaking, is this a reasonable course of action?
No, how about specifying a size for tempdb that is large enough to account
for this kind of activity?
A|||RE:
<< How is this supposed to speed up your insert? >>
It's not supposed to speed up the insert. The idea is that if TempDB is too
small, then *all* operations on the server would slow down while TempDB is
expanding (e.g., Auto growth by 10%). So the point would be to increase the
size, on demand, at the earliest time we know TempDB is running low on
available space.
-J
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OPjfVFWkGHA.976@.TK2MSFTNGP02.phx.gbl...
> Egads, the subject alone is giving me shivers. {shudder}
>
> I'd be curious to see the algorithm you expect to perform to determine if
> the not-yet-committed transaction is going to require more space in
> tempdb.
>
> How is this supposed to speed up your insert?
>
> No, how about specifying a size for tempdb that is large enough to account
> for this kind of activity?
> A
>|||> It's not supposed to speed up the insert. The idea is that if TempDB is
> too small, then *all* operations on the server would slow down while
> TempDB is expanding (e.g., Auto growth by 10%). So the point would be to
> increase the size, on demand, at the earliest time we know TempDB is
> running low on available space.
I still think it would be better to just allocate enough space in the first
place, and / or reduce the operations that demand so much from tempdb,
rather than increasing the size on demand.
Whether your insert implicitly causes tempdb to grow, or whether you force
tempdb to grow because of the insert, the impact on the server is the same.
A|||Jeff,
just a thought.

> 1. Create a stored procedure that checks the size of TempDB and causes it
to
> increase in size if necessary
Isnt this what auto groth option does but only when it is required to do it.
If you think your server needs bigger tempdb why not provide it at the
begining itself and not worry about it.
abhishek
"Jeff" wrote:

> I understand that a SQL Server can slow down if TempDB runs out of space a
nd
> must be resized. So, towards keeping TempDB "big enough" I'm wondering if
it
> would be a great idea to do the following:
> 1. Create a stored procedure that checks the size of TempDB and causes it
to
> increase in size if necessary
> 2. Call that stored procedure from a trigger (Before Insert)
> Generally speaking, is this a reasonable course of action?
>
>|||Jeff wrote:
> I understand that a SQL Server can slow down if TempDB runs out of space a
nd
> must be resized. So, towards keeping TempDB "big enough" I'm wondering if
it
> would be a great idea to do the following:
> 1. Create a stored procedure that checks the size of TempDB and causes it
to
> increase in size if necessary
> 2. Call that stored procedure from a trigger (Before Insert)
> Generally speaking, is this a reasonable course of action?
>
How is this different than letting SQL grow the database for you?
It would be FAR better, in my opinion, to determine an appropriate
TEMPDB size and stick to that, no growing or shrinking. Control the
size of your insert/import/sort operations so that TEMPDB isn't abused.
Import records in batches of 1000, 10000, whatever works for you, keep
the size of the transactions under control.

Resizing parameters

I have designed a few reports in VS2005 with multi-parameter controls. When I
view these reports in VS they look fine, however once deployed and viewed in
the webbrowser (MS Internet Explorer) the drop-down boxes are too small (or
the font size is too big).
Is there a way to adjust (resize) the control boxes so you can make them
larger so it's easier for people to actually read where they can choose
between?
thanks,
mischaOn Jul 17, 3:54 am, mischa <mis...@.discussions.microsoft.com> wrote:
> I have designed a few reports in VS2005 with multi-parameter controls. When I
> view these reports in VS they look fine, however once deployed and viewed in
> the webbrowser (MS Internet Explorer) the drop-down boxes are too small (or
> the font size is too big).
> Is there a way to adjust (resize) the control boxes so you can make them
> larger so it's easier for people to actually read where they can choose
> between?
> thanks,
> mischa
As far as I know, there is not. This has been a common request on this
news group. Hopefully, this will be addressed in SSRS 2008. Otherwise,
you could try to inject CSS; however, I think that styling is only
allowed at the Report Manager page and report border level (though I'm
not sure). Sorry that I could not be of greater assistance.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Jul 17, 3:54 am, mischa <mis...@.discussions.microsoft.com> wrote:
> I have designed a few reports in VS2005 with multi-parameter controls. When I
> view these reports in VS they look fine, however once deployed and viewed in
> the webbrowser (MS Internet Explorer) the drop-down boxes are too small (or
> the font size is too big).
> Is there a way to adjust (resize) the control boxes so you can make them
> larger so it's easier for people to actually read where they can choose
> between?
> thanks,
> mischa
It doesn't appear that my last reply posted; so, here it goes again.
As far as I know, this not possible. It has been a common request in
this newsgroup. Hopefully, a resolution for this will be provided in
SSRS 2008. The only other thing I can think of is to try and inject or
reference a CSS/stylesheet (but, I think this is limited to styling
the Report Mgr page, etc). Sorry that I could not be of greater
assistance.
Regards,
Enrique Martinez
Sr. Software Consultantsql

Resizing margins programmatically?

Hello,


I am using

winforms reportviewer control for viewing .rdlc files (VS2005/SQL2005).

I would like to know if there was a way to control report header height

or top margin size, programmatically (or by using parameters).

Any

suggestion would be appreciated

Thank you!No, page header height or margin sizes cannot be changed programmatically. You'd need to have different reports that have different values on these properties.

Resizing an existing DB

I created a DB with a preallocated size of 20GB and I need to shink
this down to a smaller size. If I go into DB properties and enter a
new value it says that the size must be greater than the current size.
Is there any way to do this? Also when I try and restore the DB is
wants 20GB of disk space even though it's only using about 1GB of
data. Any help will be muchly appreciated.
Darren.Use DBCC SHRINKDATABASE or DBCC SHRINKFILE. These commands are documented in Books Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Darren" <walker_712@.hotmail.com> wrote in message news:cd9d3666.0405102239.21563966@.posting.google.com...
> I created a DB with a preallocated size of 20GB and I need to shink
> this down to a smaller size. If I go into DB properties and enter a
> new value it says that the size must be greater than the current size.
> Is there any way to do this? Also when I try and restore the DB is
> wants 20GB of disk space even though it's only using about 1GB of
> data. Any help will be muchly appreciated.
> Darren.|||Hi Darren,
Unfortunatly you can't. The smallest size you can shrink
your database to is the size the database was initally set
to when you created it, in this case 20gb.
Although there are lots of ways of doing it, personally I
would save the data, drop the database, recreate it with 1
gb, then copy the database back into it.
J
>--Original Message--
>I created a DB with a preallocated size of 20GB and I
need to shink
>this down to a smaller size. If I go into DB properties
and enter a
>new value it says that the size must be greater than the
current size.
>Is there any way to do this? Also when I try and restore
the DB is
>wants 20GB of disk space even though it's only using
about 1GB of
>data. Any help will be muchly appreciated.
>Darren.
>.
>|||Julie,
DBCC SHRINKFILE should be able to shrink the size below the initial size...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Julie" <anonymous@.discussions.microsoft.com> wrote in message news:b30801c43735$c4a30970$a301280a@.phx.gbl...
> Hi Darren,
> Unfortunatly you can't. The smallest size you can shrink
> your database to is the size the database was initally set
> to when you created it, in this case 20gb.
> Although there are lots of ways of doing it, personally I
> would save the data, drop the database, recreate it with 1
> gb, then copy the database back into it.
> J
>
>
> >--Original Message--
> >I created a DB with a preallocated size of 20GB and I
> need to shink
> >this down to a smaller size. If I go into DB properties
> and enter a
> >new value it says that the size must be greater than the
> current size.
> >Is there any way to do this? Also when I try and restore
> the DB is
> >wants 20GB of disk space even though it's only using
> about 1GB of
> >data. Any help will be muchly appreciated.
> >
> >Darren.
> >.
> >|||Ok, now hanging my head in shame.
Moving swiftly along...
>--Original Message--
>Julie,
>DBCC SHRINKFILE should be able to shrink the size below
the initial size...
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Julie" <anonymous@.discussions.microsoft.com> wrote in
message news:b30801c43735$c4a30970$a301280a@.phx.gbl...
>> Hi Darren,
>> Unfortunatly you can't. The smallest size you can shrink
>> your database to is the size the database was initally
set
>> to when you created it, in this case 20gb.
>> Although there are lots of ways of doing it,
personally I
>> would save the data, drop the database, recreate it
with 1
>> gb, then copy the database back into it.
>> J
>>
>>
>> >--Original Message--
>> >I created a DB with a preallocated size of 20GB and I
>> need to shink
>> >this down to a smaller size. If I go into DB properties
>> and enter a
>> >new value it says that the size must be greater than
the
>> current size.
>> >Is there any way to do this? Also when I try and
restore
>> the DB is
>> >wants 20GB of disk space even though it's only using
>> about 1GB of
>> >data. Any help will be muchly appreciated.
>> >
>> >Darren.
>> >.
>> >
>
>.
>|||LOL...
As if we didn't do this all of us, from time to time. :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Julie" <anonymous@.discussions.microsoft.com> wrote in message news:b38e01c4373e$eb86b330$a301280a@.phx.gbl...
> Ok, now hanging my head in shame.
> Moving swiftly along...
>
> >--Original Message--
> >Julie,
> >
> >DBCC SHRINKFILE should be able to shrink the size below
> the initial size...
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >http://www.karaszi.com/sqlserver/default.asp
> >
> >
> >"Julie" <anonymous@.discussions.microsoft.com> wrote in
> message news:b30801c43735$c4a30970$a301280a@.phx.gbl...
> >> Hi Darren,
> >>
> >> Unfortunatly you can't. The smallest size you can shrink
> >> your database to is the size the database was initally
> set
> >> to when you created it, in this case 20gb.
> >>
> >> Although there are lots of ways of doing it,
> personally I
> >> would save the data, drop the database, recreate it
> with 1
> >> gb, then copy the database back into it.
> >>
> >> J
> >>
> >>
> >>
> >>
> >> >--Original Message--
> >> >I created a DB with a preallocated size of 20GB and I
> >> need to shink
> >> >this down to a smaller size. If I go into DB properties
> >> and enter a
> >> >new value it says that the size must be greater than
> the
> >> current size.
> >> >Is there any way to do this? Also when I try and
> restore
> >> the DB is
> >> >wants 20GB of disk space even though it's only using
> >> about 1GB of
> >> >data. Any help will be muchly appreciated.
> >> >
> >> >Darren.
> >> >.
> >> >
> >
> >
> >.
> >

Resizing an existing DB

I created a DB with a preallocated size of 20GB and I need to shink
this down to a smaller size. If I go into DB properties and enter a
new value it says that the size must be greater than the current size.
Is there any way to do this? Also when I try and restore the DB is
wants 20GB of disk space even though it's only using about 1GB of
data. Any help will be muchly appreciated.
Darren.
Use DBCC SHRINKDATABASE or DBCC SHRINKFILE. These commands are documented in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Darren" <walker_712@.hotmail.com> wrote in message news:cd9d3666.0405102239.21563966@.posting.google.c om...
> I created a DB with a preallocated size of 20GB and I need to shink
> this down to a smaller size. If I go into DB properties and enter a
> new value it says that the size must be greater than the current size.
> Is there any way to do this? Also when I try and restore the DB is
> wants 20GB of disk space even though it's only using about 1GB of
> data. Any help will be muchly appreciated.
> Darren.

Resizing an existing DB

Hi Darren,
Unfortunatly you can't. The smallest size you can shrink
your database to is the size the database was initally set
to when you created it, in this case 20gb.
Although there are lots of ways of doing it, personally I
would save the data, drop the database, recreate it with 1
gb, then copy the database back into it.
J

>--Original Message--
>I created a DB with a preallocated size of 20GB and I
need to shink
>this down to a smaller size. If I go into DB properties
and enter a
>new value it says that the size must be greater than the
current size.
>Is there any way to do this? Also when I try and restore
the DB is
>wants 20GB of disk space even though it's only using
about 1GB of
>data. Any help will be muchly appreciated.
>Darren.
>.
>
Julie,
DBCC SHRINKFILE should be able to shrink the size below the initial size...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Julie" <anonymous@.discussions.microsoft.com> wrote in message news:b30801c43735$c4a30970$a301280a@.phx.gbl...[vbcol=seagreen]
> Hi Darren,
> Unfortunatly you can't. The smallest size you can shrink
> your database to is the size the database was initally set
> to when you created it, in this case 20gb.
> Although there are lots of ways of doing it, personally I
> would save the data, drop the database, recreate it with 1
> gb, then copy the database back into it.
> J
>
>
> need to shink
> and enter a
> current size.
> the DB is
> about 1GB of
|||Ok, now hanging my head in shame.
Moving swiftly along...

>--Original Message--
>Julie,
>DBCC SHRINKFILE should be able to shrink the size below
the initial size...
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Julie" <anonymous@.discussions.microsoft.com> wrote in
message news:b30801c43735$c4a30970$a301280a@.phx.gbl...[vbcol=seagreen]
set[vbcol=seagreen]
personally I[vbcol=seagreen]
with 1[vbcol=seagreen]
the[vbcol=seagreen]
restore
>
>.
>
|||LOL...
As if we didn't do this all of us, from time to time. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Julie" <anonymous@.discussions.microsoft.com> wrote in message news:b38e01c4373e$eb86b330$a301280a@.phx.gbl...[vbcol=seagreen]
> Ok, now hanging my head in shame.
> Moving swiftly along...
>
> the initial size...
> message news:b30801c43735$c4a30970$a301280a@.phx.gbl...
> set
> personally I
> with 1
> the
> restore

Resizing an existing DB

Hi Darren,
Unfortunatly you can't. The smallest size you can shrink
your database to is the size the database was initally set
to when you created it, in this case 20gb.
Although there are lots of ways of doing it, personally I
would save the data, drop the database, recreate it with 1
gb, then copy the database back into it.
J

>--Original Message--
>I created a DB with a preallocated size of 20GB and I
need to shink
>this down to a smaller size. If I go into DB properties
and enter a
>new value it says that the size must be greater than the
current size.
>Is there any way to do this? Also when I try and restore
the DB is
>wants 20GB of disk space even though it's only using
about 1GB of
>data. Any help will be muchly appreciated.
>Darren.
>.
>Julie,
DBCC SHRINKFILE should be able to shrink the size below the initial size...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Julie" <anonymous@.discussions.microsoft.com> wrote in message news:b30801c43735$c4a30970$a3
01280a@.phx.gbl...[vbcol=seagreen]
> Hi Darren,
> Unfortunatly you can't. The smallest size you can shrink
> your database to is the size the database was initally set
> to when you created it, in this case 20gb.
> Although there are lots of ways of doing it, personally I
> would save the data, drop the database, recreate it with 1
> gb, then copy the database back into it.
> J
>
>
> need to shink
> and enter a
> current size.
> the DB is
> about 1GB of|||Ok, now hanging my head in shame.
Moving swiftly along...

>--Original Message--
>Julie,
>DBCC SHRINKFILE should be able to shrink the size below
the initial size...
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Julie" <anonymous@.discussions.microsoft.com> wrote in
message news:b30801c43735$c4a30970$a301280a@.phx.gbl...
set[vbcol=seagreen]
personally I[vbcol=seagreen]
with 1[vbcol=seagreen]
the[vbcol=seagreen]
restore[vbcol=seagreen]
>
>.
>|||LOL...
As if we didn't do this all of us, from time to time. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Julie" <anonymous@.discussions.microsoft.com> wrote in message news:b38e01c4373e$eb86b330$a3
01280a@.phx.gbl...[vbcol=seagreen]
> Ok, now hanging my head in shame.
> Moving swiftly along...
>
> the initial size...
> message news:b30801c43735$c4a30970$a301280a@.phx.gbl...
> set
> personally I
> with 1
> the
> restoresql

Resizing an existing DB

I created a DB with a preallocated size of 20GB and I need to shink
this down to a smaller size. If I go into DB properties and enter a
new value it says that the size must be greater than the current size.
Is there any way to do this? Also when I try and restore the DB is
wants 20GB of disk space even though it's only using about 1GB of
data. Any help will be muchly appreciated.
Darren.Use DBCC SHRINKDATABASE or DBCC SHRINKFILE. These commands are documented in
Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Darren" <walker_712@.hotmail.com> wrote in message news:cd9d3666.0405102239.21563966@.posting
.google.com...
> I created a DB with a preallocated size of 20GB and I need to shink
> this down to a smaller size. If I go into DB properties and enter a
> new value it says that the size must be greater than the current size.
> Is there any way to do this? Also when I try and restore the DB is
> wants 20GB of disk space even though it's only using about 1GB of
> data. Any help will be muchly appreciated.
> Darren.

resizing a subreport

Hello:
I have a subreport displaying a title (actually a table with some rows of
information) that is common to many different reports.
I'll like to implement this title in a subreport and link it from the main
reports, but some of them are in portrait format while others are landscape.
Is there any way of resizing a subreport?
Thanks,
Daniel Bello Urizarri.Daniel Bello wrote:
> Hello:
> I have a subreport displaying a title (actually a table with some rows of
> information) that is common to many different reports.
> I'll like to implement this title in a subreport and link it from the main
> reports, but some of them are in portrait format while others are landscape.
> Is there any way of resizing a subreport?
> Thanks,
> Daniel Bello Urizarri.
As far as I know, subreports can be minimally formatted size-wise;
however, it is very limited and portrait versus layout formatting is
not feasible. The subreport could be put inside a list, which could
control the layout a little better. Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer