Jump to content
Sign in to follow this  
pidrz

Plz Help

Recommended Posts

anyway aku tak faham soalan koo ni. konak convert MDF ker mysql ker. MDF tu dah microsoft Access yg dah compact.. so uncompact balik lepas tu leh convert terus guna odbc.

kalau mdf tak sure aa tak pernah try.. rasa nyer boleh kott.. let me check japp

Share this post


Link to post
Share on other sites

oo Metal DataFile. ingatkan mdb nyer extension (mde).. oklah ..

anyway kalau kat sql server boleh buat.. benda ni macam backup data gak

ko nak convert benda ni jadi mysql ker???

Share this post


Link to post
Share on other sites

tanks for the reply devguy!

mcm mana nak convert file tu..

sy nak tgk kandungan file tersebut dgn menggunaka mysql

tp mcm mana?itu yg sy tak tau...

tanks again!!realy appreciate it!!

Share this post


Link to post
Share on other sites

anyway kalau ada sql server and mysql dlm satu pc atau network lagi elok.

just guna export database lagi senang.

kalau nak senang guna la software macam navicat.

kalau nak guna export guna odbc kena la install odbc for mysql sekarang version 3.51.07.

anyway try la guna export or import. senang jer. macamkita export database ker access jer. try dulu kalau tak tahu tanya lagi..

kalau dah malas sangat download la navicat tapi ada la limitation dia. sebab kena beli tapi navicat tu memang power..website dia.. hmmm.. tak ingat laa..

check laa kat internet

good luck..

Share this post


Link to post
Share on other sites

ok i got question:

erm,nak export tu guna enterprise manager @ import and export data?

(import ni, dia import data ker db?)

sy try guna import dan export tu, keluar Dts wizard..sy tak pasti nak pilih apa dekat 'choose a data source' dan 'choose a destination'

try dekat enterprise manager pun gagal...

blh bantu lagi tak?sad.gif

terima kasih!

Share this post


Link to post
Share on other sites

hmmm.. data source mean data yg ko nak convert tu. kat sini sql server laaa..

pilih laa. katalah nortwhind.. so leaps tu choose destination lak. tu konyer mysql laaa.

pilih guna odbc. senang. lepas tu pilih la table apa yg nak di covert kalau nak soma haa select alll. and then next .... until finish..

lepas tu kat console manager ( Mysql) ada tak check la ada ker tak..

kalau tak dapat gak hmmmmdownload la navicat tuu.. senang sikit..

Share this post


Link to post
Share on other sites

Nih cara yang aku buat dulu.. sama jerk ngan cara DevGuy.. just detail sket....

1) Aku create database (empty jerk.. jgn create table) kat mysql... serupa dengan sql server...

2) lepas tuh... aku create ODBC connection bagi setiap database kat MySQL tuh kat komputer yg ada sql server tuh.. misalnya ngko ada 5 databases.. jadik ndak kena create 5 odbc connections and point to each databases in MySQL

3) Bukak import export tuh... pilih Data Source... pilih ler firs database... destination.. pilih ODBC connection.. dan pilih connection yg ngko create tadik tuh...

4) next.. next.. next.. abis... tuh je lar.. ngko ndak kena export database sesatu...

Share this post


Link to post
Share on other sites

tanks for the reply,sy ambik masa skit utk cuba cara yg awk bg tu...

mungkin soalan sy tu tak betol...

apa yg sy paham:

data source tu adlh db yg hdk kita convertkan kan?

database yg sy nak cuba view tu takder lg dlm senarai database(console root), database tu ext nyer .mdb.

Dekat Dts wizard>data source>....takder selection .mdf, yg lain cam dbf,etc tu adalar...itu yg sy tak paham part data source...part destination pulak, odbc tu, cam tak betol jer sy buat... unsure.gif

**sory sbb lambat skit nak paham, baru jer nak guna mysql ni...takut pulak salah cofigure masa installation..erm.**

cara rads pulak sy tak begitu paham jd sy tak habiskan, setakat create db jer..lepas tu lost in space.. sory...

then, i try the third method...download navicat tp problem tak blh connect ngan sql...ada problem ngan winmysqladmin, unsure.gif

apa pendapat awk? unsure.gif

apa sbnrnya sy nak buat ialah:

a.mdf>nak masukkan dlm senarai lam db(console)>lepas tu nak view tables dlm database tu>end

//is it possible to do the above? unsure.gif

//is ther any other easy way so a beginner like me can do?

tanks again...sorry for the trouble!!!

Share this post


Link to post
Share on other sites

ok sy ada try buat satu...

ini dia summary yg sy dpt....

__________________________________________________________________

Source: Microsoft SQL Server

Using Microsoft OLE DB Provider for SQL Server

Location: (local)

Database: master

Destination: Flat File

Using SQL Server DTS Flat File OLE DB Provider

Location: C:\Documents and Settings\pidrz\My Documents\test

Tables

[master].[dbo].[test] -> C:\Documents and Settings\pidrz\My Documents\test

__________________________________________________________________

dlm flat file tu sy dpt view data dalam table tu...

sy convert satu table sj iaitu table test yg ada satu column "name"

jd dlm flat file tu ada senarai nama...

sama jugak ker konsep dgn mslah sy tadi?

part data source tu mslh sbb source data yg sy nak pilih dlm format .mdf but unfortunately it's not in the list....

Share this post


Link to post
Share on other sites

oklahhh like this la. mdf file tu memang tak der dlm list SEBAB.....

tu la extension utk MICROSOFT SQL SERVER DATABASE. setiap db yg kita create kat sql server akan buat 2 file contoh nye a nama database tu test.. so dia akan buat kat default location test.mdf and log file dia.extension dia apa tah aku tak ingat. kalau ko tak caya gak ko leh check kat program files, microsoft sql server and kat folder data. haa cari la ..

cara ko dah betul dah. tu .. source dah ok.

cuma destination tu cari a ODBC (MYSQL NYE) lepas tu macam biasa.

ko tau guna navicat takk.

tak explore ker.tu dah straight forward dah kita leh import data dari different db ker mysql.

kalau kat navicat tu kena la import.

kalau daripada mssql tu kena la export ..

faham tak,

error kat navicat ckp apa.

bukan problem kay winmysqladmin laa.

ko salah setting tu.. anyway sennag jer nak connect dia,

tak susah. cuba check balik tengok betul2.

anyway kalau mysql leh run and mssql leh run so should be not problem to connect each other..

try again dude.. learn from mistake..

goodies

Share this post


Link to post
Share on other sites

i think i begin to understand....ya sy dah cek the .mdf dan .ldf (log) yg awk cakap tu...tanks!

ok sy dah try guna odbc sql utk destination...and it works! tanks to u..but still it doesnt solve my problem...

sy rasa sy tlh point mslh yg slah...sy rasa sy dah paham prt source...

sbnrnya mslh list database dlm DTS wizard tu dimana db yg sy nak convert tu takda dlm list...

so wat u think?betol ker apa yg sy tulis ni.? unsure.gif

sy tak tau guna navicat..ini pertama kali guna...error nyer masa nak buat connection tu;

**can't connect to Mysql server on 'localhost' (10061)

jd unsure.gifunsure.gif

ini import yg baru sy buat:

_________________________________________________________

Source: Microsoft SQL Server

Using Microsoft OLE DB Provider for SQL Server

Location: (local)

Database: master//DB INI YG SY MAKSUDKAN DIATAS.

Destination: Microsoft SQL Server

Using Microsoft OLE DB Provider for ODBC Drivers

Location: (local)

Database: TESTING

Tables

[master].[dbo].[test] -> [TESTING].[dbo].[test]

_________________________________________________________

//DB YG SY NAK IMPORT TU ADALAH hotel.mdf

jd sememangnya sy mau melihat kandungan hotel.mdf itu...cuma ia tiada dlm list source..blh ka di lihat database itu? unsure.gif

adakah sy tanya berulang2???im soryy if i did.. unsure.gif

but it still bugging me...i cant rest till i solve this..

sorry if i bug you!!!

Share this post


Link to post
Share on other sites

ooo. okk.

that one is easy..

step 1 u need create new database kat sql server called Hotel.

and then define user access or what ever .

after finish it will create 2 file one called hotel.mdf nad 1 moe called hotel.ldf.

so stop sql service first. after that copy file yg awak nak tgk tu ( make sure backup yg dan ada. bukan yg awak buat tadi) ke program files\microsoft sql server\data.

lepas tu start balik service.

ni cara manual..

aku sellau guna cara niii..

ok faham takk. good luck. try first ..

Share this post


Link to post
Share on other sites

kalau nak connect ker mysql lak daripada navicat

connection name dia taruk la apa2 ikut suka ..

kat localhost type nama pc yg koguna.tapi biasanyer aku buat localhost. kalau kat pc lain taruk la nama pc tu.

pastu username dia root and password dia biar empty. sebab memang tak der. ok..

lepas tu test connection..

faham tak.

try dulu ..

Share this post


Link to post
Share on other sites

ok sy dah try cara tu but unfortunately it failed...!

error apabila nak bukak databse tu;

"An error occurred while trying to access the database information."

sy dah ikut cara awk tu , i hope i do it correctly...selalu awak buat tu boleh jalan?

sy dah create db hotel.dan stop sq, copy dan bukak semula tp database itu gagal dibuka...so wat u think i did wrong?

ya masa sy nak create hotel tu, dia create dua nama ini;

**hotel_data.mdf dan hotel_log.ldf **

lepas tu sy rename dekat mysql/data itu tukar jadi hotel saja..dan lepas tu copy database yg sy nak tgk tu...

so, u think that is wher i did wrong?

unsure.gifunsure.gifunsure.gif

tanks again for the reply!appreciate it!!

Share this post


Link to post
Share on other sites

bagi navicat tu pulak exactly wat i did before tp mmg tak blh connect..

ada error..seperti yg sy tulis dlm msg sebelum ini... unsure.gif

mmg sy buat mcm yg awak tulis diatas..tp tak tau la apa mslh.. unsure.gif

Share this post


Link to post
Share on other sites

i think u missunderstand me.

ok cara yg awak buat dah betul cuma bukannyer copy file hotel.mdf and hotel.ldf ker folder mysql\data\ tu..

b4 that mana yg asal hotel.mdf & hotel.ldf awak. u just need copy file asal hotel.mdf and hotel.ldf yg contain data tu ker program files\microsoft sql server\data and paste dlm tu. bukan copy ker folder data dlm MySQL.memang a salah. ok yg step awak create db Hotel dlm sql server tu dah ok. now what u need is stop service and then do copy the original db hoteland paste it in folder data in sql server..

faham tak..

yg navicat tu i'm not sure check your mysqladmin kat folder bin dlm mysql.

oklahh

try again..

Share this post


Link to post
Share on other sites

ok sory byk2, sy msh tak pasti...apakata sy bagi awk maklumat lebih detail...

db yg sy nak tgk;

DATABASE1:

D:\hotel\hotel.mdf

//dan ldf hotel.ldf

mula2 skali sy create db baru namely hotel

db yg terhasil;

DATABASE2:

C:\MSSQL7\Data\hotel_Data.MDF

//dan ldf skali hotel_Log.LDF

*** "u just need copy file asal hotel.mdf and hotel.ldf yg contain data tu ker program files\microsoft sql server\data and paste dlm tu. bukan copy ker folder data dlm MySQL." *** //awk yg tulis

1.sy copy and paste database1 (database asal) dalam mssql\data

2.jd wujud database1 dan database2 iaitu dalam mssql rite?

C:\MSSQL7\Data\hotel_Data.MDF

C:\MSSQL7\Data\hotel.mdf

//termasuk dgn ldf skali lar...

*** "ok yg step awak create db Hotel dlm sql server tu dah ok. now what u need is stop service and then do copy the original db hoteland paste it in folder data in sql server.." ***

stop server tu sy paham...

part ini sy tak pasti...copy skali lagi database1(database asal)?

dan mcm mana nak tgk data dalam hotel.mdf?

databse baru hotel_Data.mdf tu nak buat mcm mana?

:unsure:

sory for the trouble...but aint that wat ur'e here for? ;) to help ppl...rite..

i hope u can share more...tanks again!!!!

nanti sy spon lunch!! ;)

Share this post


Link to post
Share on other sites

ok..

let start form scratch..

1. create db hotel from MSSQL server.After finish MSSQL server akan create hotel.mdf and hotel.ldf at c:\program files\Microsoft SQL Server\Data

2.Stop service Mssql server.

3.Copy original data Hotel.mdf and hotel.ldf which u mention database 1 at yor pc d:\hotel\ ker c:\program files\Microsoft SQL Server\Data.

4.start balik service Mssql server.

5. check balik or explore hotel db from treeview.

after that nak conver ker MySQL server lak

1. at enterprise manager (MSSQL Server) click export

2.at datasource should be Hotel ( Assume u know this)

3.at destination source should be ODBC ( MySQL Server)

4.Select all table to convert.

5. Finish the Process.

oklahh

hope u try agaian. should be ok if u follow this thing..

oklah good luck

Share this post


Link to post
Share on other sites

ok here goes...

i follow exactly wat u told me (1-5)

sy bg makl detail ok...

sy create db dr mssql tu,lepas tu dpt hotel.mdf dan hotel_Log.ldf

lepas tu stop the server....lepas tu sy copy the original db (yg dldlm D: tu)

lepas tu sy replace db yg dicreate dgn db Original...setakat ni betul kan?

only the problem is the log file name is different where, file log database original (D: tu) named hotel.ldf dan yg baru create tu is hotel_Log.ldf...u think that give effects?so ada dua log utk satu hotel.mdf(should i delete one?which one would it be?)

but then i dont think that is the biggest problem...

ok, lepas tu start server then try ro view from console...

error;

An error occurred while trying to access the database information.

bila try nak bukak table the error is;

error 945:database "hotel"cannot be opened because some of the files could

not be activated.

im afraid ther's a problem with the original database(D: tu)

so, wat u think so far?

database hotel dah error so defintely cannot import or export rite?

so, i assumed u have done this b4 and worked out fine...i wonder wat my problem is?.. unsure.gif erm.

i hope i dont dissapoint u!

tanks again!!!hope 2 hear from u soon..tanks!!!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...