Lm th? no ? nh km m?t hi?n c SQL Server 2000 Database SQL Server 2000 cng c? my tnh ? bn

D?ch tiu ? D?ch tiu ?
ID c?a bi: 290623 - Xem s?n ph?m m bi ny p d?ng vo.
V?a ph?i: Yu c?u c b?n v? m, m? ha v k? nng kh? nng tng tc.

Bi vi?t ny ch? p d?ng cho m?t d? n truy c?p Microsoft (.adp).

? c m?t phin b?n Microsoft Access 2000 c?a bi vi?t ny, xem 208888.
Bung t?t c? | Thu g?n t?t c?

TM T?T

B?n c th? c m?t nhu c?u ? sao chp m?t c s? d? li?u hi?n c t? Microsoft SQL Server 2000 v ?t c s? d? li?u trn m?t my tnh khc ang ch?y Microsoft SQL Server 2000 cng c? my tnh ? bn. Bi vi?t ny m t? cch lm nh v?y. Qu tr?nh bao g?m vi?c t?m th?i tch c s? d? li?u t? h? ph?c v? c?a n, sao chp t?p d? li?u (.mdf) v ng nh?p t?p tin (.ldf) ?n my tnh m?c tiu v sau g?n cc t?p tin vo my ch? SQL Server 2000 Desktop cng c? .

LU ?: Phin b?n tr?c c?a Microsoft SQL Server 2000 cng c? my tnh ? bn ?c ?t tn theo Microsoft d? li?u ?ng c (MSDE).

THNG TIN THM

Cc b?c sau y ch?ng minh lm th? no ? sao chp qun r?u m?u c s? d? li?u t? m?t my tnh ang ch?y SQL Server 2000 v lm th? no ? ?t n trn m?t my tnh ang ch?y SQL Server 2000 cng c? my tnh ? bn:
  1. Trn my ch? ang ch?y SQL Server 2000, m? phn tch truy v?n SQL Server, v g? d?ng sau:
    qun r?u sp_detach_db
  2. Trn cc Truy vn tr?nh n, nh?p vo Th?c thi (ho?c b?m F5) ch?y truy v?n. Khng ph?i l b?n nh?n ?c m?t tin nh?n m ch? ra r?ng khng c h? s ? ?c tr? l?i.

    CHU Y: T?m th?i tch c s? d? li?u t? my ch? cho php b?n sao chp d? li?u v ng nh?p cc t?p tin.
  3. Trong Windows Explorer, sao Pubs.mdf v Pubs_log.ldf t? Microsoft SQL Server\MSSQL\Data c?p trn h? ph?c v? th m?c Microsoft SQL Server\MSSQL\Data trn my tnh SQL Server 2000 cng c? my tnh ? bn
  4. ? nh km t?p tin vo my ch? SQL my tnh m?t l?n n?a, ch?y cc cu sau y trong phn tch truy v?n. B?n sao c?a my ch? c?a SQL Server c th? ? m?t v? tr khc so v?i v d? ny; S?a ?i ?ng d?n khi c?n thi?t.
        EXEC sp_attach_db @dbname = 'pubs',
            @filename1 = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
            @filename2 = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'
    					
  5. S? d?ng b?n sao c?a b?n c?a SQL Server 2000 Desktop cng c? ? m? b?t k? lm vi?c truy c?p vo d? n.
  6. Nh?p vo Truy vn, sau b?m M?i.
  7. Trong cc Truy v?n m?i h?p tho?i h?p, b?m vo T?o vn b?n ?c lu tr? th? t?c, sau b?m Ok.
  8. G? cc cu sau y trong cc th? t?c m?i.

    LU ?: M?t s? vn b?n chung th? t?c ?c lu tr? c th? ? ? . Ngoi ra, b?n sao c?a b?n c?a SQL Server 2000 cng c? my tnh ? bn c th? trn m?t ? ?a ngoi ? C.
       Create Procedure AttachDB
    
       As
    
       EXEC sp_attach_db @dbname = 'pubs',
    
           @filename1 = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
           @filename2 = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'
    
       return
    					
  9. Lu cc th? t?c ?c lu tr?, v sau ng n.
  10. B?m p AttachDB ? ch?y n. Lu ? r?ng b?n nh?n ?c m?t tin nh?n m ch? ra r?ng khng c h? s ? ?c tr? l?i. Nh?p vo Ok.
T?i th?i i?m ny, c s? d? li?u m?u qun r?u l g?n li?n v?i vi?c ci ?t SQL Server 2000 cng c? my tnh ? bn, v b?n c th? t?o cc d? n truy c?p m?i t? n.

Thu?c tnh

ID c?a bi: 290623 - L?n xem xt sau cng: 17 Thang Chin 2011 - Xem xt l?i: 4.0
p d?ng
  • Microsoft Office Access 2007
  • Microsoft Office Access 2003
  • Microsoft Access 2002 Standard Edition
T? kha:
kbclientserver kbhowto kbmt KB290623 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:290623

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com