Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Wednesday, March 21, 2012

Maintenance

Hi NG,
Before doing a backup of our databases I would like to execute a DBCC
checkdb command. Is this enough for a daily maintenance plan?
Is there a white paper for the daily maintenance of a MSS database?
Thank you in advance.
You can the maintenance plan wizard to do this for you buy doing an
integrity check periodically and check the "perform these checks before
doing backups" box.
Nik Marshall-Blank MCSD/MCDBA
Linz, Austria
"Praetorian Guard" <praetorian@.gatekeeper.com> wrote in message
news:OCzkILMyFHA.3312@.TK2MSFTNGP09.phx.gbl...
> Hi NG,
> Before doing a backup of our databases I would like to execute a DBCC
> checkdb command. Is this enough for a daily maintenance plan?
> Is there a white paper for the daily maintenance of a MSS database?
> Thank you in advance.
>
|||The SQL Server 2000 Operations Guide has a System
Administration section which covers recommended daily,
weekly, monthly tasks.
http://www.microsoft.com/TechNet/pro...n/sqlops0.mspx
-Sue
On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
<praetorian@.gatekeeper.com> wrote:

>Hi NG,
>Before doing a backup of our databases I would like to execute a DBCC
>checkdb command. Is this enough for a daily maintenance plan?
>Is there a white paper for the daily maintenance of a MSS database?
>Thank you in advance.
>
|||... and also read http://www.microsoft.com/technet/pro...ss2kidbp.mspx.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:dkq4k1pleke9o2gs97fiqjcu17l3edvja0@.4ax.com...
> The SQL Server 2000 Operations Guide has a System
> Administration section which covers recommended daily,
> weekly, monthly tasks.
> http://www.microsoft.com/TechNet/pro...n/sqlops0.mspx
> -Sue
> On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
> <praetorian@.gatekeeper.com> wrote:
>
|||Thanks guys!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OmtFvuOyFHA.2500@.TK2MSFTNGP10.phx.gbl...
> ... and also read
http://www.microsoft.com/technet/pro...ss2kidbp.mspx.[vbcol=seagreen]
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:dkq4k1pleke9o2gs97fiqjcu17l3edvja0@.4ax.com...
http://www.microsoft.com/TechNet/pro...n/sqlops0.mspx
>

Maintenance

Hi NG,
Before doing a backup of our databases I would like to execute a DBCC
checkdb command. Is this enough for a daily maintenance plan?
Is there a white paper for the daily maintenance of a MSS database?
Thank you in advance.You can the maintenance plan wizard to do this for you buy doing an
integrity check periodically and check the "perform these checks before
doing backups" box.
--
Nik Marshall-Blank MCSD/MCDBA
Linz, Austria
"Praetorian Guard" <praetorian@.gatekeeper.com> wrote in message
news:OCzkILMyFHA.3312@.TK2MSFTNGP09.phx.gbl...
> Hi NG,
> Before doing a backup of our databases I would like to execute a DBCC
> checkdb command. Is this enough for a daily maintenance plan?
> Is there a white paper for the daily maintenance of a MSS database?
> Thank you in advance.
>|||The SQL Server 2000 Operations Guide has a System
Administration section which covers recommended daily,
weekly, monthly tasks.
http://www.microsoft.com/TechNet/prodtechnol/sql/2000/maintain/sqlops0.mspx
-Sue
On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
<praetorian@.gatekeeper.com> wrote:
>Hi NG,
>Before doing a backup of our databases I would like to execute a DBCC
>checkdb command. Is this enough for a daily maintenance plan?
>Is there a white paper for the daily maintenance of a MSS database?
>Thank you in advance.
>|||... and also read http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:dkq4k1pleke9o2gs97fiqjcu17l3edvja0@.4ax.com...
> The SQL Server 2000 Operations Guide has a System
> Administration section which covers recommended daily,
> weekly, monthly tasks.
> http://www.microsoft.com/TechNet/prodtechnol/sql/2000/maintain/sqlops0.mspx
> -Sue
> On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
> <praetorian@.gatekeeper.com> wrote:
>>Hi NG,
>>Before doing a backup of our databases I would like to execute a DBCC
>>checkdb command. Is this enough for a daily maintenance plan?
>>Is there a white paper for the daily maintenance of a MSS database?
>>Thank you in advance.
>|||Thanks guys!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OmtFvuOyFHA.2500@.TK2MSFTNGP10.phx.gbl...
> ... and also read
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:dkq4k1pleke9o2gs97fiqjcu17l3edvja0@.4ax.com...
> > The SQL Server 2000 Operations Guide has a System
> > Administration section which covers recommended daily,
> > weekly, monthly tasks.
> >
http://www.microsoft.com/TechNet/prodtechnol/sql/2000/maintain/sqlops0.mspx
> >
> > -Sue
> >
> > On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
> > <praetorian@.gatekeeper.com> wrote:
> >
> >>Hi NG,
> >>
> >>Before doing a backup of our databases I would like to execute a DBCC
> >>checkdb command. Is this enough for a daily maintenance plan?
> >>
> >>Is there a white paper for the daily maintenance of a MSS database?
> >>
> >>Thank you in advance.
> >>
> >
>

Maintenance

Hi NG,
Before doing a backup of our databases I would like to execute a DBCC
checkdb command. Is this enough for a daily maintenance plan?
Is there a white paper for the daily maintenance of a MSS database?
Thank you in advance.You can the maintenance plan wizard to do this for you buy doing an
integrity check periodically and check the "perform these checks before
doing backups" box.
Nik Marshall-Blank MCSD/MCDBA
Linz, Austria
"Praetorian Guard" <praetorian@.gatekeeper.com> wrote in message
news:OCzkILMyFHA.3312@.TK2MSFTNGP09.phx.gbl...
> Hi NG,
> Before doing a backup of our databases I would like to execute a DBCC
> checkdb command. Is this enough for a daily maintenance plan?
> Is there a white paper for the daily maintenance of a MSS database?
> Thank you in advance.
>|||The SQL Server 2000 Operations Guide has a System
Administration section which covers recommended daily,
weekly, monthly tasks.
http://www.microsoft.com/TechNet/pr...in/sqlops0.mspx
-Sue
On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
<praetorian@.gatekeeper.com> wrote:

>Hi NG,
>Before doing a backup of our databases I would like to execute a DBCC
>checkdb command. Is this enough for a daily maintenance plan?
>Is there a white paper for the daily maintenance of a MSS database?
>Thank you in advance.
>|||... and also read http://www.microsoft.com/technet/pr...
ss2kidbp.mspx.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:dkq4k1pleke9o2gs97fiqjcu17l3edvja0@.
4ax.com...
> The SQL Server 2000 Operations Guide has a System
> Administration section which covers recommended daily,
> weekly, monthly tasks.
> [url]http://www.microsoft.com/TechNet/prodtechnol/sql/2000/maintain/sqlops0.mspx[/url
]
> -Sue
> On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
> <praetorian@.gatekeeper.com> wrote:
>
>|||Thanks guys!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OmtFvuOyFHA.2500@.TK2MSFTNGP10.phx.gbl...
> ... and also read
http://www.microsoft.com/technet/pr.../ss2kidbp.mspx.">
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:dkq4k1pleke9o2gs97fiqjcu17l3edvja0@.
4ax.com...
http://www.microsoft.com/TechNet/pr...in/sqlops0.mspx[vbcol=seagreen]
>sql

Monday, March 19, 2012

Maintanance job fails

EXECUTE master.dbo.xp_sqlmaint N'-PlanID
95C0459D-8D08-478E-9058-41CA9D0A0F51 -Rpt
"P:\SQLBackup\AllUserDB0.txt" -DelTxtRpt 2WEEKS -WriteHistory
-RebldIdx 10 -RmUnusedSpace 50 10 '
results in www.planprojekt.dk/upload/maint.txt, where the end of the
file states
"SQLMAINT.EXE Process Exit Code: 1 (Failed)"
The error log shows nothing. Only thing left is the report created by
the job. The repo is the one shown in the link above.
So I'm finding it difficult to get to the core of the failure - any
help is greatly appreciated.
Thx in advance.
Regards /SnedkerOn Tue, 14 Mar 2006 10:29:31 +0100, Morten Snedker
<morten_spammenot_ATdbconsult.dk> wrote:
First of all, sorry for posting same message twice - my mistake.
Secondly, there IS an error in the report, where I try to maintanance
a read-only-database. :-)
/Snedker

>EXECUTE master.dbo.xp_sqlmaint N'-PlanID
>95C0459D-8D08-478E-9058-41CA9D0A0F51 -Rpt
>"P:\SQLBackup\AllUserDB0.txt" -DelTxtRpt 2WEEKS -WriteHistory
>-RebldIdx 10 -RmUnusedSpace 50 10 '
>results in www.planprojekt.dk/upload/maint.txt, where the end of the
>file states
>"SQLMAINT.EXE Process Exit Code: 1 (Failed)"
>The error log shows nothing. Only thing left is the report created by
>the job. The repo is the one shown in the link above.
>So I'm finding it difficult to get to the core of the failure - any
>help is greatly appreciated.
>Thx in advance.
>
>Regards /Snedker

Saturday, February 25, 2012

Magic Tables with Text Columns

Hi folks,

I need to execute some kind of

select a,b,c into #inserted from inserted

a = int
b = varchar(50)
c = text

Easy so far. But I what I need is to find out whether the audited table contains text(or nText / image) columns or not. If it contains any text columns the statement should automatically be changed to

select a,b into #inserted from inserted

Remember that the trigger must be usable for any table in the database without manually entering the tables structure or the column names.

Best would be fetching the structure fropm the system views (INFORMATIONSCHEMES)

Any suggestions ?

Thanks a lot!

StefanTRIGGERS are built for a table, and as such are a "property" of that table.

The only way would be to build dynamic sql with each trigger for each table.

Meaning you would still have to build a trigger per table anyway.

So why not just build them the way they need to be per table?

And what's with the temp table?

Monday, February 20, 2012

ltrim and rtirm is not working

Hi i have a select statement as

select empnum, len(empnum), ltrim(rtrim(empnum)), len(ltrim(rtrim(empnum))) from employee

When i execute this stament i get the following

1234 6 1234 6
4321 8 4321 8
1111 6 1111 6
2222 6 2222 6

How does this happens. Why ltrim and rtrim is not working here.what are you using to display these results, query analyser? enterprise manager? something else?

the length of 1234 is clearly not 6|||What does this yield:

select 'X' + ltrim(rtrim(empnum)) + 'X' from employee|||Ive got it, the input statement is from vb.net source, and the programmers have stored vbcrlf after each string. char(13) stored at the end and that is the reason y ltrim and rtrim is not working.

I removed the char(13) at the end and now it is working.

Thanks for your time

Lowering priority

Is it possible to execute a SP at a lower priority?What do you mean?
"Mohandas" <mohanaspm@.hotmail.com> wrote in message
news:#ZxF6EYuDHA.1088@.tk2msftngp13.phx.gbl...
> Is it possible to execute a SP at a lower priority?
>|||I'm afraid not. You cannot specify priority at procedure, connection or any level inside SQL Server.
There's something called SET DEADLOCK_PRIORITY LOW, but this is a special situation.
Also, you could do dirty reads, but that can of course return incorrect information.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Mohandas" <mohanaspm@.hotmail.com> wrote in message news:%23ZxF6EYuDHA.1088@.tk2msftngp13.phx.gbl...
> Is it possible to execute a SP at a lower priority?
>