SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 MSDE (2000)
 MSDE Sample Database Import Problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hismightiness
Posting Yak Master

USA
164 Posts

Posted - 06/27/2004 :  14:47:43  Show Profile  Visit hismightiness's Homepage  Reply with Quote
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

USA
164 Posts

Posted - 06/27/2004 :  14:49:48  Show Profile  Visit hismightiness's Homepage  Reply with Quote
I forgot to add something. Here are the links to the things I am using:

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

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

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

derrickleggett
Pointy Haired Yak DBA

USA
4184 Posts

Posted - 06/27/2004 :  15:12:20  Show Profile  Visit derrickleggett's Homepage  Send derrickleggett an AOL message  Send derrickleggett a Yahoo! Message  Reply with Quote
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

USA
164 Posts

Posted - 06/28/2004 :  13:08:52  Show Profile  Visit hismightiness's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000