Qhov wikiHow qhia koj li cas kom rov pib dua tus thawj tswj hwm uas tsis nco qab (Tus Thawj Coj lossis SA) tus password rau ntawm Microsoft SQL server. Rov pib dua tuaj yeem ua tiav siv Windows kev txheeb xyuas tus ID nkag mus, Qhov Kev Pab Cuam Tshuam, lossis Hom Ib Leeg Ib Leeg.
Kauj ruam
Txoj Kev 1 ntawm 3: Siv Windows Authentication
Kauj Ruam 1. Nkag siab tias txoj kev no ua haujlwm li cas
Yog tias Windows kev lees paub tau qhib rau ntawm tus neeg rau zaub mov, koj tuaj yeem siv nws nkag mus rau tus neeg rau zaub mov yam tsis tas yuav nkag mus rau tus password. Thaum nkag mus, koj tuaj yeem hloov SQL server tus password tau yooj yim.
Yog tias Windows tsis tuaj yeem lees paub qhov tseeb, koj yuav tsum tau siv ib tus neeg siv nkaus xwb lossis qhov hais kom ua qhov program kom rov pib dua tus password
Kauj Ruam 2. Ua kom ntseeg tau tias SSMS tau teeb tsa
SSMS yog tus neeg siv cuam tshuam uas tso cai rau koj hloov pauv ntau yam ntawm SQL server teeb tsa hauv ib lub qhov rai, ntau dua li los ntawm Kev Hais Kom Ua. Yog tias SSMS tseem tsis tau teeb tsa, ua raws cov theem no:
- Mus ntsib SSMS teeb tsa nplooj ntawv ntawm qhov browser.
- Nyem qhov txuas " Download SQL Server Management Studio 17.6 ”.
- Ob npaug nias rau rub tawm SSMS cov ntaub ntawv teeb tsa.
- Ua raws cov lus qhia ntawm lub vijtsam kom teeb tsa SSMS.
Kauj Ruam 3. Qhib SSMS
Ntaus sql server tswj studio rau hauv "Pib" ntawv qhia zaub mov, tom qab ntawd nyem " Microsoft SQL Server Management Studio 17 "Nyob rau sab saum toj ntawm" Start "window.
Kauj Ruam 4. Xaiv qhov tseeb kom raug
Nyem rau ntawm lub npov "Authentication", tom qab ntawv xaiv " Windows Authentication "Los ntawm cov ntawv qhia zaub mov.
Kauj Ruam 5. Nyem Txuas
Nws nyob hauv qab ntawm lub qhov rais. Yog tias Windows kev lees paub tau qhib thiab tso cai rau ntawm tus as khauj, koj tuaj yeem mus ncaj qha rau nplooj ntawv server server.
Kauj Ruam 6. Nthuav daim nplaub tshev server
Yog tias cov ntawv server nyob rau sab laug sab saum toj ntawm lub qhov rais tsis muaj ob peb txoj kev xaiv hauv qab nws, nyem rau " +"Ntawm sab laug kom nthuav dav daim nplaub tshev.
Kauj Ruam 7. Nthuav tawm daim nplaub tshev "Security"
Cov ntawv tais ceev tseg no nyob hauv lub npe server.
Kauj Ruam 8. Qhib daim ntawv “Logins”
Cov nplaub tshev no yog nyob hauv pab pawg xaiv hauv qab "Ruaj Ntseg" nplaub tshev.
Kauj ruam 9. Ob npaug nias rau
Qhov kev xaiv no yog nyob hauv pab pawg "Logins" xaiv. Tom qab ntawd, lub qhov rais tswj hwm lub zog qhov rai yuav qhib.
Kauj ruam 10. Ntaus tus password tshiab
Ntaus tus password tshiab rau hauv "Password" thiab "Confirm password" teb nyob rau sab saum toj ntawm lub qhov rais.
Kauj ruam 11. Nyem OK
Nws nyob hauv qab ntawm lub qhov rais. Tom qab ntawd tus password yuav raug hloov pauv thiab lub qhov rai lub zog yuav raug kaw.
Txoj Kev 2 ntawm 3: Siv Tib-Neeg Siv
Kauj Ruam 1. Nkag siab tias txoj kev no ua haujlwm li cas
Yog tias koj raug xauv tawm ntawm tsuas yog tus as khauj uas twb muaj lawm, koj tuaj yeem tsim tus neeg siv tshiab thiab muab kev tso cai rau tus thawj tswj hwm los ntawm Command Prompt program. Tom qab ntawd, koj tuaj yeem siv tus neeg siv tshiab cov ntaub ntawv nkag mus nkag rau SQL server nplooj ntawv, thiab tom qab ntawd hloov tus lej SA.
Kauj Ruam 2. Ua kom ntseeg tau tias SSMS tau teeb tsa
SSMS yog tus neeg siv cuam tshuam uas tso cai rau koj hloov pauv ntau yam ntawm SQL server teeb tsa hauv ib lub qhov rai, ntau dua li los ntawm Kev Hais Kom Ua. Yog tias SSMS tseem tsis tau teeb tsa, ua raws cov theem no:
- Mus ntsib SSMS teeb tsa nplooj ntawv ntawm qhov browser.
- Nyem qhov txuas " Download SQL Server Management Studio 17.6 ”.
- Ob npaug nias rau rub tawm SSMS cov ntaub ntawv teeb tsa.
- Ua raws cov lus qhia ntawm lub vijtsam kom teeb tsa SSMS.
Kauj Ruam 3. Qhib Command Prompt hauv hom tswj
Ntawv qhia zaub mov Pib ”
tom qab ntawd ua raws cov theem no:
- Ntaus hauv qhov hais kom ua
-
Txoj cai nyem
“ Hais kom sai ”
- Nyem " Khiav raws li tus tswj hwm ”
- Xaiv " Yog lawm 'thaum kev ceeb toom.
Kauj Ruam 4. Nres qhov kev pabcuam SQL khiav
Ntaus net nres MSSQLSERVER thiab nias Enter. Tam sim no SQL cov kev pabcuam yuav raug tso tseg.
Kauj Ruam 5. Rov ua dua SQL hauv Tib-Neeg Siv
Ntaus net pib MSSQLSERVER -m "SQLCMD" thiab nias Enter.
Koj yuav tsis pom ib qho kev qhia tias ib tus neeg siv hom ua haujlwm nyob rau theem no, tab sis koj tuaj yeem pom cov kab lus "Kev pabcuam SQL Server tau pib ua tiav"
Kauj Ruam 6. Txuas lub khoos phis tawj rau SQL
Ntaus sqlcmd thiab nias Enter. SQL kab hais kom ua yuav qhib tom qab.
Kauj Ruam 7. Tsim tus neeg siv tshiab thiab tus password
Koj yuav tsum tsim nws nrog cov lus txib sau hauv SQL kab hais kom ua:
- Ntaus lub npe CREATE LOGIN WITH PASSWORD = 'password', nrog "npe" hais txog lub npe tus account thiab "password" hais txog tus lej tshiab.
- Nias qhov Enter.
- Ntaus GO thiab nias Enter.
Kauj Ruam 8. Ntxiv lub luag haujlwm tswj hwm lub luag haujlwm rau tus neeg siv tshiab
Ntaus lub npe SP_ADDSRVROLEMEMBER, 'SYSADMIN' ("lub npe" hais txog lub npe nyiaj), nias Enter, ntaus GO, thiab nias Enter dua.
Kauj Ruam 9. Tawm ntawm SQLCMD kab hais kom ua
Ntaus tawm thiab nias Enter.
Kauj ruam 10. Rov ua dua SQL hauv ib txwm muaj
Koj tuaj yeem xiam ib tus neeg siv hom los ntawm ntaus net nres MSSQLSERVER && net pib MSSQLSERVER thiab nias Enter.
Koj tuaj yeem pom kab lus "Kev pabcuam SQL Server tau pib ua tiav". Nyob rau theem no, Qhov rai Command Prompt tuaj yeem raug kaw
Kauj Ruam 11. Qhib SSMS
Ntaus sql server tswj studio rau hauv "Pib" ntawv qhia zaub mov, tom qab ntawd nyem " Microsoft SQL Server Management Studio 17 "Nyob rau sab saum toj ntawm" Start "window.
Kauj Ruam 12. Xaiv qhov pov thawj tsim nyog
Nyem rau ntawm lub npov "Authentication" drop-down, tom qab ntawd nyem " SQL Server Authentication "Los ntawm cov ntawv qhia zaub mov.
Kauj Ruam 13. Nkag mus siv tus neeg siv tshiab cov ntaub ntawv nkag mus
Nyem rau lub npov "ID nkag mus", tom qab ntawd xaiv lub npe siv uas koj nyuam qhuav tsim.
Kauj Ruam 14. Sau tus password
Ntaus tus neeg siv tus lej nkag mus rau hauv "Tus Password" teb nyob hauv qab ntawm lub qhov rais.
Kauj Ruam 15. Nyem Txuas
Nws nyob hauv qab ntawm lub qhov rais. Tsuav tus username thiab password raug nkag mus, nplooj ntawv server dashboard yuav qhib tam sim.
Kauj Ruam 16. Nthuav cov nplaub tshev server
Yog tias cov ntawv server nyob rau sab saud sab laug ntawm lub qhov rais tsis qhia ib qho ntawm cov kev xaiv hauv qab no, nyem rau " +"Ntawm sab laug kom nthuav dav daim nplaub tshev.
Kauj Ruam 17. Nthuav daim nplaub tshev "Ruaj Ntseg"
Cov ntawv tais ceev tseg no nyob hauv lub npe server.
Kauj Ruam 18. Qhib daim ntawv “Logins”
Cov nplaub tshev no yog nyob hauv pab pawg xaiv hauv qab "Ruaj Ntseg" nplaub tshev.
Kauj ruam 19. Ob npaug nias rau
Qhov kev xaiv no yog nyob hauv pab pawg "Logins" xaiv. Tom qab ntawd, lub qhov rais tswj hwm lub zog qhov rai yuav qhib.
Kauj Ruam 20. Sau tus password tshiab
Ntaus tus password tshiab rau hauv "Password" thiab "Confirm password" teb nyob rau sab saum toj ntawm lub qhov rais.
Kauj Ruam 21. Nyem OK
Nws nyob hauv qab ntawm lub qhov rais. Tom qab ntawd tus password yuav raug hloov pauv thiab lub qhov rai lub zog yuav raug kaw.
Txoj Kev 3 ntawm 3: Siv Command Prompt
Kauj Ruam 1. Qhib “Start” menu
Nyem lub logo Windows nyob rau hauv kaum sab laug-sab laug ntawm qhov screen. Tom qab ntawd, "Start" menu yuav qhib.
Kauj Ruam 2. Nrhiav qhov Command Prompt program
Ntaus hauv qhov hais kom ua sai sai, tom qab ntawd tos kom lub Command Prompt icon tshwm nyob rau sab saud ntawm "Start" menu.
Kauj Ruam 3. Txoj nyem rau
"Command Prompt".
Cov ntawv qhia zaub mov nco-down yuav tshwm tom qab ntawd.
Kauj Ruam 4. Nyem Khiav raws li tus tswj hwm
Qhov kev xaiv no yog nyob hauv cov ntawv qhia zaub mov nco-down.
Kauj Ruam 5. Nyem Yog thaum hais kom sai
Qhov kev xaiv los khiav Command Prompt hauv hom tswj hwm yuav raug lees paub. Tom qab ntawd, lub qhov rai qhov program yuav qhib.
Kauj Ruam 6. Sau thawj lo lus txib
Ntaus osql -L thiab nias Enter.
Kauj Ruam 7. Nkag mus rau lo lus txib thib ob nrog lub npe server
Ntaus hauv OSQL -S server -E, nrog "server" hloov los ntawm koj lub npe server. Tom qab ntawd, nyem Enter.
Kauj Ruam 8. Tsim tus password tshiab
Ntaus hauv EXEC sp_password NULL, 'password', 'sa', nrog nkag "password" hloov los ntawm tus lej koj xav siv. Tom qab ntawd, nyem Enter.
Piv txwv li, txhawm rau hloov tus password rau "qwerty123", ntaus EXEC sp_password NULL, 'qwerty123', 'sa' hauv Command Prompt window
Kauj Ruam 9. Khiav cov lus txib
Ntaus GO, tom qab ntawv nyem Enter. Ntaus tawm thiab nias Enter kom tawm OSQL.
Kauj ruam 10. Sim nkag mus rau hauv SQL server
Siv tus thawj coj tshiab nkag mus cov ntaub ntawv thiab tus password. Yog tias koj tuaj yeem nkag mus rau SQL server, tus lej nkag mus tus lej tau hloov pauv tiav.