Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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
  #2 (permalink)  
Old August 16th, 2006, 12:17 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.
  #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...

  #4 (permalink)  
Old August 17th, 2006, 02:59 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.
  #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

  #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

  #7 (permalink)  
Old August 19th, 2006, 08:18 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.
  #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 ...


  #9 (permalink)  
Old August 22nd, 2006, 01:01 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.
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




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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.