Programing

Oracle SQL Developer로 비밀번호 변경

crosscheck 2020. 6. 29. 08:05
반응형

Oracle SQL Developer로 비밀번호 변경


많은 사용자들이 SQLPlus를 사용하지 않습니다. 나는 그들에게 사용자를 변경할 수 없습니다. 60 일마다 비밀번호가 만료됩니다.

SQLPlus 명령 "password"를 SQL 개발자에서 작동시킬 수 없습니다.

  1. 실행하면 잘못된 명령 오류가 발생합니다.
  2. 실행 스크립트를 쳐도 아무 일도 일어나지 않습니다.

데이터베이스가 많기 때문에 암호를 변경하기 위해 패키지를 작성하고 싶지 않습니다. 더 나은 옵션이 있습니까?


SQL Developer를 사용하여 비밀번호를 업데이트하는 올바른 구문 은 다음과 같습니다.

alter user user_name identified by new_password replace old_password ;

이 명령에 대한 추가 옵션을 여기서 확인할 수 있습니다. ALTER USER-Oracle DOCS


SQL 워크 시트에서 :

  • "암호"를 입력하십시오 (따옴표없이).

  • 강조 표시하고 CTRL+를 누르십시오 ENTER.

  • 비밀번호 변경 화면이 나타납니다.


SQL Developer에는 상황에 따라 작동 할 수있는 기본 제공 암호 재설정 옵션이 있습니다. 워크 스테이션에 Oracle Instant Client도 추가해야합니다. SQL 개발자가 시작할 때 인스턴트 클라이언트가 경로에 있으면 다음 옵션을 사용할 수 있습니다.

SQL Developer : 비밀번호 재설정 옵션을 표시하는 드롭 다운 메뉴

Oracle Instant Client는 설치하기 위해 관리자 권한이 필요하지 않으며 디렉토리에 쓰고 해당 디렉토리를 사용자 경로에 추가 할 수 있습니다. 대부분의 사용자는이를 수행 할 권한이 있습니다.

요약 : Oracle SQL Developer에서 비밀번호 재설정을 사용하려면 다음을 수행하십시오.

  1. 디렉토리에서 Oracle Instant Client의 압축을 풀어야합니다
  2. Oracle Instant Client 디렉토리를 사용자 경로에 추가해야합니다
  3. 그런 다음 Oracle SQL Developer를 다시 시작해야합니다.

이 시점에서 데이터 소스를 마우스 오른쪽 단추로 클릭하고 비밀번호를 재설정 할 수 있습니다.

전체 연습 http://www.thatjeffsmith.com/archive/2012/11/resetting-your-oracle-user-password-with-sql-developer/참조하십시오 .

오라클 문서의 주석도 참조하십시오 : http://docs.oracle.com/cd/E35137_01/appdev.32/e35117/dialogs.htm#RPTUG41808

SQL Developer (버전 4.0.1에서 테스트)가 OS X에서 Instant Client를 인식하고 사용하도록하는 대체 구성은 다음과 같습니다.

  1. 환경 설정-> 데이터베이스-> 고급-> Oracle 클라이언트 사용에서 Instant Client로 경로 설정
  2. 환경 설정 대화 상자에서 구성 ...-> 테스트 ... 옵션을 사용하여 인스턴스 클라이언트를 성공적으로로드 할 수 있는지 확인하십시오.
  3. (OS X) DYLD_LIBRARY_PATH 환경 변수와 관련된 문제를 해결 하려면 이 질문참조하십시오 . 다음 명령을 사용한 다음 SQL Developer를 다시 시작하여 변경 사항을 적용했습니다.

    $ launchctl setenv DYLD_LIBRARY_PATH / path / to / oracle / instantclient_11_2


사용자는 " newpassword로 식별 된 사용자 이름 만 변경"을 통해 여전히 비밀번호를 변경할 수 있습니다 . 자신의 암호를 변경하기 위해 ALTER USER 권한이 필요하지 않습니다.


관리자 설정에 따라 REPLACE 옵션을 사용하여 이전 비밀번호를 지정해야 할 수도 있습니다

alter user <username> identified by <newpassword> replace <oldpassword> 

좀 더 명확하게하려면 :

사용자 이름 : abcdef 및 이전 비밀번호 : a123b456, 새 비밀번호 : m987n654

m987n654로 식별 된 사용자 abcdef를 변경 하십시오 . a123b456을 대체 하십시오 .


SQL Developer 3.0.04에서 작동하는지 확인했습니다. 암호에는 특수 문자가 필요하므로 큰 따옴표로 묶인 문자열이 필요합니다. 물론 암호가 아직 만료되지 않았고 현재 로그인 한 경우에만 작동합니다.

ALTER USER MYUSERID
IDENTIFIED BY "new#password"
REPLACE "old#password"

나는 많은 답변이 있다는 것을 알고 있지만 일부에게는 도움이 될만한 해결책을 찾았습니다. 같은 문제가 발생하여 로컬 컴퓨터에서 Oracle sql develop을 실행 중이며 많은 사용자가 있습니다. 내 사용자 중 하나의 비밀번호를 기억하고 다른 사용자의 비밀번호를 재설정하는 데 사용했습니다.

단계 :

  1. 유효한 사용자와 비밀번호를 사용하여 데이터베이스에 연결하십시오. 제 경우에는 "시스템"을 제외한 모든 사용자가 만료되었으며 해당 비밀번호를 기억합니다

  2. 아래 이미지가 표시되는대로 트리에서 "Other_users"노드를 찾으십시오.

여기에 이미지 설명을 입력하십시오

3. "Other_users"트리에서 비밀번호를 재설정 할 사용자를 찾은 다음 메모를 마우스 오른쪽 단추로 클릭하고 "사용자 편집"을 선택하십시오.

여기에 이미지 설명을 입력하십시오

4. 사용자 편집 대화 상자에서 새 비밀번호를 입력하고 "적용"을 클릭하십시오. "비밀번호가 만료되었습니다 (사용자는 다음 로그인을 변경해야합니다)"를 선택 해제했는지 확인하십시오.

여기에 이미지 설명을 입력하십시오

그리고 그것은 나를 위해 일했습니다. 적어도 하나의 계정으로 로그인 할 수 있어야하지만 다른 솔루션만큼 좋지 않습니다.


내장 비밀번호 재설정 옵션이 사용자에게 작동하지 않을 수 있습니다. 이 경우 다음 SQL 문을 사용하여 비밀번호를 재설정 할 수 있습니다.

ALTER user "user" identified by "NewPassword" replace "OldPassword";

SQL Developer의 Reset Password 옵션이 작동하지 않으면 이 솔루션을 사용해보십시오 .

1 단계 : SQL Developer 설치 패키지와 함께 제공되는 시작 메뉴에서 SQL 명령 줄 실행을 엽니 다.

2 단계 : 다음 명령을 실행하십시오.

여기에 이미지 설명을 입력하십시오

Note: If password has already expired, Changing password for <user> option will automatically come.


you can find the user in DBA_USERS table like

SELECT profile
FROM dba_users
WHERE username = 'MacsP'

Now go to the sys/system (administrator) and use query

ALTER USER PRATEEK
IDENTIFIED BY "new_password"
REPLACE "old_password"

To verify the account status just go through

SELECT * FROM DBA_USERS.

and you can see status of your user.


You can now do this in SQL Developer 4.1.0.17, no PL/SQL required, assuming you have another account that has administrative privileges:

  1. Create a connection to the database in SQL Developer 4.1.0.17 with an alternative administrative user
  2. Expand the "Other Users" section once connected, and right-click the user whose password has expired. Choose "Edit User".
  3. Uncheck the "Password Expired..." checkbox, type in a new password for the user, and hit "Save".
  4. Job done! You can test by connecting with the user whose password had expired, to confirm it is now valid again.

There is another way to reset the password through command prompt ...

1) Go to the Oracle Database Folder ( In my case Oracle Database 11g Express Edition) in the START MENU.

2) Within that folder click "Run SQL Commandline"

Oracle Database Folder image

3) Type "connect username/password" (your username and old password without the quotation marks)

4) The message displayed is ...

ERROR: ORA-28001: the password has expired

Changing password for hr

--> New password:

Enter Username, Password image

5) Type the new password

6) Retype the new password

7) Message displayed is ...

Password changed Connected.

SQL>

8) GO TO Sql developer --> type the new password --> connected


One note for people who might not have the set password for sysdba or sys and regularly use a third party client. Here's some info about logging into command line sqlplus without a password that helped me. I am using fedora 21 by the way.

locate sqlplus

In my case, sqlplus is located here:

/u01/app/oracle/product/11.2.0/xe/config/scripts/sqlplus.sh

Now run

cd /u01/app/oracle/product/11.2.0/xe/config/scripts
./sqlplus.sh / as sysdba

Now you need to connect to database with your old credentials. You can find Oracle provided template in your output:

Use "connect username/password@XE" to connect to the database.

In my case I have user "oracle" with password "oracle" so my input looks like

connect oracle/oracle@XE

Done. Now type your new password twice. Then if you don't want your password to expire anymore you could run

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

참고 URL : https://stackoverflow.com/questions/3086332/changing-password-with-oracle-sql-developer

반응형