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
 SQL Server 2000 Forums
 MSDE (2000)
 Import SQL Server .DAT database?

Author  Topic 

sbt1
Yak Posting Veteran

89 Posts

Posted - 2004-05-26 : 14:54:11
I am running MSDE 1.0.

I need to import a new database which was created in the most recent version of SQL Server, as a .DAT file, into my MSDE.

How can I do that? The data files for MSDE are all .MDF files, are the two formats compatible?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-05-26 : 15:04:44
You need to perform a restore using osql.exe from the command line:

osql.exe -SServerName -E

>1 RESTORE DATABASE DBName FROM DISK = 'C:\Temp\DBName.DAT' WITH REPLACE
>2 GO

You might need to use WITH MOVE option if you need to store the MDF and LDF files in a different location than the source.

Tara
Go to Top of Page

sbt1
Yak Posting Veteran

89 Posts

Posted - 2004-05-27 : 07:15:01
Thanks, unfortunately I'm having a problem. I think OSQL is bombing out:

1> restore database SDX_Full_E from disk='c:\msde\data\SDX_Full_E.dat' with replace
2> go
Msg 3624, Level 20, State 1, Server US545W2076, Procedure , Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]
Location: upgraddb.cpp:214
Expression: tableIndex < ARRAY_LEN (upgradeMap)
SPID: 8
Process ID: 1756

and then OSQL exits.

Any ideas what might be wrong? I've got the .DAT file in the right place, it seems like something's going wrong with the import.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-05-27 : 14:11:40
Is the .DAT file a backup of a database or a database file?

Tara
Go to Top of Page

sbt1
Yak Posting Veteran

89 Posts

Posted - 2004-05-27 : 15:19:09
It's supposed to be the database file, I asked the question to make sure it's not something generated by some backup program.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-05-27 : 15:20:28
Does MSDE 1.0 correlate to SQL Server 6.5? If so, you aren't going to be able to use this .DAT file. You'll need the backup file.


Tara
Go to Top of Page
   

- Advertisement -