Showing posts with label truncated. Show all posts
Showing posts with label truncated. Show all posts

Sunday, February 19, 2012

checking log space usage

I have a database where the log fills up and has to be truncated. I am
trying to create a jo that would run every ten minutes check the log and
write the results into another database to see at what time at night the log
fills up. Anyone have experience with this or advice greatly appreciated.Tom,
Here is a way to get all of the log space usage very quickly. After that
you can keep what you need and follow any other process that is necessary.
CREATE TABLE #LogUse
(DatabaseName nvarchar(100),
LogSize real,
PercentUsed real,
StatusValue INT,
MeasureTime datetime DEFAULT GETDATE())
INSERT INTO #LogUse (DatabaseName, LogSize, PercentUsed,StatusValue)
EXEC ('dbcc sqlperf(logspace)')
SELECT * FROM #LogUse
RLF
"Tom Reis" <reistom@.cdnet.cod.edu> wrote in message
news:e97JDYkpIHA.3900@.TK2MSFTNGP05.phx.gbl...
>I have a database where the log fills up and has to be truncated. I am
>trying to create a jo that would run every ten minutes check the log and
>write the results into another database to see at what time at night the
>log fills up. Anyone have experience with this or advice greatly
>appreciated.
>|||On Apr 25, 3:05=A0am, "Russell Fields" <russellfie...@.nomail.com> wrote:
> Tom,
> Here is a way to get all of the log space usage very quickly. =A0After tha=t
> you can keep what you need and follow any other process that is necessary.=
> CREATE TABLE #LogUse
> (DatabaseName nvarchar(100),
> LogSize real,
> PercentUsed real,
> StatusValue INT,
> MeasureTime datetime DEFAULT GETDATE())
> INSERT INTO #LogUse (DatabaseName, LogSize, PercentUsed,StatusValue)
> EXEC ('dbcc sqlperf(logspace)')
> SELECT * FROM #LogUse
> RLF
> "Tom Reis" <reis...@.cdnet.cod.edu> wrote in message
> news:e97JDYkpIHA.3900@.TK2MSFTNGP05.phx.gbl...
>
> >I have a database where the log fills up and has to be truncated. I am
> >trying to create a jo that would run every ten minutes check the log and
> >write the results into another database to see at what time at night the
> >log fills up. Anyone have experience with this or advice greatly
> >appreciated.- Hide quoted text -
> - Show quoted text -
Hi,
You should also find out the reasons why the log fills so quickly ,
probably the below link should be useful to you.
http://support.microsoft.com/kb/110139/en-us
Thanks
Ajay Rengunthwar
MCTS,MCDBA,MCAD

Sunday, February 12, 2012

Checkbox with the same name truncates at a space

When I use SQL to populate a checkbox and give the checkboxes all the same name, when I retrieve it a name containing a space is truncated at the space. How can I get the whole name?

<%while NOT rs.EOF%>
<INPUT TYPE=CHECKBOX NAME="code" value=<%=rs("code")%> <%If request.Form("code") = rs("code") then%> CHECKED <%End If%>><%=rs("code")%><br>
<%rs.MoveNext
wend
rs.Close%>

strStatus_code = Request.Form("code")

gives me Active, Inactive, Phase

what I want is gives me Active, Inactive, Phase Out

:confused:This is not a problem with SQL, but with the way you are writing out the values.

Place quotes around the value when you write them out for display, so that when you do a view source from the browser you should see.

"Active"
"Inactive"
"Phase Out"

<%while NOT rs.EOF%>
<INPUT TYPE=CHECKBOX NAME="code" value=" <%=rs("code")%>"
<%If request.Form("code") = rs("code") then%> CHECKED <%End If%>>" <%=rs("code")%>" <br>
<%rs.MoveNext
wend
rs.Close%>|||Worked perfectly!! Thank you.:) :) Suzy