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)
 MSDE Sample Database Import Problem

Author  Topic 

hismightiness
Posting Yak Master

164 Posts

Posted - 2004-06-27 : 14:47:43
I have the MSDE 2000a installed my Win2k Pro with all MS Updates. The MSDE works fine. However, I wanted to import the Northwind and Pubs databases from Microsoft to test some things. I was able to import the pubs DB without any problems using the Web Data Administrator. However, I keep getting an error on Line 1 of the import of Northwind. I cannot get the DB to import. Here are the first 10 lines of code and the error:

There was an error importing the database. The status of the import is unknown.

Line 1: Incorrect syntax near '/'.


/*
** Copyright Microsoft, Inc. 1994 - 2000
** All Rights Reserved.
*/

USE master
GO
if exists (select * from sysdatabases where name='Northwind')
drop database Northwind
go


If I remove the comment lines, I get:

There was an error importing the database. The status of the import is unknown.

Line 1: Incorrect syntax near 'E'.


USE master
GO
if exists (select * from sysdatabases where name='Northwind')
drop database Northwind
go

DECLARE @device_directory NVARCHAR(520)
SELECT @device_directory = SUBSTRING(filename, 1, CHARINDEX(N'master.mdf', LOWER(filename)) - 1)
FROM master.dbo.sysaltfiles WHERE dbid = 1 AND fileid = 1


What do I need to do to get this to import?

- - - -
- Will -
- - - -

hismightiness
Posting Yak Master

164 Posts

Posted - 2004-06-27 : 14:49:48
I forgot to add something. Here are the links to the things I am using:

Sample SQL Databases
[url]http://www.microsoft.com/downloads/details.aspx?FamilyId=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en[/url]

Web Data Administrator
[url]http://www.microsoft.com/downloads/details.aspx?FamilyID=c039a798-c57a-419e-acbc-2a332cb7f959&displaylang=en[/url]

- - - -
- Will -
- - - -
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-06-27 : 15:12:20
I'm not getting any error on this script at all. Are you sure you don't have an extra character at the top of your script; and you just haven't scrolled all the way up?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

hismightiness
Posting Yak Master

164 Posts

Posted - 2004-06-28 : 13:08:52
The only way there would be an extra character I don't know about is if it is hidden in some way. I am viewing the SQL file with VS.Net 2002. Is that possible? That particular project is at home. I will try copying and pasting the text into a completely new file and see if it still happens. What do you think?

- - - -
- Will -
- - - -
Go to Top of Page
   

- Advertisement -