Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 3 little questions

Author  Topic 

lyxus
Starting Member

4 Posts

Posted - 2008-11-08 : 09:17:07
Hello Guys,

I was dumped in the middle of a project with not a lot of experience in MS SQL server.

I have 3 little questions

1) If i receive a bak file(restore file) from another server, is it normal that if i restore the file i will no see any FK keys neother Primary keys ?

2)
Is there anyway to have the INSERT query of the data ?
I mean a for a table a full (re)creation, i was able to have the CREATE TABLE but not the insert ? Any ideas?

3) Is there any tool that can transfer from SQL SERVER to Excel, i bought one several minutes ago but it hangs (more than 220 000 records)

Thanks for you help !

It is really appreciated !

Franck

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-08 : 10:24:56
1)You should see everything that exists in bak file
2)Didn't get it? Look at Insert command
3)Use Export/Import wizard/Bulk Insert for faster transfer.
Go to Top of Page

lyxus
Starting Member

4 Posts

Posted - 2008-11-08 : 14:22:54
Hello Sodeep,

Thanks for you answer.

1)You should see everything that exists in bak file
Apparently not ! I have just the stricture of the tables and when i do the diagram i see 7 tables that are totally independent ! Even if you see that by the name there is some similarities

2)Didn't get it? Look at Insert command
The goal of this is to have a file where it contain the insert statement , let s day i do have an empty table, the insert will put the data on it.


3)Use Export/Import wizard/Bulk Insert for faster transfer.
Did not get it please give me more info !

Thanks again for the help it is a 1000 times appreciated

Franck
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2008-11-08 : 16:32:30
If you right-click the table in the Object-Browser of Management studio, and then choose Script Table As--> Insert Into, it will automatically make the the Insert script for you(except for the select statement to supply the values to be inserted. You can use Sequel Server Integration Services to export a table to an Excel file (I assume you have Excel 2007, or you can't do more than 64000 records). You can also use Excel and do an external database query to import the data. Hope this helps!

Jim
Go to Top of Page

lyxus
Starting Member

4 Posts

Posted - 2008-11-08 : 18:46:36
I only have select to !
Go to Top of Page
   

- Advertisement -