Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 16th, 2006, 06:47 AM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
Default Unable to import db

hi there,

I m trying to import data in sql server 2000

i have the .mdf and .ldf files but i am unable to import the data and tables structures etc using the import wizard...

can someone plz guide me... i am a new user
Reply With Quote
  #2 (permalink)  
Old August 16th, 2006, 12:17 PM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

You can't import data from a stand-alone .mdf file.

What you can do is attach the database to SQL Server. For this to work, right-click databases in SQL Server Enterprise Manager, choose All Tasks and then Attach Database...

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #3 (permalink)  
Old August 17th, 2006, 12:53 AM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
Default

See i don't just get it...how?
i upload my files(.mdf & .ldf) to a server and they attach those files with the db on server
now i dont have the db so i downloaded these files from the server
i have created a new db and want to get the tables and data from these files
how can i do it ?
i can't create every table again and re-enter data into it...
i think now i've made my point clear..
plzzzz help...

Reply With Quote
  #4 (permalink)  
Old August 17th, 2006, 02:59 PM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Like I explained earlier: don't try to import data into your newly created database from those .mdf files, but attach the existing .mdf file directly.

Did you try what I suggested?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #5 (permalink)  
Old August 19th, 2006, 05:32 AM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
Default

I tried to do it but it gives the following error :

Error 602: Could not find row in sysindexex for database ID 7, object ID 1. Run DBCC CHECKTABLE on sysindexes.

Now what should i do ???

plz help...

thnx

Reply With Quote
  #6 (permalink)  
Old August 19th, 2006, 08:15 AM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
Default

i have got the .bak files and have tried to restore the db using it but it isn't working 2...
can't get it wats going wrong...
in the restore database dialoug box i choose to restore from device (disk) and add only the bak file
but when i click ok to restore it, it gives an error "Too many bachup devices, only 64 are allowed"

its terrible ... plz help somebody

thnx in advance

Reply With Quote
  #7 (permalink)  
Old August 19th, 2006, 08:18 AM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Are the bak (and .mdf) files for SQL Server 2005 and are you trying to attach them to SQL Server 2000?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #8 (permalink)  
Old August 21st, 2006, 11:22 PM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Actually, i am working with sql server 2000 but the server where my site is hosted has sql server 2005
Now i get the files from there ...


Reply With Quote
  #9 (permalink)  
Old August 22nd, 2006, 01:01 AM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I see.

The two are not compatible; you can't attach 2000 MDF files to 2005, or vice versa.

You need the exact same version of SQL Server to be able to attach them. You can get yourself a copy of the free SQL Server 2005 Express Edition and attach your database to that.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
The Beginner (December 18th, 2008)
  #10 (permalink)  
Old August 24th, 2006, 06:03 AM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
Default

thnx for trying to help me out till now...
thnx a lot


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to import from an Excel Workbook donevco Access 7 April 27th, 2007 09:37 AM
Unable to open ProjectTimeTracker DB cancer2006 BOOK: Beginning VB.NET Databases 2 October 24th, 2006 03:53 PM
unable to import mpg sentme_mail Flash (all versions) 6 December 21st, 2004 04:45 AM
Unable to INSERT INTO db nvillare Classic ASP Databases 6 August 26th, 2003 10:29 AM
import text file to SQL Server DB via DTS pabloron SQL Server 2000 0 July 31st, 2003 06:41 PM



All times are GMT -4. The time now is 11:55 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.