Home All Groups Group Topic Archive Search About

Renaming a diagram in SQL Server Management Studio

Author
5 Mar 2007 12:31 AM
Paul J
Hello, I have MS SQL 2005 installed on my server. When I tried to rename a
diagram, I received an error. Is it possible to rename a diagram, or I need
to create a new one and copy the contents? Does this problem exist only in my
installation, or does anyone else have the same problem? Thank you for
response. Here is the error message (renaming Diagram1 to Diagram2):

TITLE: Microsoft SQL Server Management Studio
------------------------------

Unable to rename Diagram2. (ObjectExplorer)

------------------------------
ADDITIONAL INFORMATION:

Could not find stored procedure 'dbo.sp_renamediagram'. (Microsoft SQL
Server, Error: 2812)

For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=2812&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Author
5 Mar 2007 3:29 AM
Steve
On Mar 4, 4:31 pm, Paul J <P***@discussions.microsoft.com> wrote:
Show quote
> Hello, I have MS SQL 2005 installed on my server. When I tried to rename a
> diagram, I received an error. Is it possible to rename a diagram, or I need
> to create a new one and copy the contents? Does this problem exist only in my
> installation, or does anyone else have the same problem? Thank you for
> response. Here is the error message (renaming Diagram1 to Diagram2):
>
> TITLE: Microsoft SQL Server Management Studio
> ------------------------------
>
> Unable to rename Diagram2. (ObjectExplorer)
>
> ------------------------------
> ADDITIONAL INFORMATION:
>
> Could not find stored procedure 'dbo.sp_renamediagram'. (Microsoft SQL
> Server, Error: 2812)
>
> For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=...
>
> ------------------------------
> BUTTONS:
>
> OK
> ------------------------------

You should be able to rename a diagram.
When you created the first diagram in the database you should have
seen a message that database objects needed for diagrams would be
created and the following ojects should have been created:

sp_helpdiagramdefinition
sp_creatediagram
sp_renamediagram
sp_alterdiagram
sp_dropdiagram
fn_diagramobjects
sp_upgraddiagrams
sysdiagrams
PK__sysdiagrams__ID
UK_principal_name
sp_helpdiagrams
Author
5 Mar 2007 10:27 PM
Erland Sommarskog
Paul J (Pa***@discussions.microsoft.com) writes:
> Hello, I have MS SQL 2005 installed on my server. When I tried to rename
> a diagram, I received an error. Is it possible to rename a diagram, or I
> need to create a new one and copy the contents? Does this problem exist
> only in my installation, or does anyone else have the same problem?
> Thank you for response. Here is the error message (renaming Diagram1 to
> Diagram2):
>
> TITLE: Microsoft SQL Server Management Studio
> ------------------------------
>
> Unable to rename Diagram2. (ObjectExplorer)
>

To add to Steve's post, create some other database and add diagrams there.
Then do this from a query window:

  sp_helptext sp_renamediagram

Copy and paste, and the run the script in the database you are having
problem with. This should work. (But I have not actually tested.)



--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Author
6 Mar 2007 3:11 PM
Paul J
"Erland Sommarskog" wrote:
>
> To add to Steve's post, create some other database and add diagrams there.
> Then do this from a query window:
>
>   sp_helptext sp_renamediagram
>
> Copy and paste, and the run the script in the database you are having
> problem with. This should work. (But I have not actually tested.)
>
>
>

I already had the procedure there. But it doesn't work even after launching
the script... It works in new DB, so I will switch my objects data to the new
one. I still don't know what's wrong, but I believe it won't happen again :-)
If you still think you can help me with this issue, feel free to ask me for
all information you need. Resolving of this problem would save me much time.

Thank you
Author
6 Mar 2007 11:10 PM
Erland Sommarskog
Paul J (Pa***@discussions.microsoft.com) writes:
> I already had the procedure there. But it doesn't work even after
> launching the script... It works in new DB, so I will switch my objects
> data to the new one. I still don't know what's wrong, but I believe it
> won't happen again :-) If you still think you can help me with this
> issue, feel free to ask me for all information you need. Resolving of
> this problem would save me much time.

What does

   SELECT schema_id, schema_name(schema_id)
   FROM sys.objects WHERE name = 'sp_renamediagram'

return?


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Author
10 Mar 2007 2:30 PM
Paul J
1 dbo

Show quote
"Erland Sommarskog" wrote:

> Paul J (Pa***@discussions.microsoft.com) writes:
> > I already had the procedure there. But it doesn't work even after
> > launching the script... It works in new DB, so I will switch my objects
> > data to the new one. I still don't know what's wrong, but I believe it
> > won't happen again :-) If you still think you can help me with this
> > issue, feel free to ask me for all information you need. Resolving of
> > this problem would save me much time.
>
> What does
>
>    SELECT schema_id, schema_name(schema_id)
>    FROM sys.objects WHERE name = 'sp_renamediagram'
>
> return?
>
>
> --
> Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>

AddThis Social Bookmark Button