Yuav Ua Li Cas Ua Ke Cov Pob Tseg

Cov txheej txheem:

Yuav Ua Li Cas Ua Ke Cov Pob Tseg
Yuav Ua Li Cas Ua Ke Cov Pob Tseg

Video: Yuav Ua Li Cas Ua Ke Cov Pob Tseg

Video: Yuav Ua Li Cas Ua Ke Cov Pob Tseg
Video: 8 yam tsis txhob ua thaum sib deev tag tsis li yuav phom sij txog lub neej txoj sia. 2024, Kaum ib hlis
Anonim

Txhawm rau rov qab cov ntaub ntawv lossis hloov cov ntaub ntawv los ntawm ib lub server mus rau lwm tus, nws feem ntau yuav tsum sib koom ua ke ntawm cov ntaub ntawv pov tseg los ntawm DBMS. Feem ntau, khib nyiab yog qib ntawm cov nqe lus SQL los tsim thiab ntxiv cov ntxhuav, ntxiv cov kev txwv, txheej txheem khaws cia, chiv yam, thiab lwm yam.

Yuav ua li cas ua ke cov pob tseg
Yuav ua li cas ua ke cov pob tseg

Tsim nyog

  • - ntawv pov thawj rau kev nkag mus rau database servers Microsoft SQL Server, MySQL, PostgreSQL;
  • - SQL neeg rau zaub mov tswj Studio;
  • - ib pob ntawm cov khoom siv hluav taws xob, suav nrog mysqldump thiab mysqlshow;
  • yog cov pob hluav taws xob ua khoom siv pob suav nrog pg_dump thiab psql.

Cov Lus Qhia

Kauj ruam 1

Pib tsim kev muab khib nyiab ntawm cov chaw khaws cia los ntawm Microsoft SQL Server DBMS. Txuas rau lub server siv SQL Server Management Studio. Thaum cov ntawv thov pib, qhov sib txuas tsis sib haum yuav tshwm. Qhia lub npe thiab hom ntawm tus neeg rau hauv nws, xaiv hom kev lees paub. Nkag mus rau tus neeg siv daim ntawv pov thawj yog xav tau. Nyem Rau Txuas Txuas khawm

Kauj ruam 2

Hauv qhov Object Explorer lub qhov rais, nthuav cov ntu Database. Thab tawm cov khoom sib raug rau lub hom phiaj. Nyem rau nws nrog txoj khawm nas. Hauv cov ntawv qhia zaub mov, xaiv cov khoom "Tsim Cov Ntawv …". Lub wizard qhov rai yuav tshwm

Kauj ruam 3

Nkag mus xaiv rau ntawm nplooj ntawv Tus Kheej Wizard thiab nyem Next. Hauv tshwj xeeb, ntawm nplooj ntawv thib plaub, xaiv qhov chaw uas cov khoom siv khib nyiab yuav muab tso (rau cov ntawv, ntawv los sis lub qhov rais tshiab). Ntawm nplooj ntawv thib tsib, nyem lub pob kom tiav. Tos kom txog thaum cov txheej txheem tsim hluav taws xob ntawm cov chaw khaws ntaub ntawv pov tseg tiav. Nws tuaj yeem siv sijhawm ntev

Kauj ruam 4

Pib lub plhaub ntawm Windows lossis lub davhlau ya nyob twg emulator ntawm Linux zoo li cov tshuab. Hauv Linux, koj tuaj yeem hloov mus rau kab ntawv nyeem los ntawm nias Ctrl, alt="Duab" thiab ib qho ntawm cov haujlwm ua haujlwm F1-F12. Qhov no yog qhov yuav tsum tau siv MySQL thiab PostgreSQL cov chaw ntim khoom pov tseg

Kauj ruam 5

Txheeb xyuas cov ntaub ntawv pab rau mysqldump utility. Khiav cov lus txib: mysqldump - pab them nyiaj tshwj xeeb rau cov kev xaiv siv los qhia lub phiaj server thiab cov neeg siv daim ntawv pov thawj

Kauj Ruam 6

Tso hauv MySQL chaw khaws ntaub ntawv. Khiav lub mysqldump kev siv hluav taws xob los ntawm cov kab hais kom ua haujlwm nrog cov yuav tsum tau muaj, rov ua kom tiav nws cov ntawv xa mus rau cov ntaub ntawv, lossis kev qhia meej hom phiaj siv lub -r lossis - xaiv cov ntaub ntawv. Piv txwv: mysqldump -p -u myuser -Q mydatabase> /home/myhomedir/tmp/dump.sql Nyob rau hauv cov ntaub ntawv no, khib nyiab ntawm mydatabase, suav nrog cov txheej txheem khaws cia (kev xaiv -Q), nyob ntawm lub chaw ua haujlwm hauv ib cheeb tsam. uas tuaj yeem nkag mus nrog cov peev xwm ntawm tus neeg siv myuser (tus password tau thov los ntawm cov nqi hluav taws xob) yuav muab tso rau hauv cov ntaub ntawv /home/myhomedir/tmp/dump.sql. Yog tias tus neeg rau zaub mov nyob ntawm lub tshuab sib txawv, siv the -h lossis --host option

Kauj Ruam 7

Txheeb xyuas pg_dump utility siv. Khiav qhov hais kom ua: pg_dump - pab qhia qhov kev xaiv -f, -F, -U, -d, -h

Kauj ruam 8

Pov lub PostgreSQL database. Siv tus nqi pg_dump, dhau ntawm qhov yuav tsum tau ua, piv txwv li: pg_dump -f / home/myhome/tmp/dump.sql -U postgres template1 Qhov no yuav pov tseg template1 database, tswj los ntawm lub server khiav ntawm lub tshuab hauv zos. Cov chaw khib nyiab yuav muab tso rau hauv /home/myhome/tmp/dump.sql ntawv. Siv cov -h kev xaiv los teev lub npe ntawm tus neeg rau zaub mov.

Pom zoo: