![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've been trying to figure out how to make a copy of a database newly upsized to SQL Server, and asked how to do it on StackOverflow.com: http://tinyurl.com/26yhxuu=>http://stackoverflow.com/questions/3...ver-express-da tabase-to-another-computer I have concluded that it's probably going to be a lot easier to just import the data into an MDB file and then copy that to the USB drive for transport. It then won't require installation of SQL Server on the user's computer, for instance. I've already written code to import the ODBC tables (details not important), but the show-stopper is that it's not importing indexes, so these tables will be real dogs for data analysis. Is there some way to force TransferDatabase to import indexes from ODBC? I'm concluding that there isn't, so I'm going to have to instead import the data with INSERT queries into an empty template database. Does everyone agree that it's impossible to import the indexes (without mucking about with metadata about the ODBC database schema and translating it into Jet indexes?)? |
#3
| ||||
| ||||
|
|
On Sep 1, 5:57*pm, "David W. Fenton" NoEm... (AT) SeeSignature (DOT) invalid> wrote: I've been trying to figure out how to make a copy of a database newly upsized to SQL Server, and asked how to do it on StackOverflow.com: http://tinyurl.com/26yhxuu=>http://stackoverflow.com/questions/361 2149/ copy-sql-server-express-da tabase-to-another-computer I have concluded that it's probably going to be a lot easier to just import the data into an MDB file and then copy that to the USB drive for transport. It then won't require installation of SQL Server on the user's computer, for instance. I've already written code to import the ODBC tables (details not important), but the show-stopper is that it's not importing indexes, so these tables will be real dogs for data analysis. Is there some way to force TransferDatabase to import indexes from ODBC? I'm concluding that there isn't, so I'm going to have to instead import the data with INSERT queries into an empty template database. Does everyone agree that it's impossible to import the indexes (without mucking about with metadata about the ODBC database schema and translating it into Jet indexes?)? I don't have a lot of experience with the TransferDatabase command myself. I always found it too slow. I do remember however that with lots of data, it's faster to transfer the data without the indexes then add them in after the transfer is complete. |
|
There are a couple of free ODBC SQL databases that will run on a USB key without a install, for what it's worth. |
|
SQLLite is one of them (Firefox uses it as quite a few other programs), and I think MySQL will run from a USB Drive without an install as well. I remember seeing a web development portable (thumb drive) app that included a portable SQL Database, but I can't remember the name of it. Try portableapps.com or protablefreeware.com It was probably on one of those. Since they are ODBC compliant, Access should be able to link to them. (I know I can do it with SQL Lite, though you have to download the ODBC Drivers.) |
|
The above said, I can't say as I'd recommend running the database on a Thumb drive. An external USB drive (with actual spinning platters) is *much* faster. USB Keys are great for transport, but other then that, they suck for database work. You can get external USB drives that fit into your pocket as well. They're bigger then a USB Key, but the speed is worth it. Pop TrueCrypt (in traveler mode) on them and you've got a nice secure method of moving data around *and* using it directly off the drive at a nice fast speed. |
#4
| |||
| |||
|
|
I've been trying to figure out how to make a copy of a database newly upsized to SQL Server |
#5
| |||
| |||
|
|
I've been trying to figure out how to make a copy of a database newly upsized to SQL Server, and asked how to do it on StackOverflow.com: http://tinyurl.com/26yhxuu = http://stackoverflow.com/questions/3...ver-express-da tabase-to-another-computer |
|
I have concluded that it's probably going to be a lot easier to just import the data into an MDB file and then copy that to the USB drive for transport. It then won't require installation of SQL Server on the user's computer, for instance. I've already written code to import the ODBC tables (details not important), but the show-stopper is that it's not importing indexes, so these tables will be real dogs for data analysis. Is there some way to force TransferDatabase to import indexes from ODBC? I'm concluding that there isn't, so I'm going to have to instead import the data with INSERT queries into an empty template database. |
|
Does everyone agree that it's impossible to import the indexes (without mucking about with metadata about the ODBC database schema and translating it into Jet indexes?)? |
#6
| |||
| |||
|
|
David W. Fenton wrote: I've been trying to figure out how to make a copy of a database newly upsized to SQL Server, and asked how to do it on StackOverflow.com: http://tinyurl.com/26yhxuu = http://stackoverflow.com/questions/3...ver-express-da tabase-to-another-computer And nobody mentioned sp_detach-db and sp_attach_db? I have concluded that it's probably going to be a lot easier to just import the data into an MDB file and then copy that to the USB drive for transport. It then won't require installation of SQL Server on the user's computer, for instance. I've already written code to import the ODBC tables (details not important), but the show-stopper is that it's not importing indexes, so these tables will be real dogs for data analysis. Is there some way to force TransferDatabase to import indexes from ODBC? I'm concluding that there isn't, so I'm going to have to instead import the data with INSERT queries into an empty template database. No, TransferDatabase ignores indexes Does everyone agree that it's impossible to import the indexes (without mucking about with metadata about the ODBC database schema and translating it into Jet indexes?)? Yes You can detach the database from the server (using sp_detach_db), copy the mdf and ldf files to your thumb drive, use sp_attach_db to reattach the them to the server, carry the thumb drive to the other computer copy them onto the destination drive and use sp_attach_db to attach them to the destination server Alternatively, you can use backup and restore as Lyle suggested. |
#7
| |||
| |||
|
|
David W. Fenton wrote: I've been trying to figure out how to make a copy of a database newly upsized to SQL Server, and asked how to do it on StackOverflow.com: http://tinyurl.com/26yhxuu = http://stackoverflow.com/questions/3...server-express -da tabase-to-another-computer And nobody mentioned sp_detach-db and sp_attach_db? |
|
I have concluded that it's probably going to be a lot easier to just import the data into an MDB file and then copy that to the USB drive for transport. It then won't require installation of SQL Server on the user's computer, for instance. I've already written code to import the ODBC tables (details not important), but the show-stopper is that it's not importing indexes, so these tables will be real dogs for data analysis. Is there some way to force TransferDatabase to import indexes from ODBC? I'm concluding that there isn't, so I'm going to have to instead import the data with INSERT queries into an empty template database. No, TransferDatabase ignores indexes |
|
Does everyone agree that it's impossible to import the indexes (without mucking about with metadata about the ODBC database schema and translating it into Jet indexes?)? Yes You can detach the database from the server (using sp_detach_db), copy the mdf and ldf files to your thumb drive, use sp_attach_db to reattach the them to the server, carry the thumb drive to the other computer copy them onto the destination drive and use sp_attach_db to attach them to the destination server Alternatively, you can use backup and restore as Lyle suggested. |
#8
| |||
| |||
|
|
Ah! I should have read the thread in the link to see why my suggestion was not acceptable. Never mind. |
#9
| |||
| |||
|
|
I've been trying to figure out how to make a copy of a database newly upsized to SQL Server, and asked how to do it on StackOverflow.com: http://tinyurl.com/26yhxuu = http://stackoverflow.com/questions/3...ver-express-da tabase-to-another-computer Wait a minute - the only thing keeping you from using the backup-restore |
#10
| |||
| |||
|
|
David W. Fenton wrote: I've been trying to figure out how to make a copy of a database newly upsized to SQL Server, and asked how to do it on StackOverflow.com: http://tinyurl.com/26yhxuu= http://stackoverflow.com/questions/3...ver-express-da tabase-to-another-computer Wait a minute - the only thing keeping you from using the backup-restore option is the lack of client tools on the client's machine? it's just occurred to me that since the client has Access on his machine, you can use VBA to run a passthrough query to run the sql statement to restore the database on his SQL Express server, can't you? Take another look at answer #4. -- HTH, Bob Barrows |
![]() |
| Thread Tools | |
| Display Modes | |
| |