Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy Folder
Message
De
24/02/2017 04:14:02
 
 
À
24/02/2017 03:54:31
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01648453
Message ID:
01648458
Vues:
35
>>In general you don't want to try to copy the actual .MDF/.LDF files that represent your SQL Server database(s). If you try to do that you'll hit "file in use" errors such as you're seeing. Instead, use SQL Server's built-in backup function to create separate backup files, and then save those backup files someplace safe.
>
>The reason for this behavior is the difference between SQL and VFP's database. A dbc contains relative paths to its tables. On SQL, however, everything is registered in the master database (i.e. master.mdb/ldb) with full absolute paths. And there seems to be some kind of back pointer, or key, whatever, in a database registered to it, which makes it "attached" (otherwise it is detached and then it may be moved to another SQL server). So I guess detaching means just dropping the related record from the master db and removing this backlink... pretty much like a dbf contains a reference to its .dbc somewhere in the header and there are records about it in the dbc, so it's a double link.
>
>Once I was rebuilding my machine, reinstalling everything, and I almost managed to keep the master temp and other databases, with my mdb/ldbs as well. I kept the whole directory structure etc, and it almost worked, but it crashed because the path to SQL folders was slightly different, I think a different version number in the folder name. I could try to repeat everything (uninstall, force the folder name to the old one) but just ran out of patience.
>
>The lesson I got from this is that SQL server's internal architecture is solid as long as you don't move the furniture. If you do, you may find yourself having to build a new house around the furniture.

I read somewhere that modern RDBMSs are comparable in code base and complexity to modern general-purpose OSs. IOW pretty complicated.

Most of the widely used ones are into their 9th, 10th or later major versions. The functions that are needed to maintain them e.g. backup are well understood and implemented in ways that by and large are sysadmin-friendly.

It pays big to do things the "right way" with these functions. I for one see zero benefit to hacking, shortcuts or workarounds of any kind. All too often I've had to clean up messes caused by other people doing these things.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform