Showing posts with label generate. Show all posts
Showing posts with label generate. Show all posts

Sunday, March 25, 2012

Does Shrinkfile Emptyfile block users?

I read BOL says this can be done online but will it generate blocks.
Is it done in small transactions?
Thanks
Paul
Can you point us to exactly where it stats that? A shrinkfile with or
without Emptyfile will lock the page or extent as it moves it from the back
of the file to the front or from file to file in the case of the empty file.
It should not hold that lock unless you wrapped it in your own transaction.
Andrew J. Kelly SQL MVP
"Paul Cahill" <xyzpaul.xyzcahill@.dsl.pipex.com> wrote in message
news:eLgLMZXiFHA.2644@.TK2MSFTNGP09.phx.gbl...
>I read BOL says this can be done online but will it generate blocks.
> Is it done in small transactions?
> Thanks
> Paul
>
|||Hi Andrew
As follows. If it does it page at a time I should be OK.
Thanks
Paul
DBCC SHRINKFILE
Shrinks the size of the specified data file or log file for the related
database
........
To remove any data that may be in a file, execute DBCC
SHRINKFILE('file_name', EMPTYFILE) before executing ALTER DATABASE.
The database being shrunk does not have to be in single-user mode; other
users can be working in the database when the file is shrunk. You do not
have to run SQL Server in single-user mode to shrink the system databases.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OeBukJYiFHA.500@.TK2MSFTNGP09.phx.gbl...
> Can you point us to exactly where it stats that? A shrinkfile with or
> without Emptyfile will lock the page or extent as it moves it from the
> back of the file to the front or from file to file in the case of the
> empty file. It should not hold that lock unless you wrapped it in your own
> transaction.
> --
> Andrew J. Kelly SQL MVP
>
> "Paul Cahill" <xyzpaul.xyzcahill@.dsl.pipex.com> wrote in message
> news:eLgLMZXiFHA.2644@.TK2MSFTNGP09.phx.gbl...
>

Does Shrinkfile Emptyfile block users?

I read BOL says this can be done online but will it generate blocks.
Is it done in small transactions?
Thanks
PaulCan you point us to exactly where it stats that? A shrinkfile with or
without Emptyfile will lock the page or extent as it moves it from the back
of the file to the front or from file to file in the case of the empty file.
It should not hold that lock unless you wrapped it in your own transaction.
Andrew J. Kelly SQL MVP
"Paul Cahill" <xyzpaul.xyzcahill@.dsl.pipex.com> wrote in message
news:eLgLMZXiFHA.2644@.TK2MSFTNGP09.phx.gbl...
>I read BOL says this can be done online but will it generate blocks.
> Is it done in small transactions?
> Thanks
> Paul
>|||Hi Andrew
As follows. If it does it page at a time I should be OK.
Thanks
Paul
DBCC SHRINKFILE
Shrinks the size of the specified data file or log file for the related
database
.......
To remove any data that may be in a file, execute DBCC
SHRINKFILE('file_name', EMPTYFILE) before executing ALTER DATABASE.
The database being shrunk does not have to be in single-user mode; other
users can be working in the database when the file is shrunk. You do not
have to run SQL Server in single-user mode to shrink the system databases.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OeBukJYiFHA.500@.TK2MSFTNGP09.phx.gbl...
> Can you point us to exactly where it stats that? A shrinkfile with or
> without Emptyfile will lock the page or extent as it moves it from the
> back of the file to the front or from file to file in the case of the
> empty file. It should not hold that lock unless you wrapped it in your own
> transaction.
> --
> Andrew J. Kelly SQL MVP
>
> "Paul Cahill" <xyzpaul.xyzcahill@.dsl.pipex.com> wrote in message
> news:eLgLMZXiFHA.2644@.TK2MSFTNGP09.phx.gbl...
>

Thursday, March 22, 2012

Does Shrinkfile Emptyfile block users?

I read BOL says this can be done online but will it generate blocks.
Is it done in small transactions?
Thanks
PaulCan you point us to exactly where it stats that? A shrinkfile with or
without Emptyfile will lock the page or extent as it moves it from the back
of the file to the front or from file to file in the case of the empty file.
It should not hold that lock unless you wrapped it in your own transaction.
--
Andrew J. Kelly SQL MVP
"Paul Cahill" <xyzpaul.xyzcahill@.dsl.pipex.com> wrote in message
news:eLgLMZXiFHA.2644@.TK2MSFTNGP09.phx.gbl...
>I read BOL says this can be done online but will it generate blocks.
> Is it done in small transactions?
> Thanks
> Paul
>|||Hi Andrew
As follows. If it does it page at a time I should be OK.
Thanks
Paul
DBCC SHRINKFILE
Shrinks the size of the specified data file or log file for the related
database
.......
To remove any data that may be in a file, execute DBCC
SHRINKFILE('file_name', EMPTYFILE) before executing ALTER DATABASE.
The database being shrunk does not have to be in single-user mode; other
users can be working in the database when the file is shrunk. You do not
have to run SQL Server in single-user mode to shrink the system databases.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OeBukJYiFHA.500@.TK2MSFTNGP09.phx.gbl...
> Can you point us to exactly where it stats that? A shrinkfile with or
> without Emptyfile will lock the page or extent as it moves it from the
> back of the file to the front or from file to file in the case of the
> empty file. It should not hold that lock unless you wrapped it in your own
> transaction.
> --
> Andrew J. Kelly SQL MVP
>
> "Paul Cahill" <xyzpaul.xyzcahill@.dsl.pipex.com> wrote in message
> news:eLgLMZXiFHA.2644@.TK2MSFTNGP09.phx.gbl...
>>I read BOL says this can be done online but will it generate blocks.
>> Is it done in small transactions?
>> Thanks
>> Paul
>>
>sql

Does RS recognize CHAR(13)?

I am making a query for mailing labels that I will generate in Reporting
Services. I have a SQL Server stored procedure that returns the address using
SQL like this
SELECT Address + CHAR(13) + Address2 + CHAR(13) + City + ' ' + State + ' '
+ Zip AS FullAddress
FROM ...
Assume the data is:
Address: 123 Main Street
Address2: Suite 3
City: Bellevue
State: WA
Zip: 98111
I assign the FullAddress field to a textbox in Reporting Services. I resize
it to be several lines high. The result I get is something like this:
123 Main StreetSuite3Bellevue
WA 98111
I have tried using CHAR(10) + CHAR(13) instead of just CHAR(10), but I get
double spaces. Does RS handle CHAR() output? Do I need to use separate fields?I've done this before but in the actual field expression not in the query.
Use Fields!Address.Value + CHR(10) + Fields!Address.Value + ...
"Rick" wrote:
> I am making a query for mailing labels that I will generate in Reporting
> Services. I have a SQL Server stored procedure that returns the address using
> SQL like this
> SELECT Address + CHAR(13) + Address2 + CHAR(13) + City + ' ' + State + ' '
> + Zip AS FullAddress
> FROM ...
> Assume the data is:
> Address: 123 Main Street
> Address2: Suite 3
> City: Bellevue
> State: WA
> Zip: 98111
> I assign the FullAddress field to a textbox in Reporting Services. I resize
> it to be several lines high. The result I get is something like this:
> 123 Main StreetSuite3Bellevue
> WA 98111
> I have tried using CHAR(10) + CHAR(13) instead of just CHAR(10), but I get
> double spaces. Does RS handle CHAR() output? Do I need to use separate fields?|||Thanks. Your answer got me going in the right direction. I didn't get the
Chr(10) to work in the actual field expression, but chr(10) + chr(13) did.
For the benefit of future thread readers...I went a step further and created
a code block in the Report|Report Parameters command to make things a little
cleaner. It easily handles the common case where the second address line is
empty (Note: my query returns an empty string rather than a NULL if there is
no Address2). My code is this:
Function BuildAddress(ByVal A1 As String, ByVal A2 As String, ByVal C AS
String) As String
Dim strReturn As String
=Code.BuildAddress(Fields!Address.Value, Fields!Address2.Value,
Fields!CSZ.Value)
If A2.Length > 0 Then
strReturn += A2 + chr(10) + chr(13)
End If
strReturn += C
Return strReturn
End Function
And then I used the following expression in the textbox:
=Code.BuildAddress(
"David Bienstock" wrote:
> I've done this before but in the actual field expression not in the query.
> Use Fields!Address.Value + CHR(10) + Fields!Address.Value + ...
> "Rick" wrote:
> > I am making a query for mailing labels that I will generate in Reporting
> > Services. I have a SQL Server stored procedure that returns the address using
> > SQL like this
> >
> > SELECT Address + CHAR(13) + Address2 + CHAR(13) + City + ' ' + State + ' '
> > + Zip AS FullAddress
> > FROM ...
> >
> > Assume the data is:
> > Address: 123 Main Street
> > Address2: Suite 3
> > City: Bellevue
> > State: WA
> > Zip: 98111
> >
> > I assign the FullAddress field to a textbox in Reporting Services. I resize
> > it to be several lines high. The result I get is something like this:
> >
> > 123 Main StreetSuite3Bellevue
> > WA 98111
> >
> > I have tried using CHAR(10) + CHAR(13) instead of just CHAR(10), but I get
> > double spaces. Does RS handle CHAR() output? Do I need to use separate fields?

Sunday, March 11, 2012

does Internet Explorer generate logs.

Hi,

I have an query.

Does Internet Explorer generate logs files. If so where does the files get generated.

Thanks in advance.

Try www.sysinternals.com filemon to determine where logging is happening.

What kind of log are you looking for? IE logs your internet history in your documents & settings - temporary internet files. IE 7 has it's own log source in Event Viewer.

Depending on your logging needs, you may need a 3rd-party tool.

You may have better luck in a different group, since this isn't really related to Reporting Services.

cheers,

Andrew

Friday, March 9, 2012

Does DBREINDEX run longer on tables with lower scan density

I am looking into a way to generate and execute DBCC DBREINDEX statements
during scheduled down time. For a particular table - I need to be able to
estimate how long it will take to REINDEX a particular table.
Let say for example I have a table that had 25000 extents and
1) the ScanDensity was 50.
2) the ScanDensity was 15.
Would it take SIGNIFICANTLY longer to REINDEX the table if it had a
ScanDensity of 15 (as opposed to 50)?
Thanks in advance
Tom-- TJTODD wrote: --
> Would it take SIGNIFICANTLY longer to REINDEX the table if it had a
> ScanDensity of 15 (as opposed to 50)?
--
Hi Tom,
I have not found any official documentation on this area. The only way to find out is to do your own empirical benchmarks.
Hope this helps,
-Eric Cárdenas
SQL Server support|||Tom,
The only thing I can think of is that it will obviously take longer time for SQL Server to scan the
source data if the scan density is low. I'd think that in the whole, this would count as marginal,
though.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"TJTODD" <Thxomasx.Toddy@.Siemensx.com> wrote in message
news:OzZlndSuDHA.2304@.tk2msftngp13.phx.gbl...
> I am looking into a way to generate and execute DBCC DBREINDEX statements
> during scheduled down time. For a particular table - I need to be able to
> estimate how long it will take to REINDEX a particular table.
> Let say for example I have a table that had 25000 extents and
> 1) the ScanDensity was 50.
> 2) the ScanDensity was 15.
> Would it take SIGNIFICANTLY longer to REINDEX the table if it had a
> ScanDensity of 15 (as opposed to 50)?
> Thanks in advance
> Tom
>