Solved

SQL Server DBA

Posted on 2012-04-03
10
224 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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