Solved

SQL Server DBA

Posted on 2012-04-03
10
221 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
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 5

Assisted Solution

by:hafeezmca
hafeezmca earned 167 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 250 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
 

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 167 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 83 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 250 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 250 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
BULK INSERT most recent CSV 19 44
T SQL Update Table from another table 5 43
Dimension table indexes 8 10
SQL Statement to Update Email Domain 2 21
This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now