Friday, February 24, 2012

Error:208 [SQL Server] Invalid Object Name

Hello I was adding a line to a store procedure in MS SQL 6.5 when I saved the server gave an error about the stored procedure being more than 255 lines after my edit. I selected NO to save changes but when the Enterprise Manager windows refreshed the stored procedure was gone from the list I had backed up the text of the SP in a text file so I open a new SP windows, pasted in the text, but received the Error: 208 Invalid Object Name error when I tried to hit save. Rebooted the server...same issue. I have checked at least 10 times and SP is not listed. I have modified nothing about this SP so would think it would just 'go back in. Anyhelp would be greatly appreciated Thanks in advance.BK,Try running a DROP PROCEDURE [myProcName] to see if that wipes it out beforeyou attempt to create it again.James Hokes"BK" <bakzzkk@.charter.net> wrote in messagenews:2248F174-8440-442F-8F09-031A679ADE52@.microsoft.com...> Hello,> I was adding a line to a store procedure in MS SQL 6.5 when I saved theserver gave an error about the stored procedure being more than 255 linesafter my edit. I selected NO to save changes but when the EnterpriseManager windows refreshed the stored procedure was gone from the list.> I had backed up the text of the SP in a text file so I open a new SPwindows, pasted in the text, but received the Error: 208 Invalid Object Nameerror when I tried to hit save. Rebooted the server...same issue. I havechecked at least 10 times and SP is not listed. I have modified nothingabout this SP so would think it would just 'go back in.'> Anyhelp would be greatly appreciated.> Thanks in advance.|||=?Utf-8?B?Qks=?= (bakzzkk@.charter.net) writes:> I was adding a line to a store procedure in MS SQL 6.5 when I saved the> server gave an error about the stored procedure being more than 255> lines after my edit. I selected NO to save changes but when the> Enterprise Manager windows refreshed the stored procedure was gone from> the list.> I had backed up the text of the SP in a text file so I open a new SP> windows, pasted in the text, but received the Error: 208 Invalid Object> Name error when I tried to hit save. Rebooted the server...same issue.> I have checked at least 10 times and SP is not listed. I have modified> nothing about this SP so would think it would just 'go back in.'So which name did SQL Server list in the 208 message? I would guessthat you are trying to create the procedure in the wrong database, andone or more tables that the procedure refers to does not exist in thisdatabase.You could also try to create the procedure through a query window.Erland Sommarskog, SQL Server MVP, sommar@.algonet.seBooks Online for SQL Server SP3 athttp://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp|||Hi,Before creating the procedure , can you login to ISQLW and run the belowselect statement on your databaseselect name from sysobjects where type='p' and name ='name of the procedure'Incase if the statement return values , use drop proc <proc name> to drop.After this cut and paste the procedure in the same window and create theprocedure.ThanksHariMCDBA"Erland Sommarskog" <sommar@.algonet.se> wrote in messagenews:Xns94657977BE41Yazorman@.127.0.0.1...> =?Utf-8?B?Qks=?= (bakzzkk@.charter.net) writes:> > I was adding a line to a store procedure in MS SQL 6.5 when I saved the> > server gave an error about the stored procedure being more than 255> > lines after my edit. I selected NO to save changes but when the> > Enterprise Manager windows refreshed the stored procedure was gone from> > the list.> >> > I had backed up the text of the SP in a text file so I open a new SP> > windows, pasted in the text, but received the Error: 208 Invalid Object> > Name error when I tried to hit save. Rebooted the server...same issue.> > I have checked at least 10 times and SP is not listed. I have modified> > nothing about this SP so would think it would just 'go back in.'> So which name did SQL Server list in the 208 message? I would guess> that you are trying to create the procedure in the wrong database, and> one or more tables that the procedure refers to does not exist in this> database.> You could also try to create the procedure through a query window.>> --> Erland Sommarskog, SQL Server MVP, sommar@.algonet.se> Books Online for SQL Server SP3 at> http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp|||A common reason for this in SQL 6.5 is that the sp refers to a temp table...If it does, you must create the temp table, then create the sp, then dropthe temp table to get the sp created.--Wayne Snyder, MCDBA, SQL Server MVPComputer Education Services Corporation (CESC), Charlotte, NCwww.computeredservices.com(Please respond only to the newsgroups.)I support the Professional Association of SQL Server (PASS) and it'scommunity of SQL Server professionals.www.sqlpass.org"BK" <bakzzkk@.charter.net> wrote in messagenews:2248F174-8440-442F-8F09-031A679ADE52@.microsoft.com...> Hello,> I was adding a line to a store procedure in MS SQL 6.5 when I saved theserver gave an error about the stored procedure being more than 255 linesafter my edit. I selected NO to save changes but when the EnterpriseManager windows refreshed the stored procedure was gone from the list.> I had backed up the text of the SP in a text file so I open a new SPwindows, pasted in the text, but received the Error: 208 Invalid Object Nameerror when I tried to hit save. Rebooted the server...same issue. I havechecked at least 10 times and SP is not listed. I have modified nothingabout this SP so would think it would just 'go back in.'> Anyhelp would be greatly appreciated.> Thanks in advance.|||Hi BrandonCan you try using isqlw instead of EM to create the proc from your savedtext file.If that doesn't help, can you post the text of the procedure?--HTH--Kalen DelaneySQL Server MVPwww.SolidQualityLearning.com"BK" <bakzzkk@.charter.net> wrote in messagenews:2248F174-8440-442F-8F09-031A679ADE52@.microsoft.com...> Hello,> I was adding a line to a store procedure in MS SQL 6.5 when I saved theserver gave an error about the stored procedure being more than 255 linesafter my edit. I selected NO to save changes but when the EnterpriseManager windows refreshed the stored procedure was gone from the list.> I had backed up the text of the SP in a text file so I open a new SPwindows, pasted in the text, but received the Error: 208 Invalid Object Nameerror when I tried to hit save. Rebooted the server...same issue. I havechecked at least 10 times and SP is not listed. I have modified nothingabout this SP so would think it would just 'go back in.'> Anyhelp would be greatly appreciated.> Thanks in advance.