3 Txoj hauv Kev Rov Pib SA Password ntawm SQL Server

Cov txheej txheem:

3 Txoj hauv Kev Rov Pib SA Password ntawm SQL Server
3 Txoj hauv Kev Rov Pib SA Password ntawm SQL Server

Video: 3 Txoj hauv Kev Rov Pib SA Password ntawm SQL Server

Video: 3 Txoj hauv Kev Rov Pib SA Password ntawm SQL Server
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim

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

Pib dua SA Password hauv Sql Server Step 1
Pib dua SA Password hauv Sql Server Step 1

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

Pib dua SA Password hauv Sql Server Step 2
Pib dua SA Password hauv Sql Server Step 2

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.
Pib dua SA Password hauv Sql Server Step 3
Pib dua SA Password hauv Sql Server Step 3

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.

Pib dua SA Password hauv Sql Server Step 4
Pib dua SA Password hauv Sql Server Step 4

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.

Pib dua SA Password hauv Sql Server Step 5
Pib dua SA Password hauv Sql Server Step 5

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.

Pib dua SA Password hauv Sql Server Step 6
Pib dua SA Password hauv Sql Server Step 6

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.

Pib dua SA Password hauv Sql Server Step 7
Pib dua SA Password hauv Sql Server Step 7

Kauj Ruam 7. Nthuav tawm daim nplaub tshev "Security"

Cov ntawv tais ceev tseg no nyob hauv lub npe server.

Pib dua SA Password hauv Sql Server Step 8
Pib dua SA Password hauv Sql Server Step 8

Kauj Ruam 8. Qhib daim ntawv “Logins”

Cov nplaub tshev no yog nyob hauv pab pawg xaiv hauv qab "Ruaj Ntseg" nplaub tshev.

Pib dua SA Password hauv Sql Server Step 9
Pib dua SA Password hauv Sql Server Step 9

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.

Pib dua SA Password hauv Sql Server Step 10
Pib dua SA Password hauv Sql Server Step 10

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.

Pib dua SA Password hauv Sql Server Step 11
Pib dua SA Password hauv Sql Server Step 11

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

Pib dua SA Password hauv Sql Server Step 12
Pib dua SA Password hauv Sql Server Step 12

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.

Pib dua SA Password hauv Sql Server Step 13
Pib dua SA Password hauv Sql Server Step 13

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.
Pib dua SA Password hauv Sql Server Step 14
Pib dua SA Password hauv Sql Server Step 14

Kauj Ruam 3. Qhib Command Prompt hauv hom tswj

Ntawv qhia zaub mov Pib

Windowsstart
Windowsstart

tom qab ntawd ua raws cov theem no:

  • Ntaus hauv qhov hais kom ua
  • Txoj cai nyem

    Windowscmd1
    Windowscmd1

    Hais kom sai

  • Nyem " Khiav raws li tus tswj hwm
  • Xaiv " Yog lawm 'thaum kev ceeb toom.
Pib dua SA Password hauv Sql Server Step 15
Pib dua SA Password hauv Sql Server Step 15

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.

Pib dua SA Password hauv Sql Server Step 16
Pib dua SA Password hauv Sql Server Step 16

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"

Pib dua SA Password hauv Sql Server Step 17
Pib dua SA Password hauv Sql Server Step 17

Kauj Ruam 6. Txuas lub khoos phis tawj rau SQL

Ntaus sqlcmd thiab nias Enter. SQL kab hais kom ua yuav qhib tom qab.

Pib dua SA Password hauv Sql Server Step 18
Pib dua SA Password hauv Sql Server Step 18

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.
Pib dua SA Password hauv Sql Server Step 19
Pib dua SA Password hauv Sql Server Step 19

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.

Pib dua SA Password hauv Sql Server Step 20
Pib dua SA Password hauv Sql Server Step 20

Kauj Ruam 9. Tawm ntawm SQLCMD kab hais kom ua

Ntaus tawm thiab nias Enter.

Pib dua SA Password hauv Sql Server Step 21
Pib dua SA Password hauv Sql Server Step 21

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

Pib dua SA Password hauv Sql Server Step 22
Pib dua SA Password hauv Sql Server Step 22

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.

Pib dua SA Password hauv Sql Server Step 23
Pib dua SA Password hauv Sql Server Step 23

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.

Pib dua SA Password hauv Sql Server Step 24
Pib dua SA Password hauv Sql Server Step 24

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.

Pib dua SA Password hauv Sql Server Step 25
Pib dua SA Password hauv Sql Server Step 25

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.

Pib dua SA Password hauv Sql Server Step 26
Pib dua SA Password hauv Sql Server Step 26

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.

Pib dua SA Password hauv Sql Server Step 27
Pib dua SA Password hauv Sql Server Step 27

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.

Pib dua SA Password hauv Sql Server Step 28
Pib dua SA Password hauv Sql Server Step 28

Kauj Ruam 17. Nthuav daim nplaub tshev "Ruaj Ntseg"

Cov ntawv tais ceev tseg no nyob hauv lub npe server.

Pib dua SA Password hauv Sql Server Step 29
Pib dua SA Password hauv Sql Server Step 29

Kauj Ruam 18. Qhib daim ntawv “Logins”

Cov nplaub tshev no yog nyob hauv pab pawg xaiv hauv qab "Ruaj Ntseg" nplaub tshev.

Pib dua SA Password hauv Sql Server Step 30
Pib dua SA Password hauv Sql Server Step 30

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.

Pib dua SA Password hauv Sql Server Step 31
Pib dua SA Password hauv Sql Server Step 31

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.

Pib dua SA Password hauv Sql Server Step 32
Pib dua SA Password hauv Sql Server Step 32

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

Pib dua SA Password hauv Sql Server Step 33
Pib dua SA Password hauv Sql Server Step 33

Kauj Ruam 1. Qhib “Start” menu

Windowsstart
Windowsstart

Nyem lub logo Windows nyob rau hauv kaum sab laug-sab laug ntawm qhov screen. Tom qab ntawd, "Start" menu yuav qhib.

Pib dua SA Password hauv Sql Server Step 34
Pib dua SA Password hauv Sql Server Step 34

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.

Pib dua SA Password hauv Sql Server Step 35
Pib dua SA Password hauv Sql Server Step 35

Kauj Ruam 3. Txoj nyem rau

Windowscmd1
Windowscmd1

"Command Prompt".

Cov ntawv qhia zaub mov nco-down yuav tshwm tom qab ntawd.

Pib dua SA Password hauv Sql Server Step 36
Pib dua SA Password hauv Sql Server Step 36

Kauj Ruam 4. Nyem Khiav raws li tus tswj hwm

Qhov kev xaiv no yog nyob hauv cov ntawv qhia zaub mov nco-down.

Pib dua SA Password hauv Sql Server Step 37
Pib dua SA Password hauv Sql Server Step 37

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.

Pib dua SA Password hauv Sql Server Step 38
Pib dua SA Password hauv Sql Server Step 38

Kauj Ruam 6. Sau thawj lo lus txib

Ntaus osql -L thiab nias Enter.

Pib dua SA Password hauv Sql Server Step 39
Pib dua SA Password hauv Sql Server Step 39

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.

Pib dua SA Password hauv Sql Server Step 40
Pib dua SA Password hauv Sql Server Step 40

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

Pib dua SA Password hauv Sql Server Step 41
Pib dua SA Password hauv Sql Server Step 41

Kauj Ruam 9. Khiav cov lus txib

Ntaus GO, tom qab ntawv nyem Enter. Ntaus tawm thiab nias Enter kom tawm OSQL.

Pib dua SA Password hauv Sql Server Step 42
Pib dua SA Password hauv Sql Server Step 42

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.

Lub tswv yim

Yog tias cov txheej txheem piav qhia hauv kab lus no tsis ua haujlwm, muaj ntau qhov them nyiaj SQL server tus lej rov qab cov haujlwm muaj nyob hauv is taws nem

Pom zoo: