Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Server DBA

Posted on 2012-04-03
10
Medium Priority
?
231 Views
Last Modified: 2012-04-10
Hello:

I have restored a database from a full backup and it restored just fine.
I can see the database and tables and data with in the table.

When I try to create a new Database diagram and select all the columns, it creates a diagram, BUT, the relationship lines between the tables do no show up.

Any idea how to get the lines to show?

Thank you,
Noa
0
Comment
Question by:noamco36
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 5

Assisted Solution

by:hafeezmca
hafeezmca earned 668 total points
ID: 37803276
Hi,

You can turn on relationship labels by right clicking in your diagram and select "Show Relationship Labels."
Hope this solution works for you.
0
 

Assisted Solution

by:jamesniox
jamesniox earned 1000 total points
ID: 37803284
Hi Noa,
Did you check if your relationships always exists between your tables?
0
 

Author Comment

by:noamco36
ID: 37803423
I dont know.
the is what I have:
I received a SQL db full backup from offsite and restored it on my local machine.
Then I created  the Database diagram in SSMS , but cant see any lines between the tables.
Could it be that the database/tables dont have relationships to begin with?
But this would not make sense, I mean who would create a database that has no relationships in its tables?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:noamco36
ID: 37803446
When will the lines appear in the diagram?
If the there PKs or FKs or Any Key?
0
 
LVL 5

Assisted Solution

by:hafeezmca
hafeezmca earned 668 total points
ID: 37804988
You should have both primay and foreign key defined.
Relationship works between Primay & Foreign keys.
You cant have a foreign key unless you have defined the primary key.
In case if you want to learn how to create the relationships then check out the below link:

http://weblogs.asp.net/brijmohan/archive/2010/06/05/creating-a-table-relationship-using-sql-server-2008-management-studio.aspx
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 332 total points
ID: 37809010
But this would not make sense, I mean who would create a database that has no relationships in its tables?
You would be amazed...

But suffice to say if you restored a true backup for the database and it showed no relationships than you can only conclude that the source database does not have any.
0
 

Assisted Solution

by:jamesniox
jamesniox earned 1000 total points
ID: 37827296
Hi Noa,
how is it going?
did you solve your issue?
0
 

Author Comment

by:noamco36
ID: 37828637
Hi jamesniox, thanks for checking back.

"Hi Noa,
Did you check if your relationships always exists between your tables?"

What I have is a full backup of the original db that came from a different server. when I restored it on my machine, I also generated a new diagram via SSMS and saw no FK relationship. that means that in the original database there were no relationships to begin with, correct?
Or could it be that whoever did the full backup on the original server somehow missed to include the FK relationships in the backup and this is why they restored as just indipendent (stand-alone) tables?
0
 

Accepted Solution

by:
jamesniox earned 1000 total points
ID: 37828731
In my personal experience, I didn't meet a way to make a full backup while skipping FKs, it seems strange, or simply there were no FK.

In our data warehouse we do not create relationships between tables as far as they're aggregated and we don't need them for cubes, so yes, it is possible to make a database without FKs. It is a normal behavior into a data warehouse.

If possible ask to the author of this database how comes it happens, it could be an obvious reason, or may be something else.

Hope this'll help you.

Have a great week.
0
 

Author Comment

by:noamco36
ID: 37828912
Yeh, the author... go figure who that is...
I was just told "here is the db , go figure it out."

Anyways, it looks like I will have to stick with no FK for now.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question