Showing posts with label commands. Show all posts
Showing posts with label commands. Show all posts

Friday, March 30, 2012

manage the MSDE with command tool

i an newbie to MSDE, but i have experience Mysql before, can someone tell me how can i find help to manage MSDE with commands ??http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=631069

This pinned post at the top of this forum talks about one possible tool.|||sorry man, i think you misunderstood my question, actually i want to use command to manage MSDE.|||Do you mean you want to manage MSDE from the command prompt? If so then you are talking about osql. SeeHow To Manage the SQL Server Desktop Engine (MSDE 2000) by Using the Osql Utility

Terri|||thank for that,
by the way i found that my MSDE is unbeliveable slow, like you have to take a minute to show all the database in the MSDE(from command line), why it is so slow??|||Which command are you using to list the databases?

Terri|||exec sp_database
also when i use sql web data administrator is even more slower than command, it's like take 2 minutes to login, and 3 minutes to go to the query section.
i have no ideas what cause this

Monday, March 12, 2012

Make a Job continue after Primary Key Violation?

i have a stored procedure that processes new incoming data. during this
procedure i have many INSERT commands that may result with a duplicate key
violation.
this kind of error should not stop the process and the algorithm continue.
when i run it manually ( EXEC SP1 ...) it behaves ok and continue even when
primary key violation occur.
BUT, when i run it via a job (single step) it quits on the 1st error!!!
WHY ?
how can i force the job/SP to continue running after data errors like key
violations '
thanks
rafiThere are errors in sql that are not trappable. Erland has some good writing
that you should take a look:
http://www.sommarskog.se/error-handling-I.html
-oj
"Rafi" <Rafi@.discussions.microsoft.com> wrote in message
news:93C834D3-71DA-48AF-B2C6-2151EC06F136@.microsoft.com...
>i have a stored procedure that processes new incoming data. during this
> procedure i have many INSERT commands that may result with a duplicate key
> violation.
> this kind of error should not stop the process and the algorithm continue.
> when i run it manually ( EXEC SP1 ...) it behaves ok and continue even
> when
> primary key violation occur.
> BUT, when i run it via a job (single step) it quits on the 1st error!!!
> WHY ?
> how can i force the job/SP to continue running after data errors like key
> violations '
> thanks
> rafi|||Hi
Why not add a where clause to the insert statement to check the PK value
does not exist? If they do exist you may want to log the fact.
It may not a good idea to SET XACT_ABORT OFF as you may miss something that
is important.
John
"Rafi" wrote:

> i have a stored procedure that processes new incoming data. during this
> procedure i have many INSERT commands that may result with a duplicate key
> violation.
> this kind of error should not stop the process and the algorithm continue.
> when i run it manually ( EXEC SP1 ...) it behaves ok and continue even whe
n
> primary key violation occur.
> BUT, when i run it via a job (single step) it quits on the 1st error!!!
> WHY ?
> how can i force the job/SP to continue running after data errors like key
> violations '
> thanks
> rafi

Monday, February 20, 2012

Maintenance Plan...what is it doing exactly?

I would like to know exactly what commands the "Maintenance Plan" is
executing behind the scenes when the checkbox Reorganize data and index
pages is checked on the Optimizations tab on the Maintenance plan. My
thought is that it is executing some DBCC DBREINDEX commands across the
entire set of databases selected.
SpencerWhat it does depends on the version of SQL Server you are using. In 2005, yo
u can clock in the
"display SQL" (or whatever it is called) button. But to be sure, use Profile
r to see what SQL maint
plan submits. In 2000, it uses DBCC DBREINDEX for all tables in the database
(regardless of
fragmentation level :-( ).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"stabbert" <spencer@.tabbert.net> wrote in message
news:1144850383.926367.95100@.z34g2000cwc.googlegroups.com...
>I would like to know exactly what commands the "Maintenance Plan" is
> executing behind the scenes when the checkbox Reorganize data and index
> pages is checked on the Optimizations tab on the Maintenance plan. My
> thought is that it is executing some DBCC DBREINDEX commands across the
> entire set of databases selected.
> Spencer
>

Maintenance Plan...what is it doing exactly?

I would like to know exactly what commands the "Maintenance Plan" is
executing behind the scenes when the checkbox Reorganize data and index
pages is checked on the Optimizations tab on the Maintenance plan. My
thought is that it is executing some DBCC DBREINDEX commands across the
entire set of databases selected.
SpencerWhat it does depends on the version of SQL Server you are using. In 2005, you can clock in the
"display SQL" (or whatever it is called) button. But to be sure, use Profiler to see what SQL maint
plan submits. In 2000, it uses DBCC DBREINDEX for all tables in the database (regardless of
fragmentation level :-( ).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"stabbert" <spencer@.tabbert.net> wrote in message
news:1144850383.926367.95100@.z34g2000cwc.googlegroups.com...
>I would like to know exactly what commands the "Maintenance Plan" is
> executing behind the scenes when the checkbox Reorganize data and index
> pages is checked on the Optimizations tab on the Maintenance plan. My
> thought is that it is executing some DBCC DBREINDEX commands across the
> entire set of databases selected.
> Spencer
>