Arsip: detach database menggunakan query analizer

 
user image
more 18 years ago

esti_g

:roll: :shock: :o hello s'mua member delphi-id yang lg online. salam kenal buat semua. e'ke lagi bingung nich, gini critanya tadi abis baca buku transact sql server 2000. truz aku coba bikin detach database pake query analizer di sqlserver2000 sbb : EXEC sp_detach_db 'test' udah jalan OK, tapi masyalahnya adalah gimana caranya k'lo aku ngejalankan itu perintah dari delphi. aku pake delphi6. udah tak coba masukin di komponen query. setelah tak isi database-namenya trus dia tidak mau di 'true'kan. katanya gak support atau gimana yah ? aku belom ngerti nich gimana harusnya... apa betul perintah query itu diketikkan di tstring-nya komponen query atau mesti diletakkan dimana dan bunyinya yang betul gimana yah ? tolonk donk temen-temen yang udah pada pinter ada yang bisa bantu e'ke ?.... :) :) :)
user image
more 18 years ago

deLogic

maksudnya properti Active nya menjadi true..?? jika demikian, hal tersebut memang tidak bisa dilakukan karena query yg Anda jalankan tidak menghasilkan recordset. Sebagai gantinya, Anda harus menggunakan Execute atau ExecSQL atau yang sejenis.
user image
more 18 years ago

esti_g

e'ke masih rada-rada bingung nih, bisa kasih gambaran g? komponen yang harus digunakan, propertinya, truz sintak sql yang e'ke bikin tadi benernya gimana ya? nama databasenya : test.
user image
more 18 years ago

deLogic

Anda bisa menggunakan TADOQuery .. tinggal isikan koneksi di property ConnectionString.. kemudian tuliskan perintah SQL nya di property SQL. jalan kok, dengan catatan database yang ingin Anda detach harus berbeda dengan yg ada di ConnectionString.
user image
more 18 years ago

esti_g

Oke deh, makasih buwat deLogic. Tak coba'in dhulu mudah2an jalan. Salam delphi...
user image
more 18 years ago

DelphiExpert

detach2 iku maksude opo toh :mrgreen:
user image
more 18 years ago

deLogic

{$SET_DelphiExpert_MODE_SOK_GAK_NGERTI 1} :D maksud dari detach di SQLServer itu:
In Microsoft® SQL Server™ 2000, the data and transaction log files of a database can be detached and then reattached to another server, or even to the same server. Detaching a database removes the database from SQL Server but leaves the database intact within the data and transaction log files that compose the database. These data and transaction log files can then be used to attach the database to any instance of SQL Server, including the server from which the database was detached. This makes the database available in exactly the same state it was in when it was detached. Detaching and attaching databases is useful if you want to move a database: -From one computer to another without having to re-create the database and then restore the database backup manually. -To a different physical disk, for example, when the disk containing the database file has run out of disk space and you want to expand the existing file rather than add a new file to the database on the other disk.
Taken from: MS SQL Books Online {$SET_DelphiExpert_MODE_SOK_GAK_NGERTI 0}
user image
more 18 years ago

DelphiExpert

huehehehe... nge-dump tho :mrgreen: tengkyu-tengkyu :lol:
user image
more 18 years ago

deLogic

sebetulnya kurang tepat kalo di-istilahkan nge-dump, kalo nge-dump itu asumsi saya kan create DDL/DML atau backup dalam bentuk binary file lainnya, agar bisa di-execute untuk proses restore.. tapi ini enggak.. ini sama dengan meng-close semua koneksi / thread / task dari dan ke DB (termasuk remove dari list Enterprise Manager).. Kemudian file DB yang sudah bersih (biasanya file .mdf dan _log.ldf) itu bisa kita copy ke tempat lain dan atau attach ke SQL Server lainnya.
user image
more 18 years ago

DelphiExpert

injeh... injeh ndoro... pangestune... setuju, meluuuuu wae :mrgreen: --> edit cuman nambah spasi biar keliatan giginya xixi auto translate: iya... iya... bos... maap kalau salah mengartikan... setuju, ikut ajaaa deeeh :mrgreen: maklum kagak pernah pake MS-SQL server xixixi
more ...
  • Pages:
  • 1
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com