Showing posts with label version. Show all posts
Showing posts with label version. Show all posts

Thursday, March 29, 2012

Error reporting from SP to .NET code, how?

Hey

ASP.NET 2.0 + MS Sql Server 2005 Express (that version which comes with VS2005)

This code below fails. The Delete method executes a stored procedure, but somehow this SP fails. The SP shown here is a short version of the actual SP. As you see from the code below, there are no way the Delete method can know if SP executed successfully. I assume I just could have returned @.@.error, but that just gives an error number, and not the description of the error??.. And how should I capture exceptions like these?? How should code this SP so it report the error??

Any suggestions??

public override void Delete(System.Guid id, int user)
{
using (SqlConnection cn = new SqlConnection(this.ConnectionString))
{
SqlCommand cmd = new SqlCommand("SendMessage", cn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@.id", SqlDbType.UniqueIdentifier).Value = id;
cmd.Parameters.Add("@.user", SqlDbType.Int).Value = user;
}
}

ALTER PROCEDURE dbo.DeleteMessage @.id uniqueidentifier, @.user int
AS
BEGIN
UPDATE table_A set column_A = 1 WHERE Id = @.id;
DELETE FROM table_B WHERE Id = @.id;
IF (@.@.error = 0)
COMMIT TRAN;
ELSE
ROLLBACK TRAN;
END

there is a couple of way to report that what happened, you can use execute nonquery to get number of rows affected by last SQL command, you can return from your procedure single cell using SELECT with value 0 for success and 1 for error and finally you can use output parameters and read its values after procedure executes. See T-SQL help in SQL management studio express which is very good and you can find everything you wont.

Tuesday, March 27, 2012

Error reattaching database following it being marked as Suspect

I am using SQL Server 2000 with SP3 (product version
8.00.760).
A database in this installation was marked as 'SUSPECT'
whilst I was excuting a DELETE SQL statement using the SQL
Query Analyzer tool.
Using Enterprise Manager I was subsequently unable to
access the database, and so thought the easiest option
would be to restore it from a BAK file that had been
created a few hours earlier as data modiefied in the time
between was not vital. I detached the database before
attemping this, and then discovered the only backup
available is a differential one and it will not restore.
Therefore, I was hoping to reattached the database and
reset the 'SUSPECT' flag, so I could at least access the
data again. However, when I attempt to attach the MDF
file (the associated LDF file is in the same location) I
get the following errors:
Error 9001: The log for database 'MY_DATABASE' is
not available.
and:
Attaching the database has failed.
I have also tried attaching the database using the
sp_attach_single_file_db stored procdure:
EXEC sp_attach_single_file_db @.dbname
= 'MY_DATABASE',
@.physname = 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\MY_DATABASE_Data.MDF'
which return the following error message:
Server: Msg 9001, Level 21, State 4, Line 1
The log for database 'ORBIT_REPORTS' is not
available.
And also tried using the sp_attach_db stored procedure:
EXEC sp_attach_db @.dbname = 'MY_DATABASE',
@.filename1 = 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\MY_DATABASE_Data.MDF',
@.filename2 = 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\MY_DATABASE_Log.LDF'
but still get the following error:
Server: Msg 9001, Level 21, State 1, Line 1
The log for database 'ORBIT_REPORTS' is not
available.
Both files _do_ exist in the directory:
'C:\Program Files\Microsoft SQL Server\MSSQL\Data\
Can anyone help?If you have a diff backup you should have a copy of a full backup (since
diff backup wont start until it knows a full backup exists).
Is the database called Orbits_reports?
If you have SQL 2K...right click database -all tasks and attach DB...does
the files come up as red? Have you got the correct permissions for a file?
Have you renamed a file?
Regards
Z
"Ian Munday" <ian.munday@.uk.pwc.com> wrote in message
news:078201c37c64$18bdc690$a001280a@.phx.gbl...
> I am using SQL Server 2000 with SP3 (product version
> 8.00.760).
> A database in this installation was marked as 'SUSPECT'
> whilst I was excuting a DELETE SQL statement using the SQL
> Query Analyzer tool.
> Using Enterprise Manager I was subsequently unable to
> access the database, and so thought the easiest option
> would be to restore it from a BAK file that had been
> created a few hours earlier as data modiefied in the time
> between was not vital. I detached the database before
> attemping this, and then discovered the only backup
> available is a differential one and it will not restore.
> Therefore, I was hoping to reattached the database and
> reset the 'SUSPECT' flag, so I could at least access the
> data again. However, when I attempt to attach the MDF
> file (the associated LDF file is in the same location) I
> get the following errors:
> Error 9001: The log for database 'MY_DATABASE' is
> not available.
> and:
> Attaching the database has failed.
>
> I have also tried attaching the database using the
> sp_attach_single_file_db stored procdure:
> EXEC sp_attach_single_file_db @.dbname
> = 'MY_DATABASE',
> @.physname = 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MY_DATABASE_Data.MDF'
> which return the following error message:
> Server: Msg 9001, Level 21, State 4, Line 1
> The log for database 'ORBIT_REPORTS' is not
> available.
> And also tried using the sp_attach_db stored procedure:
> EXEC sp_attach_db @.dbname = 'MY_DATABASE',
> @.filename1 = 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MY_DATABASE_Data.MDF',
> @.filename2 = 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MY_DATABASE_Log.LDF'
> but still get the following error:
> Server: Msg 9001, Level 21, State 1, Line 1
> The log for database 'ORBIT_REPORTS' is not
> available.
> Both files _do_ exist in the directory:
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\
>
> Can anyone help?

Friday, March 23, 2012

Error on using VB in calculated members AFTER stepping up to Enterprise version ?

I have "succesfully upgraded" (?) our SQL2005 from standard to Enterprise version.
Before, following set worked like a charm:

CREATE SET CURRENTCUBE.[Now CY]
AS strtomember("[00 - Time].[00 - H - Calendar].[Day Name].&[" + format(now(),"yyyyMMdd") + "]");

But when I process the cube now, I get this error:

Error 1 MdxScript(Sales) (58, 74) The '[now]' function does not exist. 0 0

It seems like the reference to Visual Basic has been lost somehow
Curiously following calculated member works, even it also uses now() ?

CREATE MEMBER CURRENTCUBE.[MEASURES].[Now]
AS now(),
FORMAT_STRING = "yyyyMMdd",
VISIBLE = 1;

Any suggestions ?
please ;-)

/ geert larsen

denmark

Can you reproduce this problem in Adventure Works Enterprise Edition? Another thing to try is the qualified name: VBA![Now]()|||

Hello Deepak
Thanks for your reply
unfortunately the VBA![Now]() did not work
(And I have not installed the AdventureWorks )

BUT I have investigated a little further in the Assemblies and found that ie. the VBAMDX
is registred in C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\bin\msmdvbanet.dll
But this directory is empty ?
Now the file(s) are situated in C:\Program Files\Microsoft SQL Server\MSSQL.6\OLAP\bin\

I have tried to copy the files and re-register (regsvr32 msmdvbanet.dll)
but I get this error:
C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\bin\msmdvbanet.dll was loaded, but the DllRegisterServer entry point was not found.
This file can not be registered.

I hope this may give you (and then me) a hint

tia
/ geert larsen
denmark

|||Well, msmdvbanet.dll is not a COM server, therefore you cannot register it with regsvr32. There is something that went wrong during setup or upgrade, and the problem with VBA might not be the only one. I recommend reinstalling from scratch.|||

Complete un- and reinstall solved the problems *NOT FUNNY*

Thanks for advice

/ geert larsen

denmark

Error on SQL Enterprise Manager Display

SQL Enterprise Manager Version 7.0, Windows XP professional version 5.1

The list panels (right half of the screen) will not show the tables.
The top of the panel reads: 245 items, which is correct, but the panel
reads: there are no items to show in this view. This error is occurring
on one database on one server. The tables are actually there but I
cannot access them through Enterprise Manager.

I assume that a re-install will probably fix it, but I'm hoping
to avoid it.

Help

--
Posted via http://dbforums.comJohn Boyack <member44155@.dbforums.com> wrote in message news:<3482109.1066179713@.dbforums.com>...
> SQL Enterprise Manager Version 7.0, Windows XP professional version 5.1
>
> The list panels (right half of the screen) will not show the tables.
> The top of the panel reads: 245 items, which is correct, but the panel
> reads: there are no items to show in this view. This error is occurring
> on one database on one server. The tables are actually there but I
> cannot access them through Enterprise Manager.
>
> I assume that a re-install will probably fix it, but I'm hoping
> to avoid it.
>
> Help

Looking in the MS Knowledge Base, there seem to be a few issues with
this functionality - have you applied the latest servicepack (SP4) to
the workstation (and not just the server)?

Simon

Friday, March 9, 2012

Error Msg 8618 with Indexed View

Server version is:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Been having some challenges with the use of an indexed view. We've worked
most of them out, but this one hit us today, and I haven't got a clue.
Dropping the view instantly made the error go away, so we're positive the
error is caused by the presence of the view.
Came up dry in the MS KB, with one reference in the fixlist for SQL 7 SP2. A
google search turned up a couple of unanswered threads, where the core cause
was the table rowsize obviously too big. Neither of those appear to apply in
this case.
ERROR MESSAGE:
Msg 8618, Level 16, State 2, Line 1
Warning: The query processor could not produce a query plan from the
optimizer because the total length of all the columns in the GROUP BY or
ORDER BY clause exceeds 8000 bytes.
CAUSED BY THIS UPDATE QUERY:
update tblAnswer
set answer = null
where row_ordinal = 5559208
CREATE TABLE [dbo].[tblAnswer] (
[ROW_ORDINAL] [decimal](38, 0) IDENTITY(1,1) NOT NULL,
[SurveyOrdinal] [int] NOT NULL,
[UserID] [varchar](40) NOT NULL,
[QuestionNumber] [nchar](50) NOT NULL,
[Answer] [nchar](2000) NULL,
[SurveyID] [int] NOT NULL,
[EntryDate] [datetime] NOT NULL,
[Change] [bit] NULL,
CONSTRAINT [PK_tblANSWER] PRIMARY KEY NONCLUSTERED
(
[ROW_ORDINAL] ASC
) ON [PRIMARY]
) ON [PRIMARY]
The table tblAnswer contains 554,127 rows as of today.
Because of the high volume of hits against the Answer column, and the
(unfortunate, but necessary) declaration of that column as 'nchar 2000', as
well as the high incidence of NULL values in that column, which we
(historically) have filtered since we don't really care about non-responses,
I opted to create an indexed view on a subset of the columns, where Answer
is not null. Note, also, that I'm trimming the 'nchar 2000' Answer column to
a 'varchar 400', so that the column can be used in the index.
This is the view definition:
set ansi_nulls on
go
set ansi_padding on
go
set ansi_warnings on
go
set arithabort on
go
set concat_null_yields_null on
go
set quoted_identifier on
go
set numeric_roundabort off
go
set nocount on
go
create view vwAnswerCurrent
with schemabinding
as
select row_ordinal, userid, questionnumber, rtrim(left(answer,400)) as
answer, surveyid
from dbo.tblAnswer
where change is null
go
create unique clustered index idxRowOrd
on vwAnswerCurrent (row_ordinal)
go
create nonclustered index idxUSQ
on vwAnswerCurrent (userid, surveyid, questionnumber)
go
create nonclustered index idxAnswer
on vwAnswerCurrent (answer)
go
In addition, because of a high volume of data access to this table, and the
presence of the view, via ASP.NET v1.1 code, we opted to SET ARITHABORT = ON
for the entire database, using 'ALTER DATABASE SET ARITHABORT = ON'. This
resolved our access issues via ASP.NET, and no other issues occurred since
enabling the ARITHABORT flag early last w. Until Today.
So.. my question is: What the heck am I missing, or misunderstanding, about
the use of indexed views that's not working here.
(p.s. Don't ask why the PK on Row_Ordinal is not clustered. I don't know,
but if I had my choice, it would be! But, it's not, in the table, but it is,
in my view declaration. <g> )"Lawrence Garvin" <onsitech@.news.postalias> wrote in message
news:u%23bVpMeJGHA.2036@.TK2MSFTNGP14.phx.gbl...
> Server version is:
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Been having some challenges with the use of an indexed view. We've worked
> most of them out, but this one hit us today, and I haven't got a clue.
> Dropping the view instantly made the error go away, so we're positive the
> error is caused by the presence of the view.
> Came up dry in the MS KB, with one reference in the fixlist for SQL 7 SP2.
> A google search turned up a couple of unanswered threads, where the core
> cause was the table rowsize obviously too big. Neither of those appear to
> apply in this case.
>
> ERROR MESSAGE:
> Msg 8618, Level 16, State 2, Line 1
> Warning: The query processor could not produce a query plan from the
> optimizer because the total length of all the columns in the GROUP BY or
> ORDER BY clause exceeds 8000 bytes.
> CAUSED BY THIS UPDATE QUERY:
> update tblAnswer
> set answer = null
> where row_ordinal = 5559208
> CREATE TABLE [dbo].[tblAnswer] (
> [ROW_ORDINAL] [decimal](38, 0) IDENTITY(1,1) NOT NULL,
> [SurveyOrdinal] [int] NOT NULL,
> [UserID] [varchar](40) NOT NULL,
> [QuestionNumber] [nchar](50) NOT NULL,
> [Answer] [nchar](2000) NULL,
> [SurveyID] [int] NOT NULL,
> [EntryDate] [datetime] NOT NULL,
> [Change] [bit] NULL,
> CONSTRAINT [PK_tblANSWER] PRIMARY KEY NONCLUSTERED
> (
> [ROW_ORDINAL] ASC
> ) ON [PRIMARY]
> ) ON [PRIMARY]
>
For what it's worth,
First, I have no idea what's really going on.
Second, this does not repro on SQL 2005.
Third the cause is QuestionNumber, not Answer.
[QuestionNumber] [nchar](50) NOT NULL,
Is a highly questionable choice of data type. Answer is variable length,
but QuestionNumber will always occupy 100 bytes on the page, no matter how
much data is in it.
Changing QuestionNumber to
[QuestionNumber] [nvarcharchar](50) NOT NULL,
Resolves the issue.
David|||"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:O9LaaVfJGHA.1132@.TK2MSFTNGP10.phx.gbl...

> For what it's worth,
> First, I have no idea what's really going on.
> Second, this does not repro on SQL 2005.
This is good news. :-)

> Third the cause is QuestionNumber, not Answer.
Interesting!

> [QuestionNumber] [nchar](50) NOT NULL,
> Is a highly questionable choice of data type.
Yes, well, unfortunately, the /schema/ is not something I have a lot of
choice in the matter about. Whether the field needs to be Unicode, or
whether the field needs to be fixed length, are both points I'd probably
agree with you in a debate. Unfortunately, it's what I have to work with.

> Answer is variable length,
Actually, answer is 'nchar 2000' -- also fixed length.
The history of these column specs is a function of the -source- database,
which is an Oracle database on the back-end of a web front-end. The SQL
Server is being used for analysis and reporting.

> but QuestionNumber will always occupy 100 bytes on the page, no matter how
> much data is in it.
> Changing QuestionNumber to
> [QuestionNumber] [nvarcharchar](50) NOT NULL,
> Resolves the issue.
Thank you for the tip. I'll try reproducing this 'fix' on my development
server.

> David
>|||"Lawrence Garvin" <onsitech@.news.postalias> wrote in message
news:%23iAAGRqJGHA.2668@.tk2msftngp13.phx.gbl...
> "David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
> message news:O9LaaVfJGHA.1132@.TK2MSFTNGP10.phx.gbl...
>
> This is good news. :-)
>
> Interesting!
>
> Yes, well, unfortunately, the /schema/ is not something I have a lot of
> choice in the matter about. Whether the field needs to be Unicode, or
> whether the field needs to be fixed length, are both points I'd probably
> agree with you in a debate. Unfortunately, it's what I have to work with.
>
> Actually, answer is 'nchar 2000' -- also fixed length.
>
No nullable char or nchar are actually variable length columns. That's a
SQL Server engine technical detail, but I suspect it's somehow at the root
of the problem here.
David|||The view that you are trying to create is not valid for an indexed
view.
Note the error from database engine :
Warning: The optimizer cannot use the index because the select list of
the view contains a non-aggregate expression.
Cheers,
Arun|||Gee.. thanks, Arun.
Do you have a WHY to go along with your statement?
The view -is- created, and it -is- usable, and it -did- cause errors when
certain other issues were not set correctly, -and- David's suggestion to
make questionnumber a nvarchar field -did- eliminate the reported error
message.
<arun.ns@.gmail.com> wrote in message
news:1138795905.429665.271770@.g43g2000cwa.googlegroups.com...
> The view that you are trying to create is not valid for an indexed
> view.
> Note the error from database engine :
> Warning: The optimizer cannot use the index because the select list of
> the view contains a non-aggregate expression.
>
> Cheers,
> Arun
>

Friday, February 17, 2012

Error Message 22029 on SQL Server 2005

Hello
I have a problem with the SQL Server 2005
This is the Version i am using:
Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
On the Server in the SQL Management Studio in a Query Window i execute the
command:
exec master..xp_sqlmaint '-D
kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
this is the output i get.
output
----
NULL
Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
Copyright (c) Microsoft Corporation.
NULL
NULL
Msg 22029, Level 16, State 1, Line 0
sqlmaint.exe failed.
The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL
Server\<Instance Name>\SETUP\SQLPATH is ok. There is the correct path for
the SQL Server Binary
There is no Path with "-S" involved in the operations.
Any suggestion is very appreciated.
Regards
Paolo TavernaI'd add a report file:
exec master..xp_sqlmaint '-D pubs -WriteHistory -Rpt "C:\a.txt" -CkDB -CkAl -CkCat -RebldIdx 10'
(Change database name)
You can now check this report file for error messages. Note that xp_sqlmaint is deprecated in
2005...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paolo Taverna" <nospam@.nospam.spm> wrote in message news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.phx.gbl...
> Hello
> I have a problem with the SQL Server 2005
> This is the Version i am using:
> Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
> Copyright (c) 1988-2005 Microsoft Corporation
> Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
> On the Server in the SQL Management Studio in a Query Window i execute the command:
> exec master..xp_sqlmaint '-D kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
> this is the output i get.
> output
> ----
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
> Copyright (c) Microsoft Corporation.
> NULL
> NULL
> Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\<Instance
> Name>\SETUP\SQLPATH is ok. There is the correct path for the SQL Server Binary
> There is no Path with "-S" involved in the operations.
> Any suggestion is very appreciated.
> Regards
> Paolo Taverna
>|||Hi Tibor
I executed xp_sqlmaint with the Parameter -Rpt like your sample. But the
Report File will not be generated. The remains the same Error.
Regards
Paolo Taverna
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> schrieb
im Newsbeitrag news:uZdSmi9MGHA.2124@.TK2MSFTNGP14.phx.gbl...
> I'd add a report file:
> exec master..xp_sqlmaint '-D pubs -WriteHistory -Rpt
> "C:\a.txt" -CkDB -CkAl -CkCat -RebldIdx 10'
> (Change database name)
> You can now check this report file for error messages. Note that
> xp_sqlmaint is deprecated in 2005...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paolo Taverna" <nospam@.nospam.spm> wrote in message
> news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.phx.gbl...
>> Hello
>> I have a problem with the SQL Server 2005
>> This is the Version i am using:
>> Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
>> Copyright (c) 1988-2005 Microsoft Corporation
>> Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
>> On the Server in the SQL Management Studio in a Query Window i execute
>> the command:
>> exec master..xp_sqlmaint '-D
>> kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
>> this is the output i get.
>> output
>> ----
>> NULL
>> Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
>> Copyright (c) Microsoft Corporation.
>> NULL
>> NULL
>> Msg 22029, Level 16, State 1, Line 0
>> sqlmaint.exe failed.
>>
>> The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL
>> Server\<Instance Name>\SETUP\SQLPATH is ok. There is the correct path for
>> the SQL Server Binary
>> There is no Path with "-S" involved in the operations.
>> Any suggestion is very appreciated.
>> Regards
>> Paolo Taverna
>|||Hello
Don't mind about this thread. I replaced SQLMaint with a SSIS Package for
the Database Consistency and Index Rebuild. This works fine
Regards
Paolo Taverna
"Paolo Taverna" <nospam@.nospam.spm> schrieb im Newsbeitrag
news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.phx.gbl...
> Hello
> I have a problem with the SQL Server 2005
> This is the Version i am using:
> Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
> Copyright (c) 1988-2005 Microsoft Corporation
> Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
> On the Server in the SQL Management Studio in a Query Window i execute the
> command:
> exec master..xp_sqlmaint '-D
> kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
> this is the output i get.
> output
> ----
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
> Copyright (c) Microsoft Corporation.
> NULL
> NULL
> Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL
> Server\<Instance Name>\SETUP\SQLPATH is ok. There is the correct path for
> the SQL Server Binary
> There is no Path with "-S" involved in the operations.
> Any suggestion is very appreciated.
> Regards
> Paolo Taverna
>

Error Message 22029 on SQL Server 2005

Hello
I have a problem with the SQL Server 2005
This is the Version i am using:
Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
On the Server in the SQL Management Studio in a Query Window i execute the
command:
exec master..xp_sqlmaint '-D
kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
this is the output i get.
output
NULL
Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
Copyright (c) Microsoft Corporation.
NULL
NULL
Msg 22029, Level 16, State 1, Line 0
sqlmaint.exe failed.
The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL
Server\<Instance Name>\SETUP\SQLPATH is ok. There is the correct path for
the SQL Server Binary
There is no Path with "-S" involved in the operations.
Any suggestion is very appreciated.
Regards
Paolo Taverna
I'd add a report file:
exec master..xp_sqlmaint '-D pubs -WriteHistory -Rpt "C:\a.txt" -CkDB -CkAl -CkCat -RebldIdx 10'
(Change database name)
You can now check this report file for error messages. Note that xp_sqlmaint is deprecated in
2005...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paolo Taverna" <nospam@.nospam.spm> wrote in message news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.phx.gbl...
> Hello
> I have a problem with the SQL Server 2005
> This is the Version i am using:
> Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
> Copyright (c) 1988-2005 Microsoft Corporation
> Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
> On the Server in the SQL Management Studio in a Query Window i execute the command:
> exec master..xp_sqlmaint '-D kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
> this is the output i get.
> output
> ----
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
> Copyright (c) Microsoft Corporation.
> NULL
> NULL
> Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\<Instance
> Name>\SETUP\SQLPATH is ok. There is the correct path for the SQL Server Binary
> There is no Path with "-S" involved in the operations.
> Any suggestion is very appreciated.
> Regards
> Paolo Taverna
>
|||Hi Tibor
I executed xp_sqlmaint with the Parameter -Rpt like your sample. But the
Report File will not be generated. The remains the same Error.
Regards
Paolo Taverna
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> schrieb
im Newsbeitrag news:uZdSmi9MGHA.2124@.TK2MSFTNGP14.phx.gbl...
> I'd add a report file:
> exec master..xp_sqlmaint '-D pubs -WriteHistory -Rpt
> "C:\a.txt" -CkDB -CkAl -CkCat -RebldIdx 10'
> (Change database name)
> You can now check this report file for error messages. Note that
> xp_sqlmaint is deprecated in 2005...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paolo Taverna" <nospam@.nospam.spm> wrote in message
> news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.phx.gbl...
>
|||Hello
Don't mind about this thread. I replaced SQLMaint with a SSIS Package for
the Database Consistency and Index Rebuild. This works fine
Regards
Paolo Taverna
"Paolo Taverna" <nospam@.nospam.spm> schrieb im Newsbeitrag
news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.phx.gbl...
> Hello
> I have a problem with the SQL Server 2005
> This is the Version i am using:
> Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
> Copyright (c) 1988-2005 Microsoft Corporation
> Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
> On the Server in the SQL Management Studio in a Query Window i execute the
> command:
> exec master..xp_sqlmaint '-D
> kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
> this is the output i get.
> output
> ----
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
> Copyright (c) Microsoft Corporation.
> NULL
> NULL
> Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL
> Server\<Instance Name>\SETUP\SQLPATH is ok. There is the correct path for
> the SQL Server Binary
> There is no Path with "-S" involved in the operations.
> Any suggestion is very appreciated.
> Regards
> Paolo Taverna
>

Error Message 22029 on SQL Server 2005

Hello
I have a problem with the SQL Server 2005
This is the Version i am using:
Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
On the Server in the SQL Management Studio in a Query Window i execute the
command:
exec master..xp_sqlmaint '-D
kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
this is the output i get.
output
----
NULL
Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
Copyright (c) Microsoft Corporation.
NULL
NULL
Msg 22029, Level 16, State 1, Line 0
sqlmaint.exe failed.
The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Mi
crosoft SQL
Server\<Instance Name>\SETUP\SQLPATH is ok. There is the correct path for
the SQL Server Binary
There is no Path with "-S" involved in the operations.
Any suggestion is very appreciated.
Regards
Paolo TavernaI'd add a report file:
exec master..xp_sqlmaint '-D pubs -WriteHistory -Rpt "C:\a.txt" -CkDB -CkAl
-CkCat -RebldIdx 10'
(Change database name)
You can now check this report file for error messages. Note that xp_sqlmaint
is deprecated in
2005...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paolo Taverna" <nospam@.nospam.spm> wrote in message news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.ph
x.gbl...
> Hello
> I have a problem with the SQL Server 2005
> This is the Version i am using:
> Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
> Copyright (c) 1988-2005 Microsoft Corporation
> Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
> On the Server in the SQL Management Studio in a Query Window i execute the
command:
> exec master..xp_sqlmaint '-D kunde -WriteHistory -CkDB -CkAl -CkCat -Rebld
Idx 10'
> this is the output i get.
> output
> ----
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
> Copyright (c) Microsoft Corporation.
> NULL
> NULL
> Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Mi
crosoft SQL Serve
r\<Instance
> Name>\SETUP\SQLPATH is ok. There is the correct path for the SQL Server Bi
nary
> There is no Path with "-S" involved in the operations.
> Any suggestion is very appreciated.
> Regards
> Paolo Taverna
>|||Hi Tibor
I executed xp_sqlmaint with the Parameter -Rpt like your sample. But the
Report File will not be generated. The remains the same Error.
Regards
Paolo Taverna
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> schrieb
im Newsbeitrag news:uZdSmi9MGHA.2124@.TK2MSFTNGP14.phx.gbl...
> I'd add a report file:
> exec master..xp_sqlmaint '-D pubs -WriteHistory -Rpt
> "C:\a.txt" -CkDB -CkAl -CkCat -RebldIdx 10'
> (Change database name)
> You can now check this report file for error messages. Note that
> xp_sqlmaint is deprecated in 2005...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paolo Taverna" <nospam@.nospam.spm> wrote in message
> news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.phx.gbl...
>|||Hello
Don't mind about this thread. I replaced SQLMaint with a SSIS Package for
the Database Consistency and Index Rebuild. This works fine
Regards
Paolo Taverna
"Paolo Taverna" <nospam@.nospam.spm> schrieb im Newsbeitrag
news:%23OgxjZ9MGHA.2884@.TK2MSFTNGP12.phx.gbl...
> Hello
> I have a problem with the SQL Server 2005
> This is the Version i am using:
> Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37
> Copyright (c) 1988-2005 Microsoft Corporation
> Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
> On the Server in the SQL Management Studio in a Query Window i execute the
> command:
> exec master..xp_sqlmaint '-D
> kunde -WriteHistory -CkDB -CkAl -CkCat -RebldIdx 10'
> this is the output i get.
> output
> ----
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 9.00.1399.06
> Copyright (c) Microsoft Corporation.
> NULL
> NULL
> Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> The Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Mi
crosoft SQL
> Server\<Instance Name>\SETUP\SQLPATH is ok. There is the correct path for
> the SQL Server Binary
> There is no Path with "-S" involved in the operations.
> Any suggestion is very appreciated.
> Regards
> Paolo Taverna
>