Is there a way to display the "Last Run Date" in the actual report?The short answer is no, though you could try writing a custom assembly that
passes a report path on the server and then return the ExecutionDate
property via soap.
The properties you will need to build the report path are ReportServerURL,
ReportFolder, and ReportName.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"St Matthew" <StMatthew@.discussions.microsoft.com> wrote in message
news:FE56C3C8-9FB6-4320-9AF9-8FD3C3612AC2@.microsoft.com...
> Is there a way to display the "Last Run Date" in the actual report?|||Do you really want the "Last Run Date", or do you just want to know the
actual timestamp of data and report processing of a particular report (or
history snapshot)?
If it is the latter one, then just add a textbox with =Now to the report.
When the report is rendered live and no execution caching is involved, then
the expression will return the current timestamp (because the data and the
report layout is processed live). If execution caching is involved the
textbox with have the timestamp of the execution snapshot. Finally, if you
render an historic snapshot, the textbox will have the timestamp when the
snapshot has been created (unless you re-process a parameterized history
snapshot where expressions will get re-evaluated).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bruce Johnson [MSFT]" <brucejoh@.online.microsoft.com> wrote in message
news:ewzyGxTlEHA.3876@.TK2MSFTNGP15.phx.gbl...
> The short answer is no, though you could try writing a custom assembly
that
> passes a report path on the server and then return the ExecutionDate
> property via soap.
> The properties you will need to build the report path are ReportServerURL,
> ReportFolder, and ReportName.
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "St Matthew" <StMatthew@.discussions.microsoft.com> wrote in message
> news:FE56C3C8-9FB6-4320-9AF9-8FD3C3612AC2@.microsoft.com...
> > Is there a way to display the "Last Run Date" in the actual report?
>
2012年3月29日星期四
Diskspace problem running tuning advisor after server profiler?!
Hi,
I am trying to run a session in Database tuning advisor on a ~8G database
and the workload is ~350M. During the session, diskspace on drive C is
running low, it's using more than 3G after a while.
Which database/location is the tuning advisor using for temporary files?
Drive C is too small, and I want to change the setting to use drive E for
example. Anyone knows how to do this?
Thanks!
ValentijnHi
If the DTA is using tempdb space you would be able to see this, by looking
at the file sizes; but if you suddenly regain this space after the program is
stopped then it is more likely to be temporary files in the temp directory.
In general it is best practice if you move the temp directories away from the
system disc onto a drive that is less critical if it fills up.
John
"Valentijn" wrote:
> Hi,
> I am trying to run a session in Database tuning advisor on a ~8G database
> and the workload is ~350M. During the session, diskspace on drive C is
> running low, it's using more than 3G after a while.
> Which database/location is the tuning advisor using for temporary files?
> Drive C is too small, and I want to change the setting to use drive E for
> example. Anyone knows how to do this?
> Thanks!
> Valentijn|||Microsoft recommends using of these tools on another machine if possible,
not on the production one.
--
Ekrem Ã?nsoy
"Valentijn" <Valentijn@.discussions.microsoft.com> wrote in message
news:B3C3E818-D440-4A0E-8D5C-5489D45C62F8@.microsoft.com...
> Hi,
> I am trying to run a session in Database tuning advisor on a ~8G database
> and the workload is ~350M. During the session, diskspace on drive C is
> running low, it's using more than 3G after a while.
> Which database/location is the tuning advisor using for temporary files?
> Drive C is too small, and I want to change the setting to use drive E for
> example. Anyone knows how to do this?
> Thanks!
> Valentijn|||Hi
If you are only talking about SQL Profiler and not DTA then it certainly
does use space in the temp folder.
John
"John Bell" wrote:
> Hi
> If the DTA is using tempdb space you would be able to see this, by looking
> at the file sizes; but if you suddenly regain this space after the program is
> stopped then it is more likely to be temporary files in the temp directory.
> In general it is best practice if you move the temp directories away from the
> system disc onto a drive that is less critical if it fills up.
> John
> "Valentijn" wrote:
> > Hi,
> >
> > I am trying to run a session in Database tuning advisor on a ~8G database
> > and the workload is ~350M. During the session, diskspace on drive C is
> > running low, it's using more than 3G after a while.
> >
> > Which database/location is the tuning advisor using for temporary files?
> > Drive C is too small, and I want to change the setting to use drive E for
> > example. Anyone knows how to do this?
> >
> > Thanks!
> >
> > Valentijn|||Hi John,
Thanks for the answer. I'm using the Tuning Advisor from the GUI (Management
console), so I'm not using the commandline tool DTA directly.
The SQL Profiler runs fine, but the diskspace problem occurs when running
the tuning advisor. And yes, the diskspace suddenly comes back after stopping
the tuning advisor.
One of the things I will try monday at work is changing the temp folder.
Would I do that by just changeing the environment variable TEMP?
Furthermore, how can I see DTA (or the graphical version) does use the
tempdb? I looked at the filesize op tempmdb.mdf (and the other system
databases, but they were not growing during the tuning session)..
Thanks again,
Valentijn
"John Bell" wrote:
> Hi
> If you are only talking about SQL Profiler and not DTA then it certainly
> does use space in the temp folder.
> John
> "John Bell" wrote:
> > Hi
> >
> > If the DTA is using tempdb space you would be able to see this, by looking
> > at the file sizes; but if you suddenly regain this space after the program is
> > stopped then it is more likely to be temporary files in the temp directory.
> > In general it is best practice if you move the temp directories away from the
> > system disc onto a drive that is less critical if it fills up.
> >
> > John
> >
> > "Valentijn" wrote:
> >
> > > Hi,
> > >
> > > I am trying to run a session in Database tuning advisor on a ~8G database
> > > and the workload is ~350M. During the session, diskspace on drive C is
> > > running low, it's using more than 3G after a while.
> > >
> > > Which database/location is the tuning advisor using for temporary files?
> > > Drive C is too small, and I want to change the setting to use drive E for
> > > example. Anyone knows how to do this?
> > >
> > > Thanks!
> > >
> > > Valentijn|||Hi
If the space is reclaimed once you have stopped dta then it is not tempdb
that is being used as the tempdb file would remain enlarged. sp_helpfile or
sp_helpdb from a query window would tell you the size of tempdb files
before, during and again after you ran the wizard if you ran it several
times. You could also use the perfmon counters to monitor database file sizes.
From BOL: Database Engine Tuning Advisor stores tuning session data and
other information in the msdb database. Implement an appropriate backup
strategy for the msdb database to avoid the risk of losing tuning session
data.
Again you can use the above methods to monitor the size of msdb but you say
these have not changed which again points to files being created in the temp
folder.
You need to set the temp environment variable before starting the database
tuning advisor.
John
"Valentijn" wrote:
> Hi John,
> Thanks for the answer. I'm using the Tuning Advisor from the GUI (Management
> console), so I'm not using the commandline tool DTA directly.
> The SQL Profiler runs fine, but the diskspace problem occurs when running
> the tuning advisor. And yes, the diskspace suddenly comes back after stopping
> the tuning advisor.
> One of the things I will try monday at work is changing the temp folder.
> Would I do that by just changeing the environment variable TEMP?
> Furthermore, how can I see DTA (or the graphical version) does use the
> tempdb? I looked at the filesize op tempmdb.mdf (and the other system
> databases, but they were not growing during the tuning session)..
> Thanks again,
> Valentijn
> "John Bell" wrote:
> > Hi
> >
> > If you are only talking about SQL Profiler and not DTA then it certainly
> > does use space in the temp folder.
> >
> > John
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > If the DTA is using tempdb space you would be able to see this, by looking
> > > at the file sizes; but if you suddenly regain this space after the program is
> > > stopped then it is more likely to be temporary files in the temp directory.
> > > In general it is best practice if you move the temp directories away from the
> > > system disc onto a drive that is less critical if it fills up.
> > >
> > > John
> > >
> > > "Valentijn" wrote:
> > >
> > > > Hi,
> > > >
> > > > I am trying to run a session in Database tuning advisor on a ~8G database
> > > > and the workload is ~350M. During the session, diskspace on drive C is
> > > > running low, it's using more than 3G after a while.
> > > >
> > > > Which database/location is the tuning advisor using for temporary files?
> > > > Drive C is too small, and I want to change the setting to use drive E for
> > > > example. Anyone knows how to do this?
> > > >
> > > > Thanks!
> > > >
> > > > Valentijn
I am trying to run a session in Database tuning advisor on a ~8G database
and the workload is ~350M. During the session, diskspace on drive C is
running low, it's using more than 3G after a while.
Which database/location is the tuning advisor using for temporary files?
Drive C is too small, and I want to change the setting to use drive E for
example. Anyone knows how to do this?
Thanks!
ValentijnHi
If the DTA is using tempdb space you would be able to see this, by looking
at the file sizes; but if you suddenly regain this space after the program is
stopped then it is more likely to be temporary files in the temp directory.
In general it is best practice if you move the temp directories away from the
system disc onto a drive that is less critical if it fills up.
John
"Valentijn" wrote:
> Hi,
> I am trying to run a session in Database tuning advisor on a ~8G database
> and the workload is ~350M. During the session, diskspace on drive C is
> running low, it's using more than 3G after a while.
> Which database/location is the tuning advisor using for temporary files?
> Drive C is too small, and I want to change the setting to use drive E for
> example. Anyone knows how to do this?
> Thanks!
> Valentijn|||Microsoft recommends using of these tools on another machine if possible,
not on the production one.
--
Ekrem Ã?nsoy
"Valentijn" <Valentijn@.discussions.microsoft.com> wrote in message
news:B3C3E818-D440-4A0E-8D5C-5489D45C62F8@.microsoft.com...
> Hi,
> I am trying to run a session in Database tuning advisor on a ~8G database
> and the workload is ~350M. During the session, diskspace on drive C is
> running low, it's using more than 3G after a while.
> Which database/location is the tuning advisor using for temporary files?
> Drive C is too small, and I want to change the setting to use drive E for
> example. Anyone knows how to do this?
> Thanks!
> Valentijn|||Hi
If you are only talking about SQL Profiler and not DTA then it certainly
does use space in the temp folder.
John
"John Bell" wrote:
> Hi
> If the DTA is using tempdb space you would be able to see this, by looking
> at the file sizes; but if you suddenly regain this space after the program is
> stopped then it is more likely to be temporary files in the temp directory.
> In general it is best practice if you move the temp directories away from the
> system disc onto a drive that is less critical if it fills up.
> John
> "Valentijn" wrote:
> > Hi,
> >
> > I am trying to run a session in Database tuning advisor on a ~8G database
> > and the workload is ~350M. During the session, diskspace on drive C is
> > running low, it's using more than 3G after a while.
> >
> > Which database/location is the tuning advisor using for temporary files?
> > Drive C is too small, and I want to change the setting to use drive E for
> > example. Anyone knows how to do this?
> >
> > Thanks!
> >
> > Valentijn|||Hi John,
Thanks for the answer. I'm using the Tuning Advisor from the GUI (Management
console), so I'm not using the commandline tool DTA directly.
The SQL Profiler runs fine, but the diskspace problem occurs when running
the tuning advisor. And yes, the diskspace suddenly comes back after stopping
the tuning advisor.
One of the things I will try monday at work is changing the temp folder.
Would I do that by just changeing the environment variable TEMP?
Furthermore, how can I see DTA (or the graphical version) does use the
tempdb? I looked at the filesize op tempmdb.mdf (and the other system
databases, but they were not growing during the tuning session)..
Thanks again,
Valentijn
"John Bell" wrote:
> Hi
> If you are only talking about SQL Profiler and not DTA then it certainly
> does use space in the temp folder.
> John
> "John Bell" wrote:
> > Hi
> >
> > If the DTA is using tempdb space you would be able to see this, by looking
> > at the file sizes; but if you suddenly regain this space after the program is
> > stopped then it is more likely to be temporary files in the temp directory.
> > In general it is best practice if you move the temp directories away from the
> > system disc onto a drive that is less critical if it fills up.
> >
> > John
> >
> > "Valentijn" wrote:
> >
> > > Hi,
> > >
> > > I am trying to run a session in Database tuning advisor on a ~8G database
> > > and the workload is ~350M. During the session, diskspace on drive C is
> > > running low, it's using more than 3G after a while.
> > >
> > > Which database/location is the tuning advisor using for temporary files?
> > > Drive C is too small, and I want to change the setting to use drive E for
> > > example. Anyone knows how to do this?
> > >
> > > Thanks!
> > >
> > > Valentijn|||Hi
If the space is reclaimed once you have stopped dta then it is not tempdb
that is being used as the tempdb file would remain enlarged. sp_helpfile or
sp_helpdb from a query window would tell you the size of tempdb files
before, during and again after you ran the wizard if you ran it several
times. You could also use the perfmon counters to monitor database file sizes.
From BOL: Database Engine Tuning Advisor stores tuning session data and
other information in the msdb database. Implement an appropriate backup
strategy for the msdb database to avoid the risk of losing tuning session
data.
Again you can use the above methods to monitor the size of msdb but you say
these have not changed which again points to files being created in the temp
folder.
You need to set the temp environment variable before starting the database
tuning advisor.
John
"Valentijn" wrote:
> Hi John,
> Thanks for the answer. I'm using the Tuning Advisor from the GUI (Management
> console), so I'm not using the commandline tool DTA directly.
> The SQL Profiler runs fine, but the diskspace problem occurs when running
> the tuning advisor. And yes, the diskspace suddenly comes back after stopping
> the tuning advisor.
> One of the things I will try monday at work is changing the temp folder.
> Would I do that by just changeing the environment variable TEMP?
> Furthermore, how can I see DTA (or the graphical version) does use the
> tempdb? I looked at the filesize op tempmdb.mdf (and the other system
> databases, but they were not growing during the tuning session)..
> Thanks again,
> Valentijn
> "John Bell" wrote:
> > Hi
> >
> > If you are only talking about SQL Profiler and not DTA then it certainly
> > does use space in the temp folder.
> >
> > John
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > If the DTA is using tempdb space you would be able to see this, by looking
> > > at the file sizes; but if you suddenly regain this space after the program is
> > > stopped then it is more likely to be temporary files in the temp directory.
> > > In general it is best practice if you move the temp directories away from the
> > > system disc onto a drive that is less critical if it fills up.
> > >
> > > John
> > >
> > > "Valentijn" wrote:
> > >
> > > > Hi,
> > > >
> > > > I am trying to run a session in Database tuning advisor on a ~8G database
> > > > and the workload is ~350M. During the session, diskspace on drive C is
> > > > running low, it's using more than 3G after a while.
> > > >
> > > > Which database/location is the tuning advisor using for temporary files?
> > > > Drive C is too small, and I want to change the setting to use drive E for
> > > > example. Anyone knows how to do this?
> > > >
> > > > Thanks!
> > > >
> > > > Valentijn
DiskIO value in sp_who2
When I run sp_who2, the result set contains a column 'DiskIO'.
I want to know if this values shows total number of physical Page Read or
Write by a process. Is my understanding correct?This column is most likely referencing to physical_io column in sysprocesses
table.
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>|||It is a combination of Physical and Logical I/O that is cumulative from the
start of the connection.
Andrew J. Kelly SQL MVP
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>sql
I want to know if this values shows total number of physical Page Read or
Write by a process. Is my understanding correct?This column is most likely referencing to physical_io column in sysprocesses
table.
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>|||It is a combination of Physical and Logical I/O that is cumulative from the
start of the connection.
Andrew J. Kelly SQL MVP
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>sql
DiskIO value in sp_who2
When I run sp_who2, the result set contains a column 'DiskIO'.
I want to know if this values shows total number of physical Page Read or
Write by a process. Is my understanding correct?
This column is most likely referencing to physical_io column in sysprocesses
table.
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>
|||It is a combination of Physical and Logical I/O that is cumulative from the
start of the connection.
Andrew J. Kelly SQL MVP
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>
I want to know if this values shows total number of physical Page Read or
Write by a process. Is my understanding correct?
This column is most likely referencing to physical_io column in sysprocesses
table.
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>
|||It is a combination of Physical and Logical I/O that is cumulative from the
start of the connection.
Andrew J. Kelly SQL MVP
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>
DiskIO value in sp_who2
When I run sp_who2, the result set contains a column 'DiskIO'.
I want to know if this values shows total number of physical Page Read or
Write by a process. Is my understanding correct?This column is most likely referencing to physical_io column in sysprocesses
table.
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>|||It is a combination of Physical and Logical I/O that is cumulative from the
start of the connection.
Andrew J. Kelly SQL MVP
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>
I want to know if this values shows total number of physical Page Read or
Write by a process. Is my understanding correct?This column is most likely referencing to physical_io column in sysprocesses
table.
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>|||It is a combination of Physical and Logical I/O that is cumulative from the
start of the connection.
Andrew J. Kelly SQL MVP
"Sumanta Gayen" <SumantaGayen@.discussions.microsoft.com> wrote in message
news:3ED22FD8-E4CC-46F6-A263-E4C092A988C8@.microsoft.com...
> When I run sp_who2, the result set contains a column 'DiskIO'.
> I want to know if this values shows total number of physical Page Read or
> Write by a process. Is my understanding correct?
>
>
2012年3月27日星期二
Disk space
Hi does anyone know what I can do to alert me when the
disk space starts to run out
thanks for any help MikeySee reply in .programming
John
"Mikey" <anonymous@.discussions.microsoft.com> wrote in message
news:140f801c3f7f8$e81ed270$a401280a@.phx
.gbl...
> Hi does anyone know what I can do to alert me when the
> disk space starts to run out
> thanks for any help Mikey|||This works for me.
checkdrives.vbs run in task schededuler every hour
'***********************************
'Monitors Drive Space and emails if below threshhold
'Application Variables
'Message tagged to the bottom of each email
Dim sEmailBlurb
sEmailBlurb = " " & VbCrLf & VbCrLf & VbCrLf & "WARNING - This email and any
attachments may be confidential. If received in error, please delete and
inform us by return email." & VbCrLf & VbCrLf &_
"Because emails and attachments may be interfered with, may contain computer
viruses or other defects and may not be successfully replicated on other
systems, you must be cautious." & VbCrLf &_
"CokeShop cannot guarantee that what you receive is what we sent. If you
have any doubts about the authenticity of an email by CokeShop, please
contact us immediately. " & VbCrLf &_
"It is also important to check for viruses and defects before opening or
using attachments. CokeShop's liability is limited to resupplying any
affected attachments." & VbCrLf & VbCrLf &_
"CokeShop Online ABN is xx xxx xxx xxx."
On error resume next
'Application Variables
Dim sEmailFrom, sEmailTo, sMyMailServer, sDriveC, sDriveD, sBodyText,
sSubject
sEmailFrom = "xxx@.assoft.com.au"
sEmailTo = "yyy@.assoft.com.au"
sConEmailMonitor = "zzz@.assoft.com.au"
sMyMailServer = "assoftsvr"
iEmailPort = 25
'Does drive C: or D: have less than 3 gigabyte free if so email support
sDriveC = RetDriveSpace("c:\")
sDriveD = RetDriveSpace("d:\")
If Trim(sDriveC & sDriveD) <> "" Then
sBodyText = "CokeShop Hard Drive Storage, is getting low on space" & vbcrlf
& _
"Please rectify this problem Urgently" & VbCrLf & VbCrLf & _
"Drive C: =" & sDriveC & " Drive D: =" & sDriveD & VbCrLf &
VbCrLf & _
"Automated email from CokeShop System " & VbCrLf &
FormatDateTime(Now,1)
sSubject = "CokeShop Drive space low !!!"
SendEmail sSubject,sBodyText
End If
Function RetDriveSpace(drvpath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(fso.GetAbsolutePathName(drvpath)))
If FormatNumber(d.AvailableSpace/(1024 * 1000000), 1) < 3 Then
s = FormatNumber(d.AvailableSpace/(1024 * 1000000), 1)
End If
RetDriveSpace = s
Set fso = Nothing
Set d = Nothing
End Function
Function SendEmail(sSubJect, sBody)
'***************************************
***************
'*** Send the message Using CDOSYS Win2k & Win2003 ****
'***************************************
***************
' CDO mail object
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserverport") = iEmailPort
cdoConfig.Fields.Item(sch & "smtpserver") = sMyMailServer
cdoConfig.fields.update
Set cdoMessage = CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = sEmailFrom
cdoMessage.To = sEmailTo
cdoMessage.BCC = sConEmailMonitor
cdoMessage.Subject = sSubJect
cdoMessage.TextBody = sBody & sEmailBlurb
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenti
cate").value = 1 ' use clear text authenticate
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendpassword
").value ="mypassword"
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendusername
").value ="yourusername"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") =
"High"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Priority") = 2
cdoMessage.Fields.Item("urn:schemas:mailheader:Keywords") = "COKESHOP"
cdoMessage.Fields.Item("urn:schemas:mailheader:Sensitivity") =
"Company-Confidential"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Message-Flag") = "Do
not Forward"
cdoMessage.Fields.Update
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End Function
'***************************************
******
"Mikey" <anonymous@.discussions.microsoft.com> wrote in message
news:140f801c3f7f8$e81ed270$a401280a@.phx
.gbl...
> Hi does anyone know what I can do to alert me when the
> disk space starts to run out
> thanks for any help Mikeysql
disk space starts to run out
thanks for any help MikeySee reply in .programming
John
"Mikey" <anonymous@.discussions.microsoft.com> wrote in message
news:140f801c3f7f8$e81ed270$a401280a@.phx
.gbl...
> Hi does anyone know what I can do to alert me when the
> disk space starts to run out
> thanks for any help Mikey|||This works for me.
checkdrives.vbs run in task schededuler every hour
'***********************************
'Monitors Drive Space and emails if below threshhold
'Application Variables
'Message tagged to the bottom of each email
Dim sEmailBlurb
sEmailBlurb = " " & VbCrLf & VbCrLf & VbCrLf & "WARNING - This email and any
attachments may be confidential. If received in error, please delete and
inform us by return email." & VbCrLf & VbCrLf &_
"Because emails and attachments may be interfered with, may contain computer
viruses or other defects and may not be successfully replicated on other
systems, you must be cautious." & VbCrLf &_
"CokeShop cannot guarantee that what you receive is what we sent. If you
have any doubts about the authenticity of an email by CokeShop, please
contact us immediately. " & VbCrLf &_
"It is also important to check for viruses and defects before opening or
using attachments. CokeShop's liability is limited to resupplying any
affected attachments." & VbCrLf & VbCrLf &_
"CokeShop Online ABN is xx xxx xxx xxx."
On error resume next
'Application Variables
Dim sEmailFrom, sEmailTo, sMyMailServer, sDriveC, sDriveD, sBodyText,
sSubject
sEmailFrom = "xxx@.assoft.com.au"
sEmailTo = "yyy@.assoft.com.au"
sConEmailMonitor = "zzz@.assoft.com.au"
sMyMailServer = "assoftsvr"
iEmailPort = 25
'Does drive C: or D: have less than 3 gigabyte free if so email support
sDriveC = RetDriveSpace("c:\")
sDriveD = RetDriveSpace("d:\")
If Trim(sDriveC & sDriveD) <> "" Then
sBodyText = "CokeShop Hard Drive Storage, is getting low on space" & vbcrlf
& _
"Please rectify this problem Urgently" & VbCrLf & VbCrLf & _
"Drive C: =" & sDriveC & " Drive D: =" & sDriveD & VbCrLf &
VbCrLf & _
"Automated email from CokeShop System " & VbCrLf &
FormatDateTime(Now,1)
sSubject = "CokeShop Drive space low !!!"
SendEmail sSubject,sBodyText
End If
Function RetDriveSpace(drvpath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(fso.GetAbsolutePathName(drvpath)))
If FormatNumber(d.AvailableSpace/(1024 * 1000000), 1) < 3 Then
s = FormatNumber(d.AvailableSpace/(1024 * 1000000), 1)
End If
RetDriveSpace = s
Set fso = Nothing
Set d = Nothing
End Function
Function SendEmail(sSubJect, sBody)
'***************************************
***************
'*** Send the message Using CDOSYS Win2k & Win2003 ****
'***************************************
***************
' CDO mail object
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserverport") = iEmailPort
cdoConfig.Fields.Item(sch & "smtpserver") = sMyMailServer
cdoConfig.fields.update
Set cdoMessage = CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = sEmailFrom
cdoMessage.To = sEmailTo
cdoMessage.BCC = sConEmailMonitor
cdoMessage.Subject = sSubJect
cdoMessage.TextBody = sBody & sEmailBlurb
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenti
cate").value = 1 ' use clear text authenticate
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendpassword
").value ="mypassword"
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendusername
").value ="yourusername"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") =
"High"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Priority") = 2
cdoMessage.Fields.Item("urn:schemas:mailheader:Keywords") = "COKESHOP"
cdoMessage.Fields.Item("urn:schemas:mailheader:Sensitivity") =
"Company-Confidential"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Message-Flag") = "Do
not Forward"
cdoMessage.Fields.Update
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End Function
'***************************************
******
"Mikey" <anonymous@.discussions.microsoft.com> wrote in message
news:140f801c3f7f8$e81ed270$a401280a@.phx
.gbl...
> Hi does anyone know what I can do to alert me when the
> disk space starts to run out
> thanks for any help Mikeysql
Disk space
Hi does anyone know what I can do to alert me when the
disk space starts to run out
thanks for any help MikeyDoesn't your hardware manuafacturer have an snmp probe for
you to manage this?
Example - Dell has Open Manage and Compaq has CIM
Paul
>--Original Message--
>Hi does anyone know what I can do to alert me when the
>disk space starts to run out
>thanks for any help Mikey
>.
>|||See reply in .programming
John
"Mikey" <anonymous@.discussions.microsoft.com> wrote in message
news:140f801c3f7f8$e81ed270$a401280a@.phx.gbl...
> Hi does anyone know what I can do to alert me when the
> disk space starts to run out
> thanks for any help Mikey|||This works for me.
checkdrives.vbs run in task schededuler every hour
'***********************************
'Monitors Drive Space and emails if below threshhold
'Application Variables
'Message tagged to the bottom of each email
Dim sEmailBlurb
sEmailBlurb = " " & VbCrLf & VbCrLf & VbCrLf & "WARNING - This email and any
attachments may be confidential. If received in error, please delete and
inform us by return email." & VbCrLf & VbCrLf &_
"Because emails and attachments may be interfered with, may contain computer
viruses or other defects and may not be successfully replicated on other
systems, you must be cautious." & VbCrLf &_
"CokeShop cannot guarantee that what you receive is what we sent. If you
have any doubts about the authenticity of an email by CokeShop, please
contact us immediately. " & VbCrLf &_
"It is also important to check for viruses and defects before opening or
using attachments. CokeShop's liability is limited to resupplying any
affected attachments." & VbCrLf & VbCrLf &_
"CokeShop Online ABN is xx xxx xxx xxx."
On error resume next
'Application Variables
Dim sEmailFrom, sEmailTo, sMyMailServer, sDriveC, sDriveD, sBodyText,
sSubject
sEmailFrom = "xxx@.assoft.com.au"
sEmailTo = "yyy@.assoft.com.au"
sConEmailMonitor = "zzz@.assoft.com.au"
sMyMailServer = "assoftsvr"
iEmailPort = 25
'Does drive C: or D: have less than 3 gigabyte free if so email support
sDriveC = RetDriveSpace("c:\")
sDriveD = RetDriveSpace("d:\")
If Trim(sDriveC & sDriveD) <> "" Then
sBodyText = "CokeShop Hard Drive Storage, is getting low on space" & vbcrlf
& _
"Please rectify this problem Urgently" & VbCrLf & VbCrLf & _
"Drive C: =" & sDriveC & " Drive D: =" & sDriveD & VbCrLf &
VbCrLf & _
"Automated email from CokeShop System " & VbCrLf &
FormatDateTime(Now,1)
sSubject = "CokeShop Drive space low !!!"
SendEmail sSubject,sBodyText
End If
Function RetDriveSpace(drvpath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(fso.GetAbsolutePathName(drvpath)))
If FormatNumber(d.AvailableSpace/(1024 * 1000000), 1) < 3 Then
s = FormatNumber(d.AvailableSpace/(1024 * 1000000), 1)
End If
RetDriveSpace = s
Set fso = Nothing
Set d = Nothing
End Function
Function SendEmail(sSubJect, sBody)
'******************************************************
'*** Send the message Using CDOSYS Win2k & Win2003 ****
'******************************************************
' CDO mail object
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserverport") = iEmailPort
cdoConfig.Fields.Item(sch & "smtpserver") = sMyMailServer
cdoConfig.fields.update
Set cdoMessage = CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = sEmailFrom
cdoMessage.To = sEmailTo
cdoMessage.BCC = sConEmailMonitor
cdoMessage.Subject = sSubJect
cdoMessage.TextBody = sBody & sEmailBlurb
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenti
cate").value = 1 ' use clear text authenticate
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendpassword
").value ="mypassword"
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendusername
").value ="yourusername"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") ="High"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Priority") = 2
cdoMessage.Fields.Item("urn:schemas:mailheader:Keywords") = "COKESHOP"
cdoMessage.Fields.Item("urn:schemas:mailheader:Sensitivity") ="Company-Confidential"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Message-Flag") = "Do
not Forward"
cdoMessage.Fields.Update
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End Function
'*********************************************
"Mikey" <anonymous@.discussions.microsoft.com> wrote in message
news:140f801c3f7f8$e81ed270$a401280a@.phx.gbl...
> Hi does anyone know what I can do to alert me when the
> disk space starts to run out
> thanks for any help Mikey
disk space starts to run out
thanks for any help MikeyDoesn't your hardware manuafacturer have an snmp probe for
you to manage this?
Example - Dell has Open Manage and Compaq has CIM
Paul
>--Original Message--
>Hi does anyone know what I can do to alert me when the
>disk space starts to run out
>thanks for any help Mikey
>.
>|||See reply in .programming
John
"Mikey" <anonymous@.discussions.microsoft.com> wrote in message
news:140f801c3f7f8$e81ed270$a401280a@.phx.gbl...
> Hi does anyone know what I can do to alert me when the
> disk space starts to run out
> thanks for any help Mikey|||This works for me.
checkdrives.vbs run in task schededuler every hour
'***********************************
'Monitors Drive Space and emails if below threshhold
'Application Variables
'Message tagged to the bottom of each email
Dim sEmailBlurb
sEmailBlurb = " " & VbCrLf & VbCrLf & VbCrLf & "WARNING - This email and any
attachments may be confidential. If received in error, please delete and
inform us by return email." & VbCrLf & VbCrLf &_
"Because emails and attachments may be interfered with, may contain computer
viruses or other defects and may not be successfully replicated on other
systems, you must be cautious." & VbCrLf &_
"CokeShop cannot guarantee that what you receive is what we sent. If you
have any doubts about the authenticity of an email by CokeShop, please
contact us immediately. " & VbCrLf &_
"It is also important to check for viruses and defects before opening or
using attachments. CokeShop's liability is limited to resupplying any
affected attachments." & VbCrLf & VbCrLf &_
"CokeShop Online ABN is xx xxx xxx xxx."
On error resume next
'Application Variables
Dim sEmailFrom, sEmailTo, sMyMailServer, sDriveC, sDriveD, sBodyText,
sSubject
sEmailFrom = "xxx@.assoft.com.au"
sEmailTo = "yyy@.assoft.com.au"
sConEmailMonitor = "zzz@.assoft.com.au"
sMyMailServer = "assoftsvr"
iEmailPort = 25
'Does drive C: or D: have less than 3 gigabyte free if so email support
sDriveC = RetDriveSpace("c:\")
sDriveD = RetDriveSpace("d:\")
If Trim(sDriveC & sDriveD) <> "" Then
sBodyText = "CokeShop Hard Drive Storage, is getting low on space" & vbcrlf
& _
"Please rectify this problem Urgently" & VbCrLf & VbCrLf & _
"Drive C: =" & sDriveC & " Drive D: =" & sDriveD & VbCrLf &
VbCrLf & _
"Automated email from CokeShop System " & VbCrLf &
FormatDateTime(Now,1)
sSubject = "CokeShop Drive space low !!!"
SendEmail sSubject,sBodyText
End If
Function RetDriveSpace(drvpath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(fso.GetAbsolutePathName(drvpath)))
If FormatNumber(d.AvailableSpace/(1024 * 1000000), 1) < 3 Then
s = FormatNumber(d.AvailableSpace/(1024 * 1000000), 1)
End If
RetDriveSpace = s
Set fso = Nothing
Set d = Nothing
End Function
Function SendEmail(sSubJect, sBody)
'******************************************************
'*** Send the message Using CDOSYS Win2k & Win2003 ****
'******************************************************
' CDO mail object
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserverport") = iEmailPort
cdoConfig.Fields.Item(sch & "smtpserver") = sMyMailServer
cdoConfig.fields.update
Set cdoMessage = CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = sEmailFrom
cdoMessage.To = sEmailTo
cdoMessage.BCC = sConEmailMonitor
cdoMessage.Subject = sSubJect
cdoMessage.TextBody = sBody & sEmailBlurb
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenti
cate").value = 1 ' use clear text authenticate
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendpassword
").value ="mypassword"
'
cdoMessage.item("http://schemas.microsoft.com/cdo/configuration/sendusername
").value ="yourusername"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") ="High"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Priority") = 2
cdoMessage.Fields.Item("urn:schemas:mailheader:Keywords") = "COKESHOP"
cdoMessage.Fields.Item("urn:schemas:mailheader:Sensitivity") ="Company-Confidential"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Message-Flag") = "Do
not Forward"
cdoMessage.Fields.Update
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End Function
'*********************************************
"Mikey" <anonymous@.discussions.microsoft.com> wrote in message
news:140f801c3f7f8$e81ed270$a401280a@.phx.gbl...
> Hi does anyone know what I can do to alert me when the
> disk space starts to run out
> thanks for any help Mikey
2012年3月22日星期四
Disk defrag
Is ok to run a disk defrag using the native windows tool on a local array
that houses SQL databases?It should be fine; but take a full database backup of all databases before
defrag. Stop SQL Server service, otherwise the data files will be locked and
won't be accessible to defrag. DisKeeper will be a good option.
But Physical disk defragmentation quite often is not needed, but
defragmentation within databases (REINDEXING) is good.
Thanks
Hari
"Tim" <Tim@.discussions.microsoft.com> wrote in message
news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
> Is ok to run a disk defrag using the native windows tool on a local array
> that houses SQL databases?|||See this article as well..
http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:udhRWnxpHHA.3312@.TK2MSFTNGP05.phx.gbl...
> It should be fine; but take a full database backup of all databases before
> defrag. Stop SQL Server service, otherwise the data files will be locked
> and
> won't be accessible to defrag. DisKeeper will be a good option.
> But Physical disk defragmentation quite often is not needed, but
> defragmentation within databases (REINDEXING) is good.
> Thanks
> Hari
>
> "Tim" <Tim@.discussions.microsoft.com> wrote in message
> news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
>|||Thanks for the infosql
that houses SQL databases?It should be fine; but take a full database backup of all databases before
defrag. Stop SQL Server service, otherwise the data files will be locked and
won't be accessible to defrag. DisKeeper will be a good option.
But Physical disk defragmentation quite often is not needed, but
defragmentation within databases (REINDEXING) is good.
Thanks
Hari
"Tim" <Tim@.discussions.microsoft.com> wrote in message
news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
> Is ok to run a disk defrag using the native windows tool on a local array
> that houses SQL databases?|||See this article as well..
http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:udhRWnxpHHA.3312@.TK2MSFTNGP05.phx.gbl...
> It should be fine; but take a full database backup of all databases before
> defrag. Stop SQL Server service, otherwise the data files will be locked
> and
> won't be accessible to defrag. DisKeeper will be a good option.
> But Physical disk defragmentation quite often is not needed, but
> defragmentation within databases (REINDEXING) is good.
> Thanks
> Hari
>
> "Tim" <Tim@.discussions.microsoft.com> wrote in message
> news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
>|||Thanks for the infosql
Disk defrag
Is ok to run a disk defrag using the native windows tool on a local array
that houses SQL databases?
It should be fine; but take a full database backup of all databases before
defrag. Stop SQL Server service, otherwise the data files will be locked and
won't be accessible to defrag. DisKeeper will be a good option.
But Physical disk defragmentation quite often is not needed, but
defragmentation within databases (REINDEXING) is good.
Thanks
Hari
"Tim" <Tim@.discussions.microsoft.com> wrote in message
news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
> Is ok to run a disk defrag using the native windows tool on a local array
> that houses SQL databases?
|||See this article as well..
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:udhRWnxpHHA.3312@.TK2MSFTNGP05.phx.gbl...
> It should be fine; but take a full database backup of all databases before
> defrag. Stop SQL Server service, otherwise the data files will be locked
> and
> won't be accessible to defrag. DisKeeper will be a good option.
> But Physical disk defragmentation quite often is not needed, but
> defragmentation within databases (REINDEXING) is good.
> Thanks
> Hari
>
> "Tim" <Tim@.discussions.microsoft.com> wrote in message
> news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
>
|||Thanks for the info
that houses SQL databases?
It should be fine; but take a full database backup of all databases before
defrag. Stop SQL Server service, otherwise the data files will be locked and
won't be accessible to defrag. DisKeeper will be a good option.
But Physical disk defragmentation quite often is not needed, but
defragmentation within databases (REINDEXING) is good.
Thanks
Hari
"Tim" <Tim@.discussions.microsoft.com> wrote in message
news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
> Is ok to run a disk defrag using the native windows tool on a local array
> that houses SQL databases?
|||See this article as well..
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:udhRWnxpHHA.3312@.TK2MSFTNGP05.phx.gbl...
> It should be fine; but take a full database backup of all databases before
> defrag. Stop SQL Server service, otherwise the data files will be locked
> and
> won't be accessible to defrag. DisKeeper will be a good option.
> But Physical disk defragmentation quite often is not needed, but
> defragmentation within databases (REINDEXING) is good.
> Thanks
> Hari
>
> "Tim" <Tim@.discussions.microsoft.com> wrote in message
> news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
>
|||Thanks for the info
Disk defrag
Is ok to run a disk defrag using the native windows tool on a local array
that houses SQL databases?It should be fine; but take a full database backup of all databases before
defrag. Stop SQL Server service, otherwise the data files will be locked and
won't be accessible to defrag. DisKeeper will be a good option.
But Physical disk defragmentation quite often is not needed, but
defragmentation within databases (REINDEXING) is good.
Thanks
Hari
"Tim" <Tim@.discussions.microsoft.com> wrote in message
news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
> Is ok to run a disk defrag using the native windows tool on a local array
> that houses SQL databases?|||See this article as well..
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:udhRWnxpHHA.3312@.TK2MSFTNGP05.phx.gbl...
> It should be fine; but take a full database backup of all databases before
> defrag. Stop SQL Server service, otherwise the data files will be locked
> and
> won't be accessible to defrag. DisKeeper will be a good option.
> But Physical disk defragmentation quite often is not needed, but
> defragmentation within databases (REINDEXING) is good.
> Thanks
> Hari
>
> "Tim" <Tim@.discussions.microsoft.com> wrote in message
> news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
>> Is ok to run a disk defrag using the native windows tool on a local array
>> that houses SQL databases?
>|||Thanks for the info
that houses SQL databases?It should be fine; but take a full database backup of all databases before
defrag. Stop SQL Server service, otherwise the data files will be locked and
won't be accessible to defrag. DisKeeper will be a good option.
But Physical disk defragmentation quite often is not needed, but
defragmentation within databases (REINDEXING) is good.
Thanks
Hari
"Tim" <Tim@.discussions.microsoft.com> wrote in message
news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
> Is ok to run a disk defrag using the native windows tool on a local array
> that houses SQL databases?|||See this article as well..
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Thanks
Hari
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:udhRWnxpHHA.3312@.TK2MSFTNGP05.phx.gbl...
> It should be fine; but take a full database backup of all databases before
> defrag. Stop SQL Server service, otherwise the data files will be locked
> and
> won't be accessible to defrag. DisKeeper will be a good option.
> But Physical disk defragmentation quite often is not needed, but
> defragmentation within databases (REINDEXING) is good.
> Thanks
> Hari
>
> "Tim" <Tim@.discussions.microsoft.com> wrote in message
> news:3336DC2D-0FE2-4513-A002-BD24B4AA018D@.microsoft.com...
>> Is ok to run a disk defrag using the native windows tool on a local array
>> that houses SQL databases?
>|||Thanks for the info
2012年3月20日星期二
Disconnection when 'xp_cmd' is in a comment
If I run the following in Query Analyzer against Microsoft SQL Server
2000 - 8.00.818 while logged in as 'sa':
ALTER PROCEDURE __Test AS
BEGIN
/*
-- x p_cmd
*/
RETURN 0
END
GO
then all is well, but if I remove the space between the 'x' and the
'p' in the comment line then I get the following error:
[Microsoft][ODBC SQL Server Driver][TCP/IP
Sockets]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
ODBC: Msg 0, Level 16, State 1
Communication link failure
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
I am connecting remotely. Another user who is on the same domain as
the server does not have this problem. I assume some hardware or
software on the connection between the server and myself and the
server is causing the problem.
Does anyone have any idea what this could be?
Thanks
SylvesterIf it's hardware or software connectivity between you and
the server then you'd likely find something in the windows
event logs so you may want to start checking those.
-Sue
On 10 Oct 2004 22:01:39 -0700, junk@.riddell.co.nz
(Sylvester) wrote:
>If I run the following in Query Analyzer against Microsoft SQL Server
>2000 - 8.00.818 while logged in as 'sa':
>
> ALTER PROCEDURE __Test AS
> BEGIN
> /*
> -- x p_cmd
> */
> RETURN 0
> END
> GO
>then all is well, but if I remove the space between the 'x' and the
>'p' in the comment line then I get the following error:
> [Microsoft][ODBC SQL Server Driver][TCP/IP
>Sockets]ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> Connection Broken
>
>I am connecting remotely. Another user who is on the same domain as
>the server does not have this problem. I assume some hardware or
>software on the connection between the server and myself and the
>server is causing the problem.
>Does anyone have any idea what this could be?
>Thanks
>Sylvester
2000 - 8.00.818 while logged in as 'sa':
ALTER PROCEDURE __Test AS
BEGIN
/*
-- x p_cmd
*/
RETURN 0
END
GO
then all is well, but if I remove the space between the 'x' and the
'p' in the comment line then I get the following error:
[Microsoft][ODBC SQL Server Driver][TCP/IP
Sockets]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
ODBC: Msg 0, Level 16, State 1
Communication link failure
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
I am connecting remotely. Another user who is on the same domain as
the server does not have this problem. I assume some hardware or
software on the connection between the server and myself and the
server is causing the problem.
Does anyone have any idea what this could be?
Thanks
SylvesterIf it's hardware or software connectivity between you and
the server then you'd likely find something in the windows
event logs so you may want to start checking those.
-Sue
On 10 Oct 2004 22:01:39 -0700, junk@.riddell.co.nz
(Sylvester) wrote:
>If I run the following in Query Analyzer against Microsoft SQL Server
>2000 - 8.00.818 while logged in as 'sa':
>
> ALTER PROCEDURE __Test AS
> BEGIN
> /*
> -- x p_cmd
> */
> RETURN 0
> END
> GO
>then all is well, but if I remove the space between the 'x' and the
>'p' in the comment line then I get the following error:
> [Microsoft][ODBC SQL Server Driver][TCP/IP
>Sockets]ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> Connection Broken
>
>I am connecting remotely. Another user who is on the same domain as
>the server does not have this problem. I assume some hardware or
>software on the connection between the server and myself and the
>server is causing the problem.
>Does anyone have any idea what this could be?
>Thanks
>Sylvester
Disconnection when 'xp_cmd' is in a comment
If I run the following in Query Analyzer against Microsoft SQL Server
2000 - 8.00.818 while logged in as 'sa':
ALTER PROCEDURE __Test AS
BEGIN
/*
-- x p_cmd
*/
RETURN 0
END
GO
then all is well, but if I remove the space between the 'x' and the
'p' in the comment line then I get the following error:
[Microsoft][ODBC SQL Server Driver][TCP/IP
Sockets]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
ODBC: Msg 0, Level 16, State 1
Communication link failure
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
I am connecting remotely. Another user who is on the same domain as
the server does not have this problem. I assume some hardware or
software on the connection between the server and myself and the
server is causing the problem.
Does anyone have any idea what this could be?
Thanks
Sylvester
If it's hardware or software connectivity between you and
the server then you'd likely find something in the windows
event logs so you may want to start checking those.
-Sue
On 10 Oct 2004 22:01:39 -0700, junk@.riddell.co.nz
(Sylvester) wrote:
>If I run the following in Query Analyzer against Microsoft SQL Server
>2000 - 8.00.818 while logged in as 'sa':
>
> ALTER PROCEDURE __Test AS
> BEGIN
> /*
> -- x p_cmd
> */
>RETURN 0
> END
> GO
>then all is well, but if I remove the space between the 'x' and the
>'p' in the comment line then I get the following error:
> [Microsoft][ODBC SQL Server Driver][TCP/IP
>Sockets]ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> Connection Broken
>
>I am connecting remotely. Another user who is on the same domain as
>the server does not have this problem. I assume some hardware or
>software on the connection between the server and myself and the
>server is causing the problem.
>Does anyone have any idea what this could be?
>Thanks
>Sylvester
2000 - 8.00.818 while logged in as 'sa':
ALTER PROCEDURE __Test AS
BEGIN
/*
-- x p_cmd
*/
RETURN 0
END
GO
then all is well, but if I remove the space between the 'x' and the
'p' in the comment line then I get the following error:
[Microsoft][ODBC SQL Server Driver][TCP/IP
Sockets]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
ODBC: Msg 0, Level 16, State 1
Communication link failure
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
I am connecting remotely. Another user who is on the same domain as
the server does not have this problem. I assume some hardware or
software on the connection between the server and myself and the
server is causing the problem.
Does anyone have any idea what this could be?
Thanks
Sylvester
If it's hardware or software connectivity between you and
the server then you'd likely find something in the windows
event logs so you may want to start checking those.
-Sue
On 10 Oct 2004 22:01:39 -0700, junk@.riddell.co.nz
(Sylvester) wrote:
>If I run the following in Query Analyzer against Microsoft SQL Server
>2000 - 8.00.818 while logged in as 'sa':
>
> ALTER PROCEDURE __Test AS
> BEGIN
> /*
> -- x p_cmd
> */
>RETURN 0
> END
> GO
>then all is well, but if I remove the space between the 'x' and the
>'p' in the comment line then I get the following error:
> [Microsoft][ODBC SQL Server Driver][TCP/IP
>Sockets]ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> Connection Broken
>
>I am connecting remotely. Another user who is on the same domain as
>the server does not have this problem. I assume some hardware or
>software on the connection between the server and myself and the
>server is causing the problem.
>Does anyone have any idea what this could be?
>Thanks
>Sylvester
Disconnection when 'xp_cmd' is in a comment
If I run the following in Query Analyzer against Microsoft SQL Server
2000 - 8.00.818 while logged in as 'sa':
ALTER PROCEDURE __Test AS
BEGIN
/*
-- x p_cmd
*/
RETURN 0
END
GO
then all is well, but if I remove the space between the 'x' and the
'p' in the comment line then I get the following error:
[Microsoft][ODBC SQL Server Driver][TCP/IP
Sockets]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
ODBC: Msg 0, Level 16, State 1
Communication link failure
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
I am connecting remotely. Another user who is on the same domain as
the server does not have this problem. I assume some hardware or
software on the connection between the server and myself and the
server is causing the problem.
Does anyone have any idea what this could be?
Thanks
SylvesterIf it's hardware or software connectivity between you and
the server then you'd likely find something in the windows
event logs so you may want to start checking those.
-Sue
On 10 Oct 2004 22:01:39 -0700, junk@.riddell.co.nz
(Sylvester) wrote:
>If I run the following in Query Analyzer against Microsoft SQL Server
>2000 - 8.00.818 while logged in as 'sa':
>
> ALTER PROCEDURE __Test AS
> BEGIN
> /*
> -- x p_cmd
> */
> RETURN 0
> END
> GO
>then all is well, but if I remove the space between the 'x' and the
>'p' in the comment line then I get the following error:
> [Microsoft][ODBC SQL Server Driver][TCP/IP
>Sockets]ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> Connection Broken
>
>I am connecting remotely. Another user who is on the same domain as
>the server does not have this problem. I assume some hardware or
>software on the connection between the server and myself and the
>server is causing the problem.
>Does anyone have any idea what this could be?
>Thanks
>Sylvester
2000 - 8.00.818 while logged in as 'sa':
ALTER PROCEDURE __Test AS
BEGIN
/*
-- x p_cmd
*/
RETURN 0
END
GO
then all is well, but if I remove the space between the 'x' and the
'p' in the comment line then I get the following error:
[Microsoft][ODBC SQL Server Driver][TCP/IP
Sockets]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
ODBC: Msg 0, Level 16, State 1
Communication link failure
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
I am connecting remotely. Another user who is on the same domain as
the server does not have this problem. I assume some hardware or
software on the connection between the server and myself and the
server is causing the problem.
Does anyone have any idea what this could be?
Thanks
SylvesterIf it's hardware or software connectivity between you and
the server then you'd likely find something in the windows
event logs so you may want to start checking those.
-Sue
On 10 Oct 2004 22:01:39 -0700, junk@.riddell.co.nz
(Sylvester) wrote:
>If I run the following in Query Analyzer against Microsoft SQL Server
>2000 - 8.00.818 while logged in as 'sa':
>
> ALTER PROCEDURE __Test AS
> BEGIN
> /*
> -- x p_cmd
> */
> RETURN 0
> END
> GO
>then all is well, but if I remove the space between the 'x' and the
>'p' in the comment line then I get the following error:
> [Microsoft][ODBC SQL Server Driver][TCP/IP
>Sockets]ConnectionCheckForData (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> Connection Broken
>
>I am connecting remotely. Another user who is on the same domain as
>the server does not have this problem. I assume some hardware or
>software on the connection between the server and myself and the
>server is causing the problem.
>Does anyone have any idea what this could be?
>Thanks
>Sylvester
2012年3月19日星期一
Disavantages of shrinking database
My database is growing bigger and bigger, and I am afraid it will run out of
disk space later on. I would like to shrink it, but I read somewhere that
shrinking is not a good idea if the database is still growing, because it
will slow down adding new records to the database. Would you please confirm
regarding the disadvantages of shrinking the database ? Thank you.you just nailed it on the head.
If you shrink it, the db will have to "AutoGrow" (Or manually grow) at
somepoint,.
this is an expensive operation.
Furthermore, shrinking and growing a db causes fragmentation which can
dramatically effect system performance.
You are far better off planning for more disk capacity asap.
Greg Jackson
PDX, Oregon|||http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
> My database is growing bigger and bigger, and I am afraid it will run out of
> disk space later on. I would like to shrink it, but I read somewhere that
> shrinking is not a good idea if the database is still growing, because it
> will slow down adding new records to the database. Would you please confirm
> regarding the disadvantages of shrinking the database ? Thank you.
>|||Thank you all for your replies.
If I delete a lot of data from the database, the next time new data need to
be added to the database, will it reuse the space from the old data or will
it keep growing the database ?
Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
>> My database is growing bigger and bigger, and I am afraid it will run out
>> of disk space later on. I would like to shrink it, but I read somewhere
>> that shrinking is not a good idea if the database is still growing,
>> because it will slow down adding new records to the database. Would you
>> please confirm regarding the disadvantages of shrinking the database ?
>> Thank you.|||It depends on how the layout of the data is indexes you have, what you cluster on, what data you
have deleted). In general, the space will be re-used, how long it will take (how much you have to
delete) depends on the details.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:uZzEcTAfFHA.1680@.TK2MSFTNGP09.phx.gbl...
> Thank you all for your replies.
> If I delete a lot of data from the database, the next time new data need to be added to the
> database, will it reuse the space from the old data or will it keep growing the database ?
> Thanks.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...
>> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "fniles" <fniles@.pfmail.com> wrote in message news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
>> My database is growing bigger and bigger, and I am afraid it will run out of disk space later
>> on. I would like to shrink it, but I read somewhere that shrinking is not a good idea if the
>> database is still growing, because it will slow down adding new records to the database. Would
>> you please confirm regarding the disadvantages of shrinking the database ? Thank you.
>
disk space later on. I would like to shrink it, but I read somewhere that
shrinking is not a good idea if the database is still growing, because it
will slow down adding new records to the database. Would you please confirm
regarding the disadvantages of shrinking the database ? Thank you.you just nailed it on the head.
If you shrink it, the db will have to "AutoGrow" (Or manually grow) at
somepoint,.
this is an expensive operation.
Furthermore, shrinking and growing a db causes fragmentation which can
dramatically effect system performance.
You are far better off planning for more disk capacity asap.
Greg Jackson
PDX, Oregon|||http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
> My database is growing bigger and bigger, and I am afraid it will run out of
> disk space later on. I would like to shrink it, but I read somewhere that
> shrinking is not a good idea if the database is still growing, because it
> will slow down adding new records to the database. Would you please confirm
> regarding the disadvantages of shrinking the database ? Thank you.
>|||Thank you all for your replies.
If I delete a lot of data from the database, the next time new data need to
be added to the database, will it reuse the space from the old data or will
it keep growing the database ?
Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
>> My database is growing bigger and bigger, and I am afraid it will run out
>> of disk space later on. I would like to shrink it, but I read somewhere
>> that shrinking is not a good idea if the database is still growing,
>> because it will slow down adding new records to the database. Would you
>> please confirm regarding the disadvantages of shrinking the database ?
>> Thank you.|||It depends on how the layout of the data is indexes you have, what you cluster on, what data you
have deleted). In general, the space will be re-used, how long it will take (how much you have to
delete) depends on the details.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:uZzEcTAfFHA.1680@.TK2MSFTNGP09.phx.gbl...
> Thank you all for your replies.
> If I delete a lot of data from the database, the next time new data need to be added to the
> database, will it reuse the space from the old data or will it keep growing the database ?
> Thanks.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...
>> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "fniles" <fniles@.pfmail.com> wrote in message news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
>> My database is growing bigger and bigger, and I am afraid it will run out of disk space later
>> on. I would like to shrink it, but I read somewhere that shrinking is not a good idea if the
>> database is still growing, because it will slow down adding new records to the database. Would
>> you please confirm regarding the disadvantages of shrinking the database ? Thank you.
>
Disavantages of shrinking database
My database is growing bigger and bigger, and I am afraid it will run out of
disk space later on. I would like to shrink it, but I read somewhere that
shrinking is not a good idea if the database is still growing, because it
will slow down adding new records to the database. Would you please confirm
regarding the disadvantages of shrinking the database ? Thank you.
you just nailed it on the head.
If you shrink it, the db will have to "AutoGrow" (Or manually grow) at
somepoint,.
this is an expensive operation.
Furthermore, shrinking and growing a db causes fragmentation which can
dramatically effect system performance.
You are far better off planning for more disk capacity asap.
Greg Jackson
PDX, Oregon
|||http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
> My database is growing bigger and bigger, and I am afraid it will run out of
> disk space later on. I would like to shrink it, but I read somewhere that
> shrinking is not a good idea if the database is still growing, because it
> will slow down adding new records to the database. Would you please confirm
> regarding the disadvantages of shrinking the database ? Thank you.
>
|||Thank you all for your replies.
If I delete a lot of data from the database, the next time new data need to
be added to the database, will it reuse the space from the old data or will
it keep growing the database ?
Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
|||It depends on how the layout of the data is indexes you have, what you cluster on, what data you
have deleted). In general, the space will be re-used, how long it will take (how much you have to
delete) depends on the details.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:uZzEcTAfFHA.1680@.TK2MSFTNGP09.phx.gbl...
> Thank you all for your replies.
> If I delete a lot of data from the database, the next time new data need to be added to the
> database, will it reuse the space from the old data or will it keep growing the database ?
> Thanks.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...
>
disk space later on. I would like to shrink it, but I read somewhere that
shrinking is not a good idea if the database is still growing, because it
will slow down adding new records to the database. Would you please confirm
regarding the disadvantages of shrinking the database ? Thank you.
you just nailed it on the head.
If you shrink it, the db will have to "AutoGrow" (Or manually grow) at
somepoint,.
this is an expensive operation.
Furthermore, shrinking and growing a db causes fragmentation which can
dramatically effect system performance.
You are far better off planning for more disk capacity asap.
Greg Jackson
PDX, Oregon
|||http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
> My database is growing bigger and bigger, and I am afraid it will run out of
> disk space later on. I would like to shrink it, but I read somewhere that
> shrinking is not a good idea if the database is still growing, because it
> will slow down adding new records to the database. Would you please confirm
> regarding the disadvantages of shrinking the database ? Thank you.
>
|||Thank you all for your replies.
If I delete a lot of data from the database, the next time new data need to
be added to the database, will it reuse the space from the old data or will
it keep growing the database ?
Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...
|||It depends on how the layout of the data is indexes you have, what you cluster on, what data you
have deleted). In general, the space will be re-used, how long it will take (how much you have to
delete) depends on the details.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:uZzEcTAfFHA.1680@.TK2MSFTNGP09.phx.gbl...
> Thank you all for your replies.
> If I delete a lot of data from the database, the next time new data need to be added to the
> database, will it reuse the space from the old data or will it keep growing the database ?
> Thanks.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...
>
Disavantages of shrinking database
My database is growing bigger and bigger, and I am afraid it will run out of
disk space later on. I would like to shrink it, but I read somewhere that
shrinking is not a good idea if the database is still growing, because it
will slow down adding new records to the database. Would you please confirm
regarding the disadvantages of shrinking the database ? Thank you.you just nailed it on the head.
If you shrink it, the db will have to "AutoGrow" (Or manually grow) at
somepoint,.
this is an expensive operation.
Furthermore, shrinking and growing a db causes fragmentation which can
dramatically effect system performance.
You are far better off planning for more disk capacity asap.
Greg Jackson
PDX, Oregon|||http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl..
.
> My database is growing bigger and bigger, and I am afraid it will run out
of
> disk space later on. I would like to shrink it, but I read somewhere that
> shrinking is not a good idea if the database is still growing, because it
> will slow down adding new records to the database. Would you please confir
m
> regarding the disadvantages of shrinking the database ? Thank you.
>|||Thank you all for your replies.
If I delete a lot of data from the database, the next time new data need to
be added to the database, will it reuse the space from the old data or will
it keep growing the database ?
Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...|||It depends on how the layout of the data is indexes you have, what you clus
ter on, what data you
have deleted). In general, the space will be re-used, how long it will take
(how much you have to
delete) depends on the details.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:uZzEcTAfFHA.1680@.TK2MSFTNGP09.phx.gbl...[
vbcol=seagreen]
> Thank you all for your replies.
> If I delete a lot of data from the database, the next time new data need t
o be added to the
> database, will it reuse the space from the old data or will it keep growin
g the database ?
> Thanks.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...
>[/vbcol]
disk space later on. I would like to shrink it, but I read somewhere that
shrinking is not a good idea if the database is still growing, because it
will slow down adding new records to the database. Would you please confirm
regarding the disadvantages of shrinking the database ? Thank you.you just nailed it on the head.
If you shrink it, the db will have to "AutoGrow" (Or manually grow) at
somepoint,.
this is an expensive operation.
Furthermore, shrinking and growing a db causes fragmentation which can
dramatically effect system performance.
You are far better off planning for more disk capacity asap.
Greg Jackson
PDX, Oregon|||http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl..
.
> My database is growing bigger and bigger, and I am afraid it will run out
of
> disk space later on. I would like to shrink it, but I read somewhere that
> shrinking is not a good idea if the database is still growing, because it
> will slow down adding new records to the database. Would you please confir
m
> regarding the disadvantages of shrinking the database ? Thank you.
>|||Thank you all for your replies.
If I delete a lot of data from the database, the next time new data need to
be added to the database, will it reuse the space from the old data or will
it keep growing the database ?
Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "fniles" <fniles@.pfmail.com> wrote in message
> news:%23EcwFBAfFHA.2700@.tk2msftngp13.phx.gbl...|||It depends on how the layout of the data is indexes you have, what you clus
ter on, what data you
have deleted). In general, the space will be re-used, how long it will take
(how much you have to
delete) depends on the details.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"fniles" <fniles@.pfmail.com> wrote in message news:uZzEcTAfFHA.1680@.TK2MSFTNGP09.phx.gbl...[
vbcol=seagreen]
> Thank you all for your replies.
> If I delete a lot of data from the database, the next time new data need t
o be added to the
> database, will it reuse the space from the old data or will it keep growin
g the database ?
> Thanks.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:OiKbtLAfFHA.1404@.TK2MSFTNGP09.phx.gbl...
>[/vbcol]
2012年2月24日星期五
Disabled job continues to run
Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
when you disable a scheduled job, it would no longer run. Do you really have
to disable the schedule inside of the job in order to keep the job from
running and not just disable the job itself?
Thanks,
Jon
Disabling the job should be fine. Can you check the history and see who is
invoking it? Could it be that there's another job that runs this job using
sp_start_job?
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> when you disable a scheduled job, it would no longer run. Do you really
have
> to disable the schedule inside of the job in order to keep the job from
> running and not just disable the job itself?
> Thanks,
> Jon
|||Yes, I was thinking that may be the case also but I can find no evidence of
anyone or anything that was invoking the job other than its own schedule.
Once I disabled the schedule it stopped.
"Narayana Vyas Kondreddi" wrote:
> Disabling the job should be fine. Can you check the history and see who is
> invoking it? Could it be that there's another job that runs this job using
> sp_start_job?
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> have
>
>
|||Hi,
After you have disabled the job, probably you could have checked "enabled"
column in sysjobs against this particular job, to see if its really been
disabled.
But its quite strange though.....
- - - - - - - - -
Thanks
Yogish
"Jon Goughnour" wrote:
[vbcol=seagreen]
> Yes, I was thinking that may be the case also but I can find no evidence of
> anyone or anything that was invoking the job other than its own schedule.
> Once I disabled the schedule it stopped.
> "Narayana Vyas Kondreddi" wrote:
|||Yes, quite strange. I wish I would've thought to check sysjobs but
unfortunately I didn't. I'm going to play around with this a little more on
a test server. Thanks.
"Yogish" wrote:
[vbcol=seagreen]
> Hi,
> After you have disabled the job, probably you could have checked "enabled"
> column in sysjobs against this particular job, to see if its really been
> disabled.
> But its quite strange though.....
> --
> - - - - - - - - -
> Thanks
> Yogish
>
> "Jon Goughnour" wrote:
when you disable a scheduled job, it would no longer run. Do you really have
to disable the schedule inside of the job in order to keep the job from
running and not just disable the job itself?
Thanks,
Jon
Disabling the job should be fine. Can you check the history and see who is
invoking it? Could it be that there's another job that runs this job using
sp_start_job?
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> when you disable a scheduled job, it would no longer run. Do you really
have
> to disable the schedule inside of the job in order to keep the job from
> running and not just disable the job itself?
> Thanks,
> Jon
|||Yes, I was thinking that may be the case also but I can find no evidence of
anyone or anything that was invoking the job other than its own schedule.
Once I disabled the schedule it stopped.
"Narayana Vyas Kondreddi" wrote:
> Disabling the job should be fine. Can you check the history and see who is
> invoking it? Could it be that there's another job that runs this job using
> sp_start_job?
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> have
>
>
|||Hi,
After you have disabled the job, probably you could have checked "enabled"
column in sysjobs against this particular job, to see if its really been
disabled.
But its quite strange though.....
- - - - - - - - -
Thanks
Yogish
"Jon Goughnour" wrote:
[vbcol=seagreen]
> Yes, I was thinking that may be the case also but I can find no evidence of
> anyone or anything that was invoking the job other than its own schedule.
> Once I disabled the schedule it stopped.
> "Narayana Vyas Kondreddi" wrote:
|||Yes, quite strange. I wish I would've thought to check sysjobs but
unfortunately I didn't. I'm going to play around with this a little more on
a test server. Thanks.
"Yogish" wrote:
[vbcol=seagreen]
> Hi,
> After you have disabled the job, probably you could have checked "enabled"
> column in sysjobs against this particular job, to see if its really been
> disabled.
> But its quite strange though.....
> --
> - - - - - - - - -
> Thanks
> Yogish
>
> "Jon Goughnour" wrote:
Disabled job continues to run
Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
when you disable a scheduled job, it would no longer run. Do you really hav
e
to disable the schedule inside of the job in order to keep the job from
running and not just disable the job itself?
Thanks,
JonDisabling the job should be fine. Can you check the history and see who is
invoking it? Could it be that there's another job that runs this job using
sp_start_job?
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> when you disable a scheduled job, it would no longer run. Do you really
have
> to disable the schedule inside of the job in order to keep the job from
> running and not just disable the job itself?
> Thanks,
> Jon|||Yes, I was thinking that may be the case also but I can find no evidence of
anyone or anything that was invoking the job other than its own schedule.
Once I disabled the schedule it stopped.
"Narayana Vyas Kondreddi" wrote:
> Disabling the job should be fine. Can you check the history and see who is
> invoking it? Could it be that there's another job that runs this job using
> sp_start_job?
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> have
>
>|||Hi,
After you have disabled the job, probably you could have checked "enabled"
column in sysjobs against this particular job, to see if its really been
disabled.
But its quite strange though.....
- - - - - - - - -
Thanks
Yogish
"Jon Goughnour" wrote:
[vbcol=seagreen]
> Yes, I was thinking that may be the case also but I can find no evidence o
f
> anyone or anything that was invoking the job other than its own schedule.
> Once I disabled the schedule it stopped.
> "Narayana Vyas Kondreddi" wrote:
>|||Yes, quite strange. I wish I would've thought to check sysjobs but
unfortunately I didn't. I'm going to play around with this a little more on
a test server. Thanks.
"Yogish" wrote:
[vbcol=seagreen]
> Hi,
> After you have disabled the job, probably you could have checked "enabled"
> column in sysjobs against this particular job, to see if its really been
> disabled.
> But its quite strange though.....
> --
> - - - - - - - - -
> Thanks
> Yogish
>
> "Jon Goughnour" wrote:
>
when you disable a scheduled job, it would no longer run. Do you really hav
e
to disable the schedule inside of the job in order to keep the job from
running and not just disable the job itself?
Thanks,
JonDisabling the job should be fine. Can you check the history and see who is
invoking it? Could it be that there's another job that runs this job using
sp_start_job?
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> when you disable a scheduled job, it would no longer run. Do you really
have
> to disable the schedule inside of the job in order to keep the job from
> running and not just disable the job itself?
> Thanks,
> Jon|||Yes, I was thinking that may be the case also but I can find no evidence of
anyone or anything that was invoking the job other than its own schedule.
Once I disabled the schedule it stopped.
"Narayana Vyas Kondreddi" wrote:
> Disabling the job should be fine. Can you check the history and see who is
> invoking it? Could it be that there's another job that runs this job using
> sp_start_job?
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> have
>
>|||Hi,
After you have disabled the job, probably you could have checked "enabled"
column in sysjobs against this particular job, to see if its really been
disabled.
But its quite strange though.....
- - - - - - - - -
Thanks
Yogish
"Jon Goughnour" wrote:
[vbcol=seagreen]
> Yes, I was thinking that may be the case also but I can find no evidence o
f
> anyone or anything that was invoking the job other than its own schedule.
> Once I disabled the schedule it stopped.
> "Narayana Vyas Kondreddi" wrote:
>|||Yes, quite strange. I wish I would've thought to check sysjobs but
unfortunately I didn't. I'm going to play around with this a little more on
a test server. Thanks.
"Yogish" wrote:
[vbcol=seagreen]
> Hi,
> After you have disabled the job, probably you could have checked "enabled"
> column in sysjobs against this particular job, to see if its really been
> disabled.
> But its quite strange though.....
> --
> - - - - - - - - -
> Thanks
> Yogish
>
> "Jon Goughnour" wrote:
>
Disabled job continues to run
Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
when you disable a scheduled job, it would no longer run. Do you really have
to disable the schedule inside of the job in order to keep the job from
running and not just disable the job itself?
Thanks,
JonDisabling the job should be fine. Can you check the history and see who is
invoking it? Could it be that there's another job that runs this job using
sp_start_job?
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> when you disable a scheduled job, it would no longer run. Do you really
have
> to disable the schedule inside of the job in order to keep the job from
> running and not just disable the job itself?
> Thanks,
> Jon|||Yes, I was thinking that may be the case also but I can find no evidence of
anyone or anything that was invoking the job other than its own schedule.
Once I disabled the schedule it stopped.
"Narayana Vyas Kondreddi" wrote:
> Disabling the job should be fine. Can you check the history and see who is
> invoking it? Could it be that there's another job that runs this job using
> sp_start_job?
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> > Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> > when you disable a scheduled job, it would no longer run. Do you really
> have
> > to disable the schedule inside of the job in order to keep the job from
> > running and not just disable the job itself?
> >
> > Thanks,
> >
> > Jon
>
>|||Hi,
After you have disabled the job, probably you could have checked "enabled"
column in sysjobs against this particular job, to see if its really been
disabled.
But its quite strange though.....
--
- - - - - - - - -
Thanks
Yogish
"Jon Goughnour" wrote:
> Yes, I was thinking that may be the case also but I can find no evidence of
> anyone or anything that was invoking the job other than its own schedule.
> Once I disabled the schedule it stopped.
> "Narayana Vyas Kondreddi" wrote:
> > Disabling the job should be fine. Can you check the history and see who is
> > invoking it? Could it be that there's another job that runs this job using
> > sp_start_job?
> > --
> > Vyas, MVP (SQL Server)
> > SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
> >
> >
> > "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> > news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> > > Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> > > when you disable a scheduled job, it would no longer run. Do you really
> > have
> > > to disable the schedule inside of the job in order to keep the job from
> > > running and not just disable the job itself?
> > >
> > > Thanks,
> > >
> > > Jon
> >
> >
> >|||Yes, quite strange. I wish I would've thought to check sysjobs but
unfortunately I didn't. I'm going to play around with this a little more on
a test server. Thanks.
"Yogish" wrote:
> Hi,
> After you have disabled the job, probably you could have checked "enabled"
> column in sysjobs against this particular job, to see if its really been
> disabled.
> But its quite strange though.....
> --
> - - - - - - - - -
> Thanks
> Yogish
>
> "Jon Goughnour" wrote:
> > Yes, I was thinking that may be the case also but I can find no evidence of
> > anyone or anything that was invoking the job other than its own schedule.
> > Once I disabled the schedule it stopped.
> >
> > "Narayana Vyas Kondreddi" wrote:
> >
> > > Disabling the job should be fine. Can you check the history and see who is
> > > invoking it? Could it be that there's another job that runs this job using
> > > sp_start_job?
> > > --
> > > Vyas, MVP (SQL Server)
> > > SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
> > >
> > >
> > > "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> > > news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> > > > Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> > > > when you disable a scheduled job, it would no longer run. Do you really
> > > have
> > > > to disable the schedule inside of the job in order to keep the job from
> > > > running and not just disable the job itself?
> > > >
> > > > Thanks,
> > > >
> > > > Jon
> > >
> > >
> > >
when you disable a scheduled job, it would no longer run. Do you really have
to disable the schedule inside of the job in order to keep the job from
running and not just disable the job itself?
Thanks,
JonDisabling the job should be fine. Can you check the history and see who is
invoking it? Could it be that there's another job that runs this job using
sp_start_job?
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> when you disable a scheduled job, it would no longer run. Do you really
have
> to disable the schedule inside of the job in order to keep the job from
> running and not just disable the job itself?
> Thanks,
> Jon|||Yes, I was thinking that may be the case also but I can find no evidence of
anyone or anything that was invoking the job other than its own schedule.
Once I disabled the schedule it stopped.
"Narayana Vyas Kondreddi" wrote:
> Disabling the job should be fine. Can you check the history and see who is
> invoking it? Could it be that there's another job that runs this job using
> sp_start_job?
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> > Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> > when you disable a scheduled job, it would no longer run. Do you really
> have
> > to disable the schedule inside of the job in order to keep the job from
> > running and not just disable the job itself?
> >
> > Thanks,
> >
> > Jon
>
>|||Hi,
After you have disabled the job, probably you could have checked "enabled"
column in sysjobs against this particular job, to see if its really been
disabled.
But its quite strange though.....
--
- - - - - - - - -
Thanks
Yogish
"Jon Goughnour" wrote:
> Yes, I was thinking that may be the case also but I can find no evidence of
> anyone or anything that was invoking the job other than its own schedule.
> Once I disabled the schedule it stopped.
> "Narayana Vyas Kondreddi" wrote:
> > Disabling the job should be fine. Can you check the history and see who is
> > invoking it? Could it be that there's another job that runs this job using
> > sp_start_job?
> > --
> > Vyas, MVP (SQL Server)
> > SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
> >
> >
> > "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> > news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> > > Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> > > when you disable a scheduled job, it would no longer run. Do you really
> > have
> > > to disable the schedule inside of the job in order to keep the job from
> > > running and not just disable the job itself?
> > >
> > > Thanks,
> > >
> > > Jon
> >
> >
> >|||Yes, quite strange. I wish I would've thought to check sysjobs but
unfortunately I didn't. I'm going to play around with this a little more on
a test server. Thanks.
"Yogish" wrote:
> Hi,
> After you have disabled the job, probably you could have checked "enabled"
> column in sysjobs against this particular job, to see if its really been
> disabled.
> But its quite strange though.....
> --
> - - - - - - - - -
> Thanks
> Yogish
>
> "Jon Goughnour" wrote:
> > Yes, I was thinking that may be the case also but I can find no evidence of
> > anyone or anything that was invoking the job other than its own schedule.
> > Once I disabled the schedule it stopped.
> >
> > "Narayana Vyas Kondreddi" wrote:
> >
> > > Disabling the job should be fine. Can you check the history and see who is
> > > invoking it? Could it be that there's another job that runs this job using
> > > sp_start_job?
> > > --
> > > Vyas, MVP (SQL Server)
> > > SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
> > >
> > >
> > > "Jon Goughnour" <JonGoughnour@.discussions.microsoft.com> wrote in message
> > > news:DC301B21-E312-44F4-8B72-EF883EF19913@.microsoft.com...
> > > > Thinks sounds a little crazy, and please tell me I'm wrong, but I thought
> > > > when you disable a scheduled job, it would no longer run. Do you really
> > > have
> > > > to disable the schedule inside of the job in order to keep the job from
> > > > running and not just disable the job itself?
> > > >
> > > > Thanks,
> > > >
> > > > Jon
> > >
> > >
> > >
Disable Triggers (using alter with public)
Hey folks,
Here's the skinny
I'm trying to run a stored procedure that requires triggers to be disabled in a table.
When I run the stored procedure (from the app or from the query analyzer) it works fine cause I'm setup as the owner/admin.
However, when users call the stored procedure from the application it gets executed as public which does not have alter persmissions.
I do not want to give alter permissions to public (for obvious reasons).
I was thinking of using SETUSER and SETOWNER but I don't know if it will work (I think because I cannot upgrade permissions using these just change to user of equal or lesser permissions).
Someone had mentioned to me to create a sysadmin user and just SETUSER to that then set it back to public, but again not sure if this will work because public has less permissions than the sysadmin.
I would like to have more info before I try this out and give it back to the client for testing.
Not sure if any of this will work for me, please help.
Thank you for your time.
By the way, I'm using SQL2000My suggestion would be to code an exemption for that stored procedure into your trigger, something like:IF 'myProc' = Object_Name(@.@.procid)
RETURN
-PatP|||Perfect, Exactly what I was looking for.
Thanks a million.
Here's the skinny
I'm trying to run a stored procedure that requires triggers to be disabled in a table.
When I run the stored procedure (from the app or from the query analyzer) it works fine cause I'm setup as the owner/admin.
However, when users call the stored procedure from the application it gets executed as public which does not have alter persmissions.
I do not want to give alter permissions to public (for obvious reasons).
I was thinking of using SETUSER and SETOWNER but I don't know if it will work (I think because I cannot upgrade permissions using these just change to user of equal or lesser permissions).
Someone had mentioned to me to create a sysadmin user and just SETUSER to that then set it back to public, but again not sure if this will work because public has less permissions than the sysadmin.
I would like to have more info before I try this out and give it back to the client for testing.
Not sure if any of this will work for me, please help.
Thank you for your time.
By the way, I'm using SQL2000My suggestion would be to code an exemption for that stored procedure into your trigger, something like:IF 'myProc' = Object_Name(@.@.procid)
RETURN
-PatP|||Perfect, Exactly what I was looking for.
Thanks a million.
订阅:
博文 (Atom)