Well, I found out tonight that Notepad won’t open a 929MB text file. SQL Server 2005 Management Studio won’t, either, which leaves me in a pickle. Here’s the story.
A while back, I installed a beta build of SQL Server 2005 on my desktop PC. It converted my SQL Server 2000 databases into SQL Server 2005 databases, but I need to move one of those databases to my laptop, which still has SQL Server 2000 on it.
Unfortunately, you can’t back up a database in SQL Server 2005 and restore it in SQL Server 2000. So I decided to get clever. I wrote a console app that reads the contents of the SQL Server 2005 database and generates a SQL script to recreate the database–contents and all–in SQL Server 2000. Because the database has a couple of thousand images in it, the resultant SQL script was quite large–929MB, to be exact. I wanted to see what was in it to make sure my script generator worked, so I tried to open it in Notepad. No dice. Visual Studio 2005 won’t open it, either. So I tried to open it in SQL Server 2005 Management Studio. Uh-uh. So now I have a wonderful little script generator and a script that (I think) will create the database I need, but I can’t load it to run it. Drat.
If anyone knows of any tricks for moving SQL Server 2005 databases backward to SQL Server 2000, I’d love to hear about them. I haven’t tried detaching the MDF in SQL Server 2005 and attaching in SQL Server 2000, but I have a feeling that won’t work.