Showing posts with label space. Show all posts
Showing posts with label space. Show all posts

Monday, March 26, 2012

How to create disk space alert?

I would like SQL Server (7 and 2K) to alert me when disk
space drops to a preset level. Is there a way to do this
using sql agent alerts? I looked at the alerts that are
pre-defined, they are more DB oriented. If someone could
point me to some examples it would be appreciated.
Dave K.Which OS are you running on ?
W2KAS has "quota" management , so you might look into it.
there are also commercial prods available
W2K quotas can be found with the Windows Exploder -select disk--> right
click-->properties--> Quota tab
"Dave K" <anonymous@.discussions.microsoft.com> wrote in message
news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
quote:

> I would like SQL Server (7 and 2K) to alert me when disk
> space drops to a preset level. Is there a way to do this
> using sql agent alerts? I looked at the alerts that are
> pre-defined, they are more DB oriented. If someone could
> point me to some examples it would be appreciated.
> Dave K.
|||Can you do this without putting a limit on disk space?
"MaSa" <matti putTheDotHere saukkonen _ POISTA_ mandatum.fi> wrote in
message news:uWp2rKE3DHA.2544@.TK2MSFTNGP10.phx.gbl...
quote:

> Which OS are you running on ?
> W2KAS has "quota" management , so you might look into it.
> there are also commercial prods available
> W2K quotas can be found with the Windows Exploder -select disk--> right
> click-->properties--> Quota tab
>
> "Dave K" <anonymous@.discussions.microsoft.com> wrote in message
> news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
>
|||Win2K. BTW, I don't want to restrict anything with a
quota, I just want to be notified when I run out of backup
space. I have some 15GB databases that eat up space
fast. If the regular maintenance backups don't delete the
prior jobs, and sometimes they don't, I want to be
notified before the backup fails, not after.
Dave K.
quote:

>--Original Message--
>Which OS are you running on ?
>W2KAS has "quota" management , so you might look into it.
>there are also commercial prods available
>W2K quotas can be found with the Windows Exploder -select

disk--> right
quote:

>click-->properties--> Quota tab
>
>"Dave K" <anonymous@.discussions.microsoft.com> wrote in

message
quote:

>news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
this[QUOTE]
could[QUOTE]
>
>.
>
|||Here's how I do it.
I scan my SQL instances to run xp_fixeddrives to get free
disk space for each hard drive and check each to see
whether it's below a threshold. If yes, I raise a SQL
error of severity 17. My errorlog monitoring setup will
pick it up from there and page the DBAs.
Of course, this can be consistently done with a NetIQ
configuration as well.
Linchi
quote:

>--Original Message--
>I would like SQL Server (7 and 2K) to alert me when disk
>space drops to a preset level. Is there a way to do this
>using sql agent alerts? I looked at the alerts that are
>pre-defined, they are more DB oriented. If someone could
>point me to some examples it would be appreciated.
>Dave K.
>.
>
|||I put together this vbs file and run it from task scheduler, works for me.
'*****************************
'Monitors Drive Space and emails if below threshhold
'Application Variables
On error resume next
'Application Variables
Dim sEmailFrom, sEmailTo, sMyMailServer, sDriveC, sDriveD, sBodyText,
sSubject
sEmailFrom = "support@.assoft.com.au"
sEmailTo = "support@.assoft.com.au"
sConEmailMonitor = "dgrover@.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
'
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
'*****************************
Regards
Don Grover
"Dave K" <anonymous@.discussions.microsoft.com> wrote in message
news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
quote:

> I would like SQL Server (7 and 2K) to alert me when disk
> space drops to a preset level. Is there a way to do this
> using sql agent alerts? I looked at the alerts that are
> pre-defined, they are more DB oriented. If someone could
> point me to some examples it would be appreciated.
> Dave K.
sql

How to create disk space alert?

I would like SQL Server (7 and 2K) to alert me when disk
space drops to a preset level. Is there a way to do this
using sql agent alerts? I looked at the alerts that are
pre-defined, they are more DB oriented. If someone could
point me to some examples it would be appreciated.
Dave K.Which OS are you running on ?
W2KAS has "quota" management , so you might look into it.
there are also commercial prods available
W2K quotas can be found with the Windows Exploder -select disk--> right
click-->properties--> Quota tab
"Dave K" <anonymous@.discussions.microsoft.com> wrote in message
news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
> I would like SQL Server (7 and 2K) to alert me when disk
> space drops to a preset level. Is there a way to do this
> using sql agent alerts? I looked at the alerts that are
> pre-defined, they are more DB oriented. If someone could
> point me to some examples it would be appreciated.
> Dave K.|||Can you do this without putting a limit on disk space?
"MaSa" <matti putTheDotHere saukkonen _ POISTA_ mandatum.fi> wrote in
message news:uWp2rKE3DHA.2544@.TK2MSFTNGP10.phx.gbl...
> Which OS are you running on ?
> W2KAS has "quota" management , so you might look into it.
> there are also commercial prods available
> W2K quotas can be found with the Windows Exploder -select disk--> right
> click-->properties--> Quota tab
>
> "Dave K" <anonymous@.discussions.microsoft.com> wrote in message
> news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
> > I would like SQL Server (7 and 2K) to alert me when disk
> > space drops to a preset level. Is there a way to do this
> > using sql agent alerts? I looked at the alerts that are
> > pre-defined, they are more DB oriented. If someone could
> > point me to some examples it would be appreciated.
> >
> > Dave K.
>|||Win2K. BTW, I don't want to restrict anything with a
quota, I just want to be notified when I run out of backup
space. I have some 15GB databases that eat up space
fast. If the regular maintenance backups don't delete the
prior jobs, and sometimes they don't, I want to be
notified before the backup fails, not after.
Dave K.
>--Original Message--
>Which OS are you running on ?
>W2KAS has "quota" management , so you might look into it.
>there are also commercial prods available
>W2K quotas can be found with the Windows Exploder -select
disk--> right
>click-->properties--> Quota tab
>
>"Dave K" <anonymous@.discussions.microsoft.com> wrote in
message
>news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
>> I would like SQL Server (7 and 2K) to alert me when disk
>> space drops to a preset level. Is there a way to do
this
>> using sql agent alerts? I looked at the alerts that are
>> pre-defined, they are more DB oriented. If someone
could
>> point me to some examples it would be appreciated.
>> Dave K.
>
>.
>|||Here's how I do it.
I scan my SQL instances to run xp_fixeddrives to get free
disk space for each hard drive and check each to see
whether it's below a threshold. If yes, I raise a SQL
error of severity 17. My errorlog monitoring setup will
pick it up from there and page the DBAs.
Of course, this can be consistently done with a NetIQ
configuration as well.
Linchi
>--Original Message--
>I would like SQL Server (7 and 2K) to alert me when disk
>space drops to a preset level. Is there a way to do this
>using sql agent alerts? I looked at the alerts that are
>pre-defined, they are more DB oriented. If someone could
>point me to some examples it would be appreciated.
>Dave K.
>.
>|||I put together this vbs file and run it from task scheduler, works for me.
'*****************************
'Monitors Drive Space and emails if below threshhold
'Application Variables
On error resume next
'Application Variables
Dim sEmailFrom, sEmailTo, sMyMailServer, sDriveC, sDriveD, sBodyText,
sSubject
sEmailFrom = "support@.assoft.com.au"
sEmailTo = "support@.assoft.com.au"
sConEmailMonitor = "dgrover@.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
'
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
'*****************************
Regards
Don Grover
"Dave K" <anonymous@.discussions.microsoft.com> wrote in message
news:048f01c3dc3c$46938f90$a001280a@.phx.gbl...
> I would like SQL Server (7 and 2K) to alert me when disk
> space drops to a preset level. Is there a way to do this
> using sql agent alerts? I looked at the alerts that are
> pre-defined, they are more DB oriented. If someone could
> point me to some examples it would be appreciated.
> Dave K.

Sunday, February 19, 2012

How to copy db to production server

I've developing a small asp.net app that is using SQL Server (developer
edition on my PC). I am ready to deploy my app on my web server/space (that
I am renting from a hosting company) for further testing before we go live.
I need to copy my database from my sql server instance to a sql server
instance at my host's facility. I am able to connect to that server via
enterprise manager. Is the Copy Database Wizard the way to go here, or
should export a script and then run that on the web sql server instance? I
do not have much data in my db, so I don't have to copy the data, but it
would be nice.
Thanks!epigram (nospam@.spammy.com) writes:
> I've developing a small asp.net app that is using SQL Server (developer
> edition on my PC). I am ready to deploy my app on my web server/space
> (that I am renting from a hosting company) for further testing before we
> go live. I need to copy my database from my sql server instance to a sql
> server instance at my host's facility. I am able to connect to that
> server via enterprise manager. Is the Copy Database Wizard the way to
> go here, or should export a script and then run that on the web sql
> server instance? I do not have much data in my db, so I don't have to
> copy the data, but it would be nice.
I would put all code under version control, and that includes any data
you may have tables that you pre-load. (Fixed lookup tables and such).
Then I would install the database on the production server from those
scripts.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp|||You can also consider to use AgileInfoSoftware DataStudio to copy your
database to production server. For the same platform migration (From SQL
Server to SQL Server), it can migrate all supported objects. If you need to
migrate to different database (for instance, from Oracle to SQL Server),
then all tables/views/constraints/indexes/data are migrated, but not
database specific objects, such as function/procedure/packages.
You can download trial version at http://www.agileinfollc.com
John King
AgileInfoSoftware
http://www.agileinfollc.com
"epigram" <nospam@.spammy.com> wrote in message
news:1124828227.3cd98101b03ff015d3bf26ba65b37623@.bubbanews...
> I've developing a small asp.net app that is using SQL Server (developer
> edition on my PC). I am ready to deploy my app on my web server/space
> (that I am renting from a hosting company) for further testing before we
> go live. I need to copy my database from my sql server instance to a sql
> server instance at my host's facility. I am able to connect to that
> server via enterprise manager. Is the Copy Database Wizard the way to go
> here, or should export a script and then run that on the web sql server
> instance? I do not have much data in my db, so I don't have to copy the
> data, but it would be nice.
> Thanks!
>

How to copy db to production server

I've developing a small asp.net app that is using SQL Server (developer
edition on my PC). I am ready to deploy my app on my web server/space (that
I am renting from a hosting company) for further testing before we go live.
I need to copy my database from my sql server instance to a sql server
instance at my host's facility. I am able to connect to that server via
enterprise manager. Is the Copy Database Wizard the way to go here, or
should export a script and then run that on the web sql server instance? I
do not have much data in my db, so I don't have to copy the data, but it
would be nice.
Thanks!
epigram (nospam@.spammy.com) writes:
> I've developing a small asp.net app that is using SQL Server (developer
> edition on my PC). I am ready to deploy my app on my web server/space
> (that I am renting from a hosting company) for further testing before we
> go live. I need to copy my database from my sql server instance to a sql
> server instance at my host's facility. I am able to connect to that
> server via enterprise manager. Is the Copy Database Wizard the way to
> go here, or should export a script and then run that on the web sql
> server instance? I do not have much data in my db, so I don't have to
> copy the data, but it would be nice.
I would put all code under version control, and that includes any data
you may have tables that you pre-load. (Fixed lookup tables and such).
Then I would install the database on the production server from those
scripts.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
|||You can also consider to use AgileInfoSoftware DataStudio to copy your
database to production server. For the same platform migration (From SQL
Server to SQL Server), it can migrate all supported objects. If you need to
migrate to different database (for instance, from Oracle to SQL Server),
then all tables/views/constraints/indexes/data are migrated, but not
database specific objects, such as function/procedure/packages.
You can download trial version at http://www.agileinfollc.com
John King
AgileInfoSoftware
http://www.agileinfollc.com
"epigram" <nospam@.spammy.com> wrote in message
news:1124828227.3cd98101b03ff015d3bf26ba65b37623@.b ubbanews...
> I've developing a small asp.net app that is using SQL Server (developer
> edition on my PC). I am ready to deploy my app on my web server/space
> (that I am renting from a hosting company) for further testing before we
> go live. I need to copy my database from my sql server instance to a sql
> server instance at my host's facility. I am able to connect to that
> server via enterprise manager. Is the Copy Database Wizard the way to go
> here, or should export a script and then run that on the web sql server
> instance? I do not have much data in my db, so I don't have to copy the
> data, but it would be nice.
> Thanks!
>

How to copy db to production server

I've developing a small asp.net app that is using SQL Server (developer
edition on my PC). I am ready to deploy my app on my web server/space (that
I am renting from a hosting company) for further testing before we go live.
I need to copy my database from my sql server instance to a sql server
instance at my host's facility. I am able to connect to that server via
enterprise manager. Is the Copy Database Wizard the way to go here, or
should export a script and then run that on the web sql server instance? I
do not have much data in my db, so I don't have to copy the data, but it
would be nice.
Thanks!epigram (nospam@.spammy.com) writes:
> I've developing a small asp.net app that is using SQL Server (developer
> edition on my PC). I am ready to deploy my app on my web server/space
> (that I am renting from a hosting company) for further testing before we
> go live. I need to copy my database from my sql server instance to a sql
> server instance at my host's facility. I am able to connect to that
> server via enterprise manager. Is the Copy Database Wizard the way to
> go here, or should export a script and then run that on the web sql
> server instance? I do not have much data in my db, so I don't have to
> copy the data, but it would be nice.
I would put all code under version control, and that includes any data
you may have tables that you pre-load. (Fixed lookup tables and such).
Then I would install the database on the production server from those
scripts.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||You can also consider to use AgileInfoSoftware DataStudio to copy your
database to production server. For the same platform migration (From SQL
Server to SQL Server), it can migrate all supported objects. If you need to
migrate to different database (for instance, from Oracle to SQL Server),
then all tables/views/constraints/indexes/data are migrated, but not
database specific objects, such as function/procedure/packages.
You can download trial version at http://www.agileinfollc.com
John King
AgileInfoSoftware
http://www.agileinfollc.com
"epigram" <nospam@.spammy.com> wrote in message
news:1124828227. 3cd98101b03ff015d3bf26ba65b37623@.bubbane
ws...
> I've developing a small asp.net app that is using SQL Server (developer
> edition on my PC). I am ready to deploy my app on my web server/space
> (that I am renting from a hosting company) for further testing before we
> go live. I need to copy my database from my sql server instance to a sql
> server instance at my host's facility. I am able to connect to that
> server via enterprise manager. Is the Copy Database Wizard the way to go
> here, or should export a script and then run that on the web sql server
> instance? I do not have much data in my db, so I don't have to copy the
> data, but it would be nice.
> Thanks!
>