Friday, July 22, 2011

.::: How To Create / Delete User Account In PL / SQL Oracle, Microsoft SQL Server :::.

Question;

1. How to create / delete user in Sql / Oracle?
      <sample user : teguh  , password : triharto >
2. How can I set privilages while create a new user?
    <access to/from SQL>
3. How can I view all forms / tables?
4. How can I list the users already got account in Sql?
5. Which is the best web site to learn oracle (for beginners)?


Answer :

1. How to create / delete user in Sql / Oracle?<sample user : teguh  , password : triharto >

*===============================================================
Welcome to Microsoft Telnet Server.
*===============================================================
C:\Documents and Settings\Administrator>sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 25 10:50:16 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> create user teguh identified by triharto;

User created.

SQL> grant connect to teguh;

Grant succeeded.

SQL> grant resource to teguh;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

*===============================================================
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
*===============================================================

C:\Documents and Settings\Administrator>sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 25 10:53:03 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: teguh
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> connect sys/triharto as sysdba;
Connected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

C:\Documents and Settings\Administrator>

or you can use SQL Oracle Tool

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 3 16:53:25 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter password: *****

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> create user teguh identified by triharto;

User created.

SQL> grant connect to teguh;

Grant succeeded.

SQL> grant resource to teguh;

Grant succeeded.

SQL> connect sys/triharto as sysdba;
Connected.
SQL>




2. How can I set privilages while create a new user?<access to/from SQL>

SQL> grant connect to teguh;

Grant succeeded.

SQL> grant resource to teguh;

Grant succeeded.

or you can using

SQL>grant previlags / roles to teguh;

Grant succeeded.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

C:\Documents and Settings\Administrator>


3. How can I view all forms / tables?

*===============================================================
Welcome to Microsoft Telnet Server.
*===============================================================
C:\Documents and Settings\Administrator>sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 25 11:44:22 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options


SQL> select * from tab;

no rows selected

SQL>

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

C:\Documents and Settings\Administrator>

4. How can I list the users already got account in Sql?

*===============================================================
Welcome to Microsoft Telnet Server.
*===============================================================
C:\Documents and Settings\Administrator>sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 25 11:35:38 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from all_users;

USERNAME                          USER_ID CREATED
------------------------------ ---------- ---------
FAKTA-DAN-UNIK.BLOGSPOT.COM                                61 22-JUL-11
BI                                     60 22-JUL-11
PM                                     59 22-JUL-11
SH                                     58 22-JUL-11
IX                                     57 22-JUL-11
OE                                     56 22-JUL-11
HR                                     55 22-JUL-11
SCOTT                                  54 30-AUG-05
MGMT_VIEW                              53 30-AUG-05
TEGUH                                  62 25-JUL-11
MDDATA                                 50 30-AUG-05

USERNAME                          USER_ID CREATED
------------------------------ ---------- ---------
SYSMAN                                 51 30-AUG-05
MDSYS                                  46 30-AUG-05
SI_INFORMTN_SCHEMA                     45 30-AUG-05
ORDPLUGINS                             44 30-AUG-05
ORDSYS                                 43 30-AUG-05
OLAPSYS                                47 30-AUG-05
ANONYMOUS                              39 30-AUG-05
XDB                                    38 30-AUG-05
CTXSYS                                 36 30-AUG-05
EXFSYS                                 34 30-AUG-05
WMSYS                                  25 30-AUG-05

USERNAME                          USER_ID CREATED
------------------------------ ---------- ---------
DBSNMP                                 24 30-AUG-05
TSMSYS                                 21 30-AUG-05
DMSYS                                  35 30-AUG-05
DIP                                    19 30-AUG-05
OUTLN                                  11 30-AUG-05
SYSTEM                                  5 30-AUG-05
SYS                                     0 30-AUG-05

29 rows selected.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

C:\Documents and Settings\Administrator>

5. there are many , we can do it here at http://fakta-dan-unik.blogspot.com