Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Tuesday, March 27, 2012

Default FTData Location

I recently redistributed our database data files from one large VRAID5 disk
(G to 3 VRAID1 disks (T:, U:, V. At this point, I have moved everything
(including SQLAgent output & log files, job logs, tlogs, backups) EXCEPT:
1) FTDATA folder and its contents;
2) distmdl.mdf and distmdl.ldf
We do not use Full Text Searching, nor do we use replication. However, in
the interest of not leaving a ticking time bomb for someone who might later
want to use these features, I'd like to move these to drive T:.
Question 1: Is there an easy way to change the default location for FT
catalogs since I'm not even using full text right now? I found
http://support.microsoft.com/kb/240867/en-us for FTDATA but was hoping for a
simpler solution.
Question 2: How do I tell SQL where distmdl is if I enable replication? The
database doesn't appear to be attached in Ent Manager.
1) http://support.microsoft.com/kb/817296
2) when you create the distribution database you will be prompted where you
want to place the database files.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"CarolinaKB" <CarolinaKB@.discussions.microsoft.com> wrote in message
news:AA566260-3CA2-44AB-A910-D2BBEEEF0529@.microsoft.com...
>I recently redistributed our database data files from one large VRAID5 disk
> (G to 3 VRAID1 disks (T:, U:, V. At this point, I have moved
> everything
> (including SQLAgent output & log files, job logs, tlogs, backups) EXCEPT:
> 1) FTDATA folder and its contents;
> 2) distmdl.mdf and distmdl.ldf
> We do not use Full Text Searching, nor do we use replication. However, in
> the interest of not leaving a ticking time bomb for someone who might
> later
> want to use these features, I'd like to move these to drive T:.
> Question 1: Is there an easy way to change the default location for FT
> catalogs since I'm not even using full text right now? I found
> http://support.microsoft.com/kb/240867/en-us for FTDATA but was hoping for
> a
> simpler solution.
> Question 2: How do I tell SQL where distmdl is if I enable replication?
> The
> database doesn't appear to be attached in Ent Manager.
>
>
|||Thanks for the info.
"Hilary Cotter" wrote:

> 1) http://support.microsoft.com/kb/817296
> 2) when you create the distribution database you will be prompted where you
> want to place the database files.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "CarolinaKB" <CarolinaKB@.discussions.microsoft.com> wrote in message
> news:AA566260-3CA2-44AB-A910-D2BBEEEF0529@.microsoft.com...
>
>
|||Okay, one other question. What do I do with the existing distmdl? Do I
simply move the .mdf & .ldf whereever I want to, or delete them?
"Hilary Cotter" wrote:

> 1) http://support.microsoft.com/kb/817296
> 2) when you create the distribution database you will be prompted where you
> want to place the database files.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "CarolinaKB" <CarolinaKB@.discussions.microsoft.com> wrote in message
> news:AA566260-3CA2-44AB-A910-D2BBEEEF0529@.microsoft.com...
>
>
|||do the following sp_helpdistributor and sp_helpdistributiondb. These will
tell you if the distributor is installed and if the distribution database
files you see are the ones in use.
DO NOT DELETE distmdl.mdf or distmdl.ldf as these are the model distribution
database files. If you delete these you won't be able to install replication
again.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"CarolinaKB" <CarolinaKB@.discussions.microsoft.com> wrote in message
news:87E3E406-96C8-408E-93D4-6BB86E93331F@.microsoft.com...[vbcol=seagreen]
> Okay, one other question. What do I do with the existing distmdl? Do I
> simply move the .mdf & .ldf whereever I want to, or delete them?
> "Hilary Cotter" wrote:

Default Filegrowth

Can anyone comment as to why MS would have changed the default filegrowth for data files from 10% to 1MB in 2005? I just got unpleasantly surprised by that one. I cannot come up with a reason for this change other than maybe autogrowth of data files is deemed irrelevent with instant file initialization.Aynway, you can change that by setting the default growth of the model database file to your appropiate value which will act as a template for new databases.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hello Jens -

That was my first thought as well, but I think it is only partially true. If you create your database with SSMS, then yes changing model will help you. If, however, you use CREATE DATABASE, then the default will always be 1 MB. Therefore, as a DBA you must always be mindful of this change since the databases you support could be created in any number of ways (manually, install programs, consultants, etc.).

I still cannot think of a scenario where there is an advantage to having 1 MB instead of 10% as the default. Seems like a regression to me.

Monday, March 19, 2012

Decreased performance from using blobs

I'm trying to store files such as pdfs in my SQL Server as blobs for a particular .NET application and I'm noticing a rather large performance hit when compared to if the pdf was simply stored in the web server's file system.

I have a pdf of 7MB. If this is on a web server it takes roughly 9 seconds to download. When I store the same pdf in my database and then write it onto the page using the code below it takes roughly 40 seconds to display. Can anyone help me to improve this performance difference? Should I not be using this method to store large files?

Dim PdfCol As Integer = 0 ' the column # of the BLOB field
Dim dr As SqlDataReader = cmd.ExecuteReader()

If dr.Read() Then
Dim mypdf(dr.GetBytes(PdfCol, 0, Nothing, 0, Integer.MaxValue) - 1) As Byte
dr.GetBytes(PdfCol, 0, mypdf, 0, mypdf.Length)
End If

Response.Clear()
Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(mypdf)
Response.Flush()
Response.Close()* Turn off output cache, so that the first data can be sent immediatly.
* Do NOT load the whole thing into memory and send it out. Instead grab little chunks and thend them. Start with 8k, then take like 64k a trip.
Currently you only start sending data once the hole 7mb are loaded from the database, and this is ridiculously inefficient.|||By output cache, do you mean the output in the Page/UC directive?
Also, could you show me an example of grabbing chunks and sending them out? I'm not real experienced with using bytes.

I tried the following but I get a dialogue window that says "The file is damaged and can not be repaired."

If dr.Read() Then
Dim intBufferSize As Integer = 64000
Dim longStartIndex As Long = 0
Dim longRetVal As Long
Dim b(intBufferSize) As Byte

'Read through the first chunk of the document
longRetVal = dr.GetBytes(PdfCol, 0, b, 0, intBufferSize)

'Reset the start index.
longStartIndex = 0

Response.Clear()
Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"

'Continue reading and writing while there are bytes beyond the size of the buffer.
While longRetVal = intBufferSize
Response.BinaryWrite(b)
Response.Flush()

'Reposition the start index to the end of the last buffer and fill the buffer.
longStartIndex += intBufferSize
longRetVal = dr.GetBytes(PdfCol, longStartIndex, b, 0, intBufferSize)
End While

'Write the remaining buffer.
Response.BinaryWrite(b)
Response.Flush()
Response.Close()
End If|||Ok, I've managed to write my blob in chunks to a specified path on my hard drive using the code from: http://support.microsoft.com/default.aspx?kbid=317043
But whenever I try to use a Response.BinaryWrite so that the pdf is loaded onto the web page with ContentType set to "application/pdf" or "application/octet-stream" I get the same error that the file is damaged and cannot be repaired.|||Thona you are awesome! I forgot to mention that earlier :)

I did finally get this to work. Apparently if my buffer size is too large the file gets corrupted. I set my buffer size to 24000 and everything seems to work ok, but if the buffer size is 29000 then the file gets corrupted. Anyone know why this is? Can bytes only be a certain size?

decrease the size of Sql backup files

Hi,
I am looking for sql tool that it could shrink the sql data backup and log
files size.
I know one software called litespeed. There is any more good software that
could do the same function as litespeed does?
Thanks,Sonasafe by SonaSoft
SQL Safe by Idera
SQL Backup by Red Gate Software|||thanks,
"mecn" <mecn2002@.yahoo.com> wrote in message
news:Ob9yTYNLGHA.1424@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I am looking for sql tool that it could shrink the sql data backup and log
> files size.
> I know one software called litespeed. There is any more good software that
> could do the same function as litespeed does?
> Thanks,
>

decrease the size of Sql backup files

Hi,
I am looking for sql tool that it could shrink the sql data backup and log
files size.
I know one software called litespeed. There is any more good software that
could do the same function as litespeed does?
Thanks,
Sonasafe by SonaSoft
SQL Safe by Idera
SQL Backup by Red Gate Software
|||thanks,
"mecn" <mecn2002@.yahoo.com> wrote in message
news:Ob9yTYNLGHA.1424@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I am looking for sql tool that it could shrink the sql data backup and log
> files size.
> I know one software called litespeed. There is any more good software that
> could do the same function as litespeed does?
> Thanks,
>

decrease the size of Sql backup files

Hi,
I am looking for sql tool that it could shrink the sql data backup and log
files size.
I know one software called litespeed. There is any more good software that
could do the same function as litespeed does?
Thanks,Sonasafe by SonaSoft
SQL Safe by Idera
SQL Backup by Red Gate Software|||thanks,
"mecn" <mecn2002@.yahoo.com> wrote in message
news:Ob9yTYNLGHA.1424@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I am looking for sql tool that it could shrink the sql data backup and log
> files size.
> I know one software called litespeed. There is any more good software that
> could do the same function as litespeed does?
> Thanks,
>

Decoding SQL Profiler .trc files into text?

Is there a method available to turn a Profiler .trc file into its text
equivalent? We would like to run some parsing tools against Profiler files
but they need to be in some form of delimited text. Doesn't it?
I think you would have to use fn_trace_gettable first to load it into SQL
and then export the table to a text file. In SQL2005 you can use SMO to read
a trace from code (e.g. C#,VB.NET) and do what you want with it. You can
also read running traces using both SMO and fn_trace_gettable (in SQL2000
the trace has to be stopped in order to acces it).
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Snake" <Snake@.discussions.microsoft.com> wrote in message
news:035B663B-AA0A-4CAE-A1EA-92D2114DC1FB@.microsoft.com...
> Is there a method available to turn a Profiler .trc file into its text
> equivalent? We would like to run some parsing tools against Profiler
> files
> but they need to be in some form of delimited text. Doesn't it?

Sunday, February 19, 2012

Debugging Log Files...

I'm having trouble with a few subscriptions getting emailed.
They are showing "email sent" in their status.
I remember a while ago, finding a post about a log file I can
read that showed transactions and their error or success messages,
but I can't find it now. I didn't have to look in the database, it was a
physical file.
Can anyone tell me where the transaction logs for RS 2000 are?Hi isideveloper,
Thank you for using MSDN Managed Newsgroup Support.
From your description, my understanding of this issue is: you want to know
where are the log files of Reporting Services 2000. If I misunderstood your
concern, please feel free to let me know.
By default, the trace log files of Reporting Servicec 2000 are localed at
\Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles
folder.
Reporting Services provides three trace log files, they are:
ReportServerService_<timestamp>.log Trace log for the Report
Server Windows service and Web service.
ReportServerWebApp_<timestamp>.log Trace log for Report Manager.
ReportServer_<timestamp>.log Trace log for the report server engine.
To resolve your subscription issue, please check these log files and post
the error message here. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

DeBugging

Ive been given the Schema's for XML files we will be sent. Ive managed to
struggle to get this far using SQLXML , and im at loss of where to turn next.
Im very new to the whole XML format, and the Schema's given have include
statements which doesnt help. Im getting this error ;
<?xml version="1.0"?>
<Result State="FAILED">
<Error><HResult>0x8000FFFF
</HResult>
<Description><![CDATA[Schema: relationship expected on
'OriginatingAccount'.]]>
</Description>
<Source>Schema mapping</Source><Type>FATAL</Type></Error></Result>
but have no idea where to start looking to fix the problem. Is there a way i
can debug the process, and at least manage to find which schema is causing
the problem
Find the element declaration for "'OriginatingAccount'" and add the
necessary relationship annotation for the mapping.
Best regards
Michael
"Peter Newman" <PeterNewman@.discussions.microsoft.com> wrote in message
news:BD8789F4-507F-47D9-A2C4-F7CF22CACE94@.microsoft.com...
> Ive been given the Schema's for XML files we will be sent. Ive managed to
> struggle to get this far using SQLXML , and im at loss of where to turn
> next.
> Im very new to the whole XML format, and the Schema's given have include
> statements which doesnt help. Im getting this error ;
> <?xml version="1.0"?>
> <Result State="FAILED">
> <Error><HResult>0x8000FFFF
> </HResult>
> <Description><![CDATA[Schema: relationship expected on
> 'OriginatingAccount'.]]>
> </Description>
> <Source>Schema mapping</Source><Type>FATAL</Type></Error></Result>
> but have no idea where to start looking to fix the problem. Is there a way
> i
> can debug the process, and at least manage to find which schema is causing
> the problem

Tuesday, February 14, 2012

debug memory dumps

So can one use WinDbg to debug SQL dumps and also the Windows OS related
memory.dmp files ?
If so, is there a good introductory tutorial on how to setup and use it ? I
dont intend to be a pro here, but just experiment and do some first level of
diagnosis
Thanks
There are a few items you can glean from the dumps but mostly you have to
send it into support. The symbols are not public. Check out Bob Ward's
chapter in "SQL Server 2005 Practical Troubleshooting" or his PASS session
recording if you have access.
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
"Hassan" <hassan@.hotmail.com> wrote in message
news:%23N0yEocPIHA.1184@.TK2MSFTNGP04.phx.gbl...
> So can one use WinDbg to debug SQL dumps and also the Windows OS related
> memory.dmp files ?
> If so, is there a good introductory tutorial on how to setup and use it ?
> I dont intend to be a pro here, but just experiment and do some first
> level of diagnosis
> Thanks
>

debug memory dumps

So can one use WinDbg to debug SQL dumps and also the Windows OS related
memory.dmp files ?
If so, is there a good introductory tutorial on how to setup and use it ? I
dont intend to be a pro here, but just experiment and do some first level of
diagnosis
ThanksThere are a few items you can glean from the dumps but mostly you have to
send it into support. The symbols are not public. Check out Bob Ward's
chapter in "SQL Server 2005 Practical Troubleshooting" or his PASS session
recording if you have access.
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
"Hassan" <hassan@.hotmail.com> wrote in message
news:%23N0yEocPIHA.1184@.TK2MSFTNGP04.phx.gbl...
> So can one use WinDbg to debug SQL dumps and also the Windows OS related
> memory.dmp files ?
> If so, is there a good introductory tutorial on how to setup and use it ?
> I dont intend to be a pro here, but just experiment and do some first
> level of diagnosis
> Thanks
>

debug memory dumps

So can one use WinDbg to debug SQL dumps and also the Windows OS related
memory.dmp files ?
If so, is there a good introductory tutorial on how to setup and use it ? I
dont intend to be a pro here, but just experiment and do some first level of
diagnosis
ThanksThere are a few items you can glean from the dumps but mostly you have to
send it into support. The symbols are not public. Check out Bob Ward's
chapter in "SQL Server 2005 Practical Troubleshooting" or his PASS session
recording if you have access.
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
"Hassan" <hassan@.hotmail.com> wrote in message
news:%23N0yEocPIHA.1184@.TK2MSFTNGP04.phx.gbl...
> So can one use WinDbg to debug SQL dumps and also the Windows OS related
> memory.dmp files ?
> If so, is there a good introductory tutorial on how to setup and use it ?
> I dont intend to be a pro here, but just experiment and do some first
> level of diagnosis
> Thanks
>

Deault location for RSTempFiles

I currently have RS installed on my C: drive. Unfortunately, I did not
realize how much free space I was going to need for temp files, so now I'm
running out of space on my C: drive and RS restarts several times during a
schedule. Is it possible for me to point RSTempFiles to another drive
letter? I've searched for configuration files and the registry, but can't
find anything.
ThanksYes it is possible. It is documented in the SP1 readme. You can find this
here:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm
Just search for RSTempFiles.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"troark" <t.roark@.excite.com.n0sp@.m> wrote in message
news:ei0jQFJpEHA.3896@.TK2MSFTNGP15.phx.gbl...
> I currently have RS installed on my C: drive. Unfortunately, I did not
> realize how much free space I was going to need for temp files, so now I'm
> running out of space on my C: drive and RS restarts several times during a
> schedule. Is it possible for me to point RSTempFiles to another drive
> letter? I've searched for configuration files and the registry, but can't
> find anything.
> Thanks
>|||Great. Worked like a charm!
Thanks
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:eEtgK8JpEHA.644@.tk2msftngp13.phx.gbl...
> Yes it is possible. It is documented in the SP1 readme. You can find
this
> here:
>
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79dd
aa510/SP1Readme_EN.htm
> Just search for RSTempFiles.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "troark" <t.roark@.excite.com.n0sp@.m> wrote in message
> news:ei0jQFJpEHA.3896@.TK2MSFTNGP15.phx.gbl...
> > I currently have RS installed on my C: drive. Unfortunately, I did not
> > realize how much free space I was going to need for temp files, so now
I'm
> > running out of space on my C: drive and RS restarts several times during
a
> > schedule. Is it possible for me to point RSTempFiles to another drive
> > letter? I've searched for configuration files and the registry, but
can't
> > find anything.
> >
> > Thanks
> >
> >
>