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
 SQL Server Administration (2000)
 Attaching a database to MSDE and deploying an application on a laptop.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-12 : 09:48:39
Tom writes "Upon the recommendation of an individual with more SQL Server experience than I have, I am developing a VB6.0 front-end for a SQL 2000 database running on Windows 2000. The intent is to allow users both on the network as well as users on a laptop that will have MSDE installed to use the database. The laptop information will be replicated with the SQL 2000 server.

To test the concept out, I've loaded a Windows 2000 machine with MSDE. I've detached the database from the development server and moved the files to the MSDE machine. With Access 2000, I have developed a stored procedure to attach the database to the MSDE. When I execute the sp, I get an error message that says "The header for file ... is not a valid database file header. The PageAudit property is incorrect." Since this computer is networkable, I registered it on my development SQL server and from Enterprise manager tried to attach the database. That option is not available. So I went into Query Analyzer and executed an "sp_attach_db" command with the same results/error as above. From another article on this site, you indicate that this is because I am moving the file from a SQL 2000 server to a previous version of the SQL Server, in this case MSDE.

Since this application will eventually have to be loaded on numerous laptops, what is the best way to attach the database to the MSDE? The laptops will not have Access to develop a stored procedure on and none of them will have network connectivity, but will eventually transfer data via the old 3 1/2" floppy. MSDE does not come with any tools for attaching or detaching databases."

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-03-12 : 17:49:32
Tom,

I'm working through some of these issues myself, and unfortunately I don't have all the answers yet. My gut reaction is that you'll need to create the database in SQL 7 or in MSDE before attaching it to SQL 2k, rather than the other way around.

I'm not a replication expert - but I'm not exactly sure why you're detaching-attaching. I would have assumed you'd need to create an "MSDE" version of the database and then use sp's or whatever to replicate. The laptops would have copies of the "MSDE" version etc etc.

Keep talking

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-03-12 : 18:25:46
Which version of the desktop engine do you have?
If it is sql server 2000 (msde 2000) it should work.
You may have the v7 version though.
Make sure you have the same service packs.

I'm going to be doing something similar shortly.

You could also try restoring a backup or using dts from the 2000 m/c.

Have a look at this to see what you require to licence for distributing msde 2000 (usually msdn universal).
http://www.google.co.uk/search?q=cache:GTI1YZTga_4C:www.microsoft.com/sql/techinfo/development/2000/MSDE2000.asp+msde+2000&hl=en

==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-03-12 : 19:00:17
nigel

your link didn't work out....can you try it again?

Ta

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-03-12 : 19:27:03
Sorry - that was from the cached results from google.
Try searching for
"sql server" msde 2000.

This is the link
http://www.microsoft.com/sql/techinfo/development/2000/MSDE2000.asp

==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page

trapezetom
Starting Member

2 Posts

Posted - 2002-03-13 : 17:45:48
Well, you were right about the version of MSDE. I did have the SQL7 version. After upgrading to MSDE 2000, I was able to attach the database without a problem. I've also read several of Microsoft's white papers and it appears that the best way to do this is to integrate the MSDE 2000 merge modules in with the application and distribute it to the laptops as part of the setup. I was not under that impression earlier and I still have some more reading to do as to the exact method. I've never used Orca.exe to which a reference is made. Back to reading. I've got a good start though. Thanks for the help.
Tom

Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-03-13 : 18:24:18
Hey trapeze tom....

Do you have a link handy for upgrading from v7 MSDE to 2000?

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page

trapezetom
Starting Member

2 Posts

Posted - 2002-03-14 : 12:03:21
We are new to SQL Server so have not deployed any applications on SQL Server 7, but have been learning SQL Server 2000 and are getting ready to deploy our first applications on SQL Server 2000. Thus, my research has been not on upgrading, but deploying initially on 2000. I've been getting most of my information from MSDN. You might try the following links for some good articles. The middle link does address upgrading.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sql_embeddingmsde.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/distsql/distsql_71b9.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/distsql/distsql_84xl.asp



Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-03-14 : 12:12:35
http://www.microsoft.com/office/ork/xp/welcome/depf05.htm

Probably best to
detach all databases
uninstall 1.0
install 2.0
attach all databases

or

install 2.0 as named instance
detach all databases from 1.0
attach to 2.0
uninstall 1.0

Make sure you do a backup first.


==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-03-14 : 17:17:38
TA

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -