Solved

SQL Server DBA

Posted on 2012-04-03
10
226 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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
 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Create SQL Server Job to perform backups of all the databases in a server instance 17 46
SQL Recursion 6 33
Many to one in one row 2 37
sql query 5 41
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

740 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