Showing posts with label object. Show all posts
Showing posts with label object. Show all posts

Thursday, March 29, 2012

Error: duplicate key row

What might cause the following error when inserting rows in tables that have primary keys defined as IDENTITY (1,1)?

duplicate key row in object 'aa' with unique index 'aa'

I have seen this happen frequently when data has been bulk loaded sometime in the past into a table that has an IDENTITY key. This is especially common when you have a test environment in which some production data was bulk loaded to give some "good test data." To me it means that an identity number has "already been used" as a record key.


Dave

|||The rows are inserted one at a time using the parent IDENTITY key as a FK constraint in the child table which also has an IDENTITY KEY. However, this scenario does not sound like it would cause an error.|||

Can you post the table structures? That would help us to see what your problem might be.

If you can post a few statements that cause the duplicates, that would even be better.

|||

If you have the property NOT FOR REPLICATION enabled for the identity column.

Merging changes would allow the exact id values to be inserted rather than a new value that would give the error if same id value exists in the participating server.

similarly, if you are trying to insert manually using SET IDENTITY_INSERT table ON...

Monday, March 26, 2012

Error: 7886, Severity: 20, State: 1.

Hi All

I am seeing this error being logged in my SQL 2005 Ent machine

A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated.

It seems to be arising out of a read of a text column.

Any info on this will be appreciated. Thanks

K T

You're not running CTP version, right?

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=233339&SiteID=1|||

No

Its build 9.0.2153

|||

Hi Kts,

Do you use Row versioning in you database?

I waiting for your answer.

Regards,

|||

No !

|||

Hi kts,

What you TRANSACTION ISOLATION LEVEL do you run the code?

Can you post the query here?

Regards,

|||

hi

Like the message says READ UNCOMMITTED . its actually just a select with NO LOCK. The problem is I can only guess which proc it is but not know for sure as I am not able to recreate the problem manually.

|||

Ah, you use 'nolock' hint. There are issues with using such hint. I suggest you take a look at the following KB.

http://search.support.microsoft.com/kb/235880

|||

I'm still having the same problem..

My sql query results about 100Mb of information.

What can I do?

Error: 7886, Severity: 20, State: 1.

Hi All

I am seeing this error being logged in my SQL 2005 Ent machine

A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated.

It seems to be arising out of a read of a text column.

Any info on this will be appreciated. Thanks

K T

You're not running CTP version, right?

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=233339&SiteID=1|||

No

Its build 9.0.2153

|||

Hi Kts,

Do you use Row versioning in you database?

I waiting for your answer.

Regards,

|||

No !

|||

Hi kts,

What you TRANSACTION ISOLATION LEVEL do you run the code?

Can you post the query here?

Regards,

|||

hi

Like the message says READ UNCOMMITTED . its actually just a select with NO LOCK. The problem is I can only guess which proc it is but not know for sure as I am not able to recreate the problem manually.

|||

Ah, you use 'nolock' hint. There are issues with using such hint. I suggest you take a look at the following KB.

http://search.support.microsoft.com/kb/235880

|||

I'm still having the same problem..

My sql query results about 100Mb of information.

What can I do?

Error: 644

I get this warning when I do a dbcc checkdb:

Server: Msg 2750, Level 16, State 4, Line 2
Warning: Page (1:300465), Slot 9 in object 2009058193 Index 0 Column Val value -1.#QNAN is out of range for data type "real". Update column to a legal value.

A service using a stored procedure result in the following errir in the event log:

Error 644, Severity: 21, State 5
Could not find the index entry for RID '16ca8880200' in index page (1:31928), index ID 7, database 'BPS'.

I have tried 'dbcc checkdb' and 'dbcc checktable' both with option REPAIR_REBUILD and I have tried 'dbcc reindex' but none of them helped.

Are there other options or can I find the column that shall be updated to a legal value?Did you get any error messages when your ran the DBCC's?

Sounds like a corruption problem to me...

Can you export the data? You may need to do it in ranges...you'll find there will be probably 1 corrupt row...

SELECT * FROM myTable WHERE identity < 1000
and so on...do a binary search..start at the middle your data...

In either Case, you'll either need to do a restore (which hopefully isn't corrupt), or export the data and build a new db...don't know what else could be hosed..

But that's only my own opinion (MOO)|||Have you tried to drop the index and recreate it ?
Have you used the REPAIR_ALLOW_DATA_LOSS option ?

Sunday, March 11, 2012

ERROR: "activex component can't create object: 'excel.application'"

When I run a DTS, I get the following error.
Error I get: "activex component can't create object:
'excel.application'"
I was told not to load excel into sql server. Well, in any case, there
should not be any need to load excel, it recognizes the excel component
in the DTS, that means, it should be recognizing excel.
Please assist.
Thx,
Swim.
'***************************************
*******************************
' Visual Basic Transformation Script
'***************************************
*********************************
Function Main()
' Initialise dimensions
Dim appExcel
Dim newBook
Dim oSheet
Dim oPackage
Dim oConn
'Set excel objects
Set appExcel = CreateObject("Excel.Application")
Set newBook = appExcel.Workbooks.Add
Set oSheet = newBook.Worksheets(1)
' Populate heading columns for mapping purposes and display in excel
oSheet.Range("A1").Value = "Col1"
oSheet.Range("B1").Value = "Col2"
oSheet.Range("C1").Value = "Col3"
oSheet.Range("D1").Value = "Col4"
'Dynamically specify the name of the new Excel file to be created and
exported to
DTSGlobalVariables("fileName").Value = "C:\Rpts\cc\a.xls"
'" & DTSGlobalVariables("gvID").value & ".xls"
With newBook
.SaveAs DTSGlobalVariables("fileName").Value
.save
End With
appExcel.quit
set oPackage = DTSGlobalVariables.parent
'connection 2 is to the Excel file
set oConn = oPackage.connections(2)
oConn.datasource = DTSGlobalVariables("fileName").Value
'Destroy objects
set oPackage = nothing
set oConn = nothing
Main = DTSTaskExecResult_Success 'End on success
End FunctionIs your DTS package just exporting to or import from Excel or is it
instantiating Excel from a VBScript task?
"Swim" <crombusch@.gmail.com> wrote in message
news:1134093275.263026.230460@.g44g2000cwa.googlegroups.com...
> When I run a DTS, I get the following error.
> Error I get: "activex component can't create object:
> 'excel.application'"
> I was told not to load excel into sql server. Well, in any case, there
> should not be any need to load excel, it recognizes the excel component
> in the DTS, that means, it should be recognizing excel.
> Please assist.
> Thx,
> Swim.
>
>
>
>
> '***************************************
*******************************
> ' Visual Basic Transformation Script
> '***************************************
*********************************
> Function Main()
> ' Initialise dimensions
> Dim appExcel
> Dim newBook
> Dim oSheet
> Dim oPackage
> Dim oConn
> 'Set excel objects
> Set appExcel = CreateObject("Excel.Application")
> Set newBook = appExcel.Workbooks.Add
> Set oSheet = newBook.Worksheets(1)
> ' Populate heading columns for mapping purposes and display in excel
> oSheet.Range("A1").Value = "Col1"
> oSheet.Range("B1").Value = "Col2"
> oSheet.Range("C1").Value = "Col3"
> oSheet.Range("D1").Value = "Col4"
>
> 'Dynamically specify the name of the new Excel file to be created and
> exported to
> DTSGlobalVariables("fileName").Value = "C:\Rpts\cc\a.xls"
> '" & DTSGlobalVariables("gvID").value & ".xls"
> With newBook
> .SaveAs DTSGlobalVariables("fileName").Value
> .save
> End With
> appExcel.quit
> set oPackage = DTSGlobalVariables.parent
> 'connection 2 is to the Excel file
> set oConn = oPackage.connections(2)
> oConn.datasource = DTSGlobalVariables("fileName").Value
> 'Destroy objects
> set oPackage = nothing
> set oConn = nothing
> Main = DTSTaskExecResult_Success 'End on success
> End Function
>

Friday, March 9, 2012

Error... Invalid object name data1.

I have a db that has a table x in it called data1

I have a program that does to things, updates values in the data1
table and also inserts new rows into this table. The update existing
values works great. Then when the insert loop runs, I get this error
on the following line.

insert into data1 ('AdminManageLogIn','Password') Values ('123','222')

Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'data1'.

I am connected to the table x in the earlier step, I do the update
and all is fine then I change the sql statement to

insert into data1 ('AdminManageLogIn','Password') Values ('123','222')

and it gives me this error.

Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'data1'.

Thanks in advance for your assistance.
Dean-OIf you are sure you are in the right database then I would look at WHO owns
data1. For your statement to work it either needs to be you ir dbo.
Anybody else and it will throw your error.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know

"rockie12" <rockie12@.dtnspeed.net> wrote in message
news:d10dd1b6.0407190412.104bb5dd@.posting.google.c om...
> I have a db that has a table x in it called data1
> I have a program that does to things, updates values in the data1
> table and also inserts new rows into this table. The update existing
> values works great. Then when the insert loop runs, I get this error
> on the following line.
> insert into data1 ('AdminManageLogIn','Password') Values ('123','222')
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'data1'.
> I am connected to the table x in the earlier step, I do the update
> and all is fine then I change the sql statement to
> insert into data1 ('AdminManageLogIn','Password') Values ('123','222')
> and it gives me this error.
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'data1'.
> Thanks in advance for your assistance.
> Dean-O|||"rockie12" <rockie12@.dtnspeed.net> wrote in message
news:d10dd1b6.0407190412.104bb5dd@.posting.google.c om...
> I have a db that has a table x in it called data1
> I have a program that does to things, updates values in the data1
> table and also inserts new rows into this table. The update existing
> values works great. Then when the insert loop runs, I get this error
> on the following line.
> insert into data1 ('AdminManageLogIn','Password') Values ('123','222')
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'data1'.
> I am connected to the table x in the earlier step, I do the update
> and all is fine then I change the sql statement to
> insert into data1 ('AdminManageLogIn','Password') Values ('123','222')
> and it gives me this error.
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'data1'.
> Thanks in advance for your assistance.
> Dean-O

First., you should remove the quotes around your column names:

insert into data1 (AdminManageLogIn,Password) Values ('123','222')

You should also check the owner of the object - it's always good practice to
qualify the object name with its owner:

insert into dbo.data1 (AdminManageLogIn,Password) Values ('123','222')

Finally, another possibility is that your database is case-sensitive and the
correct object name is Data1 (or whatever) not data1.

Simon

Wednesday, March 7, 2012

Error with sqlxml and ServerXMLHTTP

After I installed windows 2003 sp1 in the server with iis the asp pages that
use the object "MSXML2.ServerXMLHTTP.3.0" and SQLXML 3.0 with sp1 started to
return errors:
ERROR: 400.100 Bad Request
HResult: 0x80004005
Source: Microsoft SQL isapi extension
Description: Query not specified
The code used is like this one:
<%@.language="VBScript"%>
<%
Response.Expires = 0
Response.CacheControl = "private"
Response.Buffer = True
dim objXMLDocument, vTabela
dim objSrvHTTP, sXml
dim vXMLTemplate
'this is the path of the virtual directory mangead by sqlxml 3.0
sXml = "http://s3iapps.tcontas.pt/gent"
vXMLTemplate = "<GENT xmlns:sql=""urn:schemas-microsoft-com:xml-sql""
sql:xsl=""forms/ResultadoPesqDel.xsl""><sql:query>exec usp_pesq_entidade
@.Colunas ='1010000100', @.Argumentos1 ='Design_Abrev like ''%cml%'' AND Estado
= ''A''',@.Argumentos2 ='',@.Argumentos3 ='', @.Descricao ='(sem descri??o)',
@.Funcionario =461, @.Gravar = 0,
@.vNomeTabela='0687972767815343'</sql:query></GENT>"
set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
set objXMLDocument = Server.CreateObject ("MSXML2.DOMDocument.3.0")
objXMLDocument.loadXML vXMLTemplate
objSrvHTTP.setTimeouts 0, 0, (15 * 1000000), (15 * 1000000)
objSrvHTTP.open "POST",sXml, false
objSrvHTTP.setRequestHeader "Content-Type", "application/xml"
objSrvHTTP.send objXMLDocument
Response.ContentType = "text/html"
Response.CharSet = "iso-8859-1"
Response.Write objSrvHTTP.responseText
%>
Any help is welcome,
thanks in advance
Joao Carlos
Which version of the OS did you upgrade from?
Also, you may want to check out SQLXML 3.0 SP3 - the latest and greatest
version of SQLXML 3.0 from
http://www.microsoft.com/downloads/d...displaylang=en
Thanks,
Adam Wiener [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"jcc" <jcc@.discussions.microsoft.com> wrote in message
news:DA9E6B50-EDE2-443B-9949-001CEE4C30F6@.microsoft.com...
> After I installed windows 2003 sp1 in the server with iis the asp pages
that
> use the object "MSXML2.ServerXMLHTTP.3.0" and SQLXML 3.0 with sp1 started
to
> return errors:
> ERROR: 400.100 Bad Request
> HResult: 0x80004005
> Source: Microsoft SQL isapi extension
> Description: Query not specified
>
> The code used is like this one:
> <%@.language="VBScript"%>
>
> <%
> Response.Expires = 0
> Response.CacheControl = "private"
> Response.Buffer = True
> dim objXMLDocument, vTabela
> dim objSrvHTTP, sXml
> dim vXMLTemplate
> 'this is the path of the virtual directory mangead by sqlxml 3.0
> sXml = "http://s3iapps.tcontas.pt/gent"
> vXMLTemplate = "<GENT xmlns:sql=""urn:schemas-microsoft-com:xml-sql""
> sql:xsl=""forms/ResultadoPesqDel.xsl""><sql:query>exec usp_pesq_entidade
> @.Colunas ='1010000100', @.Argumentos1 ='Design_Abrev like ''%cml%'' AND
Estado
> = ''A''',@.Argumentos2 ='',@.Argumentos3 ='', @.Descricao ='(sem descrio)',
> @.Funcionario =461, @.Gravar = 0,
> @.vNomeTabela='0687972767815343'</sql:query></GENT>"
> set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
> set objXMLDocument = Server.CreateObject ("MSXML2.DOMDocument.3.0")
> objXMLDocument.loadXML vXMLTemplate
> objSrvHTTP.setTimeouts 0, 0, (15 * 1000000), (15 * 1000000)
> objSrvHTTP.open "POST",sXml, false
> objSrvHTTP.setRequestHeader "Content-Type", "application/xml"
> objSrvHTTP.send objXMLDocument
> Response.ContentType = "text/html"
> Response.CharSet = "iso-8859-1"
> Response.Write objSrvHTTP.responseText
> %>
>
> Any help is welcome,
> thanks in advance
> Joao Carlos

Error with sqlxml and ServerXMLHTTP

After I installed windows 2003 sp1 in the server with iis the asp pages that
use the object "MSXML2.ServerXMLHTTP.3.0" and SQLXML 3.0 with sp1 started to
return errors:
ERROR: 400.100 Bad Request
HResult: 0x80004005
Source: Microsoft SQL isapi extension
Description: Query not specified
The code used is like this one:
<%@.language="VBScript"%>
<%
Response.Expires = 0
Response.CacheControl = "private"
Response.Buffer = True
dim objXMLDocument, vTabela
dim objSrvHTTP, sXml
dim vXMLTemplate
'this is the path of the virtual directory mangead by sqlxml 3.0
sXml = "http://s3iapps.tcontas.pt/gent"
vXMLTemplate = "<GENT xmlns:sql=""urn:schemas-microsoft-com:xml-sql""
sql:xsl=""forms/ResultadoPesqDel.xsl""><sql:query>exec usp_pesq_entidade
@.Colunas ='1010000100', @.Argumentos1 ='Design_Abrev like ''%cml%'' AND Estad
o
= ''A''',@.Argumentos2 ='',@.Argumentos3 ='', @.Descricao ='(sem descri??o)',
@.Funcionario =461, @.Gravar = 0,
@.vNomeTabela='0687972767815343'</sql:query></GENT>"
set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
set objXMLDocument = Server.CreateObject ("MSXML2.DOMDocument.3.0")
objXMLDocument.loadXML vXMLTemplate
objSrvHTTP.setTimeouts 0, 0, (15 * 1000000), (15 * 1000000)
objSrvHTTP.open "POST",sXml, false
objSrvHTTP.setRequestHeader "Content-Type", "application/xml"
objSrvHTTP.send objXMLDocument
Response.ContentType = "text/html"
Response.CharSet = "iso-8859-1"
Response.Write objSrvHTTP.responseText
%>
Any help is welcome,
thanks in advance
Joao CarlosWhich version of the OS did you upgrade from?
Also, you may want to check out SQLXML 3.0 SP3 - the latest and greatest
version of SQLXML 3.0 from
http://www.microsoft.com/downloads/...&displaylang=en
Thanks,
Adam Wiener [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"jcc" <jcc@.discussions.microsoft.com> wrote in message
news:DA9E6B50-EDE2-443B-9949-001CEE4C30F6@.microsoft.com...
> After I installed windows 2003 sp1 in the server with iis the asp pages
that
> use the object "MSXML2.ServerXMLHTTP.3.0" and SQLXML 3.0 with sp1 started
to
> return errors:
> ERROR: 400.100 Bad Request
> HResult: 0x80004005
> Source: Microsoft SQL isapi extension
> Description: Query not specified
>
> The code used is like this one:
> <%@.language="VBScript"%>
>
> <%
> Response.Expires = 0
> Response.CacheControl = "private"
> Response.Buffer = True
> dim objXMLDocument, vTabela
> dim objSrvHTTP, sXml
> dim vXMLTemplate
> 'this is the path of the virtual directory mangead by sqlxml 3.0
> sXml = "http://s3iapps.tcontas.pt/gent"
> vXMLTemplate = "<GENT xmlns:sql=""urn:schemas-microsoft-com:xml-sql""
> sql:xsl=""forms/ResultadoPesqDel.xsl""><sql:query>exec usp_pesq_entidade
> @.Colunas ='1010000100', @.Argumentos1 ='Design_Abrev like ''%cml%'' AND
Estado
> = ''A''',@.Argumentos2 ='',@.Argumentos3 ='', @.Descricao ='(sem descrio)',
> @.Funcionario =461, @.Gravar = 0,
> @.vNomeTabela='0687972767815343'</sql:query></GENT>"
> set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
> set objXMLDocument = Server.CreateObject ("MSXML2.DOMDocument.3.0")
> objXMLDocument.loadXML vXMLTemplate
> objSrvHTTP.setTimeouts 0, 0, (15 * 1000000), (15 * 1000000)
> objSrvHTTP.open "POST",sXml, false
> objSrvHTTP.setRequestHeader "Content-Type", "application/xml"
> objSrvHTTP.send objXMLDocument
> Response.ContentType = "text/html"
> Response.CharSet = "iso-8859-1"
> Response.Write objSrvHTTP.responseText
> %>
>
> Any help is welcome,
> thanks in advance
> Joao Carlos

error with scale-out web server: Invalid object name

We are adding a second web server to our farm. Reporting Services is installed on one web server as Rpt01 instance and works just fine. We have installed the second web server also with an instance named Rpt01 and are now trying to configure to re-use the same database as the first server. When we restart services we get the error listed below.

I was wondering if there was an issue with the same named instances on two different web servers accessing the same ReportServer01 database? This is the error that we are getting. Any help would be appreciated. The curious thing is that our databases are named ReportServer01 and ReportServer01TempDB and not the name listed below.

ReportingServicesService!schedule!4!1/23/2007-15:40:20:: Unhandled exception caught in Scheduling maintenance thread: System.Data.SqlClient.SqlException: Invalid object name 'ReportServerTempDB.dbo.ExecutionCache'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Library.SchedulePollWorker.ClearConsistancyFlag()
at Microsoft.ReportingServices.Library.SchedulePollWorker.CheckScheduleConsistancy(Object state)

Same Named instances should work fine. Check in the RSConfigTool for each instance in the webfarm , they are connected to ReportServer01 database and they are properly initialized. Was the second instance immediately joined in the farm or it operated as a standalone RS Server where some schedules were created?|||

Thanks for the response. The first instance may have had some schedules created but the second one was installed and configured immediately. I have uninstalled the second instance and reinstalled but am getting exact same issue. I used a different instance name this time, Rpt02, just so I could see reference differences.

Also when I uninstalled the second web server instance, it was never removed from the initialized list of the farm. I try to manually remove it using the Config tool and it gives an unknown error has occurred message. After reinstalling the second instance I am able to successfully add it to the initialized list. Still a little worried that an instance that no longer exists still appears in the list...

|||The uninstalled instance appearing in the initialization list should not be any problem. Are the schedules firing correctly now?|||No. Strangest thing... We can't get any subscriptions to work on this installation. We can create subscriptions and I see that the sql agent runs the scheduled job but then nothing else happens. No errors are logged and no mail arrives.|||I am now being told that if you rename your ReportServer database (which I did) and then set configuration to this database that this error could occur. I'm looking for the correct steps for renaming your ReportServer database. If anyone has them could you share? I will probably go back to the old name since it sounds like I am stuck with that name.|||

The problem has been fixed. I found one trigger in the ReportServer01 database that was referencing the old ReportServerTempDB database. I corrected the name and all is good now.

I'm told that we shouldn't change our database name after the ReportServer database has been created so I will follow that for future. Here's the trigger that I had to change.

CREATE TRIGGER [Schedule_UpdateExpiration] ON [dbo].[Schedule]
AFTER UPDATE
AS
UPDATE
EC
SET
AbsoluteExpiration = I.NextRunTime
FROM
[ReportServerTempDB].dbo.ExecutionCache AS EC
INNER JOIN ReportSchedule AS RS ON EC.ReportID = RS.ReportID
INNER JOIN inserted AS I ON RS.ScheduleID = I.ScheduleID AND RS.ReportAction = 3

GO

Sunday, February 19, 2012

Error While Scheduling the SSIS Package

Hello Everyone,
When i try to scedule a job on SQL Server Management Studio it gives the Following Error:

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectkey'.(Micorsoft.SqlServer.Smo)

Can anyone tell me why ?

MS SQL Server Details:

Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37 Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

Hi,

Do you have this file?

C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.SqlServer.Smo.dll

Regards,

Janos

|||Yes, File is there on the specified path.

|||

Well, I got the same error one time, as far as I remember, I repaired my installation of SQL Server client tool.

Try to repair it please.

regards,

Janos

|||thanks janos,

i have a local server installed on my workstation along with sp2.
Do you really think reinstalling the server will work ?
|||

Well, It worked for me Wink

Maybe you just repair your installation will be enough.

Regards,

Janos

|||Is there any option for repairing the server ?
Coz i haven't seen any while installing.
|||Did you manage to find a solution for this problem? I get the same error when trying to create an Agent job. I've repaired the SQL Native Client but to no avail. I still get the error.
|||No, not yet !!! I am still working on it.
One of the forum member advised me to repair the server but for you if it did not work, then i am doubtful.
|||You can repair the application from "Programs and Features" (Vista) or "Add/Remove Programs" (XP) in control panel|||

Hi Vick,

I just realized something. I saw the error message contains the SQL build w/o service pack, but you wrote you have SP2 installed (but maybe just for database services and SSMS or just SSIS). Have you tried to install the SP2 to the SSIS or those, where not installed?

Regards,

Janos

|||No, Its not working even after repairing the server.

Thanks
Janos
|||Sorry Vick, I'm out of ideas. I tried to recreate the same error on a virtual machine, but no luck. Sad I'm sorry.|||Hi Janos,

Sp2 is not specific to the service you are using. It upgrades all the services of server (EE, DE, SE, etc).

Check out the link
http://www.microsoft.com/downloads/details.aspx?familyid=d07219b2-1e23-49c8-8f0c-63fa18f26d3a&displaylang=en
|||check out the post.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1793362&SiteID=1

check if you are experiencing the same.

Error while refreshing the Datasource View

This is the error im getting while refreshing the Data Source View.

Microsoft.AnalysisServices.Design

Object reference not set to an instance of an object.

Did any one faced the same error.

Thanks in Advance

See reply on another post on the same matter: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=689195&SiteID=1

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, February 15, 2012

Error while creating a new view

I get the message "There is already an object named 'xxx' in the
database. I was creating a new view and had an error on it. I fixed the
error and resubmitted the create view and I received this error
message. I tried to find the view but it was not there. It must have
created an object with that name somewhere in the data base. How do I
find the object and remove it?I forgot to mention that I am using SQL Server 2000.|||I forgot to mention that I am using SQL Server 2000.|||Add this at the top before your Create View statement:
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'thenameofyourview')
DROP VIEW thenameofyourview
GO
"moonflower" <Jack_S_Owens@.hotmail.com> wrote in message
news:1132166124.934501.74210@.f14g2000cwb.googlegroups.com...
>I get the message "There is already an object named 'xxx' in the
> database. I was creating a new view and had an error on it. I fixed the
> error and resubmitted the create view and I received this error
> message. I tried to find the view but it was not there. It must have
> created an object with that name somewhere in the data base. How do I
> find the object and remove it?
>|||When I put the IF statement before the Create View statement in the SQL
QueryAnalyzer program I get an error message " CREATE VIEW must be the
first statement in a query batch". Where can I run these statements and
not get the new error message?|||"moonflower" <Jack_S_Owens@.hotmail.com> wrote in message
news:1132166124.934501.74210@.f14g2000cwb.googlegroups.com...
>I get the message "There is already an object named 'xxx' in the
> database. I was creating a new view and had an error on it. I fixed the
> error and resubmitted the create view and I received this error
> message. I tried to find the view but it was not there. It must have
> created an object with that name somewhere in the data base. How do I
> find the object and remove it?
>
IF object_ID('xxx') is not null
exec ( 'drop view xxx' )
go
create view xxx
as
select 1234
GO
How are you looking for the view ?
Have you hit REFRESH ?
S.|||Use the IF before the DROP VIEW command. Then execute CREATE VIEW in its own
batch (after GO).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"moonflower" <Jack_S_Owens@.hotmail.com> wrote in message
news:1132179017.603657.268500@.g49g2000cwa.googlegroups.com...
> When I put the IF statement before the Create View statement in the SQL
> QueryAnalyzer program I get an error message " CREATE VIEW must be the
> first statement in a query batch". Where can I run these statements and
> not get the new error message?
>