ExamNotes.net  -  IT certification portal

ForumsCertResearchTop sitesNewslettersFree email
HomeRegister


Exams Notes
Practice exams
Exam games
Questions by email
Online training
Training videos
College degrees
Boot camps
Book store
Links directory
Tell a friend
For webmasters




General discussions > Public newsgroups > microsoft.public.sqlserver.server > HELP!!!! Bugged SQL Server 2000 -Unable to run rename script

Show a Printable Version
Email This Page to Someone!
Receive updates to this thread



Author HELP!!!! Bugged SQL Server 2000 -Unable to run rename script
Preetham
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
HELP!!!! Bugged SQL Server 2000 -Unable to run rename script

I wanted to change the dbschema and renamed all the table
and columns in the enterprise manger and saved the rename
scripts, but when i try to run in the live database one by
one i get the error as
Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
Line 163
Error: The parameter @oldname is either ambiguous or the
claimed @itemtype (COLUMN) was wrong.
i'm unable to run any scripts and i cant do without proper
scripts as i have to rename several other tables in 15
other similar databses with data in it.
would be ever grateful for any fast help
Thanx in advance.

here is the sample script that was generated

/*

Thursday, November 21, 2002 12:09:13 AM

User: sa

Server: NG00000

Database: DB_new

Application: MS SQLEM - Data Tools

*/



BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
EXECUTE sp_rename N'dbo.tbl_City.CityId',
N'Tmp_fld_CityId_210', 'COLUMN'
GO
EXECUTE sp_rename N'dbo.tbl_City.City',
N'Tmp_fld_City_211', 'COLUMN'
GO
EXECUTE sp_rename N'dbo.tbl_City.CityCode',
N'Tmp_fld_CityCode_212', 'COLUMN'
GO
EXECUTE sp_rename N'dbo.tbl_City.StateId',
N'Tmp_fld_StateId_213', 'COLUMN'
GO
EXECUTE sp_rename N'dbo.tbl_City.Tmp_fld_CityId_210',
N'fld_CityId', 'COLUMN'
GO
EXECUTE sp_rename N'dbo.tbl_City.Tmp_fld_City_211',
N'fld_City', 'COLUMN'
GO
EXECUTE sp_rename N'dbo.tbl_City.Tmp_fld_CityCode_212',
N'fld_CityCode', 'COLUMN'
GO
EXECUTE sp_rename N'dbo.tbl_City.Tmp_fld_StateId_213',
N'fld_StateId', 'COLUMN'
GO
COMMIT

Report this post to a moderator

Old Post 11-28-02 07:23 PM
Reply w/Quote Edit/Delete Message IP: Logged
All times are GMT.
Post new thread   Post reply


Forum Jump:
Rate This Thread:
Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is OFF.
 

ExamNotes forum archive


Powered by: vBulletin 2.2.8
Copyright ©2000, Jelsoft Enterprises Limited.

  Free Braindumps | mcse braindumps