Users


Role

Instead of assigning permissions individually, a role allows managing user permissions by groups.
En lugar de asignar permisos en forma individual, un role permite administrar permisos por grupos.

Problem 1
Create a role in the Oracle database using the SYSTEM acount from SQL*Plus. You can also use Run SQL Command Line that is located in the Oracle Folder.
Cree un rol en la base de datos en Oracle usando la cuenta SYSTEM desde SQL*Plus. Usted también puede usar Run SQL Command Line que se encuentra ubicada en la Carpeta de Oracle.

MSDOS: cmd.exe
SQL>connect SYSTEM
Enter password: 123
Connected.

CREATE ROLE programmer;


Problem 2
Type the following SQL statement to create the user andrew with the password easy78 using Oracle (you must run the script login as: SYS or the owner of the respective database.)
Escriba el siguiente código de SQL para crear al usuario andrew con el password easy78 usando Oracle (usted debe ejecutar el script conectado como: SYS o como el dueño de la bases de datos respectiva.)

MSDOS: cmd.exe
SQL>connect SYSTEM
Enter password: 123
Connected.

CREATE USER andrew PROFILE DEFAULT 
    IDENTIFIED BY easy78 DEFAULT TABLESPACE USERS 
    ACCOUNT UNLOCK;
GRANT CONNECT TO andrew;
GRANT programmer TO andrew;


Problem 3
Write a script in SQL to create the user andrew with the password easy78 using MySQL (you may create the user in any database.)
Escriba un script de SQL para crear al usuario andrew con el password easy78 usando MySQL (usted puede crear el usuario en cualquier base de datos.)

SQL
USE city_bank;
-- DROP USER adrew;
CREATE USER andrew IDENTIFIED BY 'easy78';
GRANT ALL PRIVILEGES ON *.* TO 'andrew' @'%';


Problem 4
Write a script in SQL to create the user andrew with the password easy78 using Microsoft SQL Server (you may create the user in any database.) In this case, the andrew user will not be able to DELETE or UPDATE in the database. Observe that in this case, we are creating a LOGIN and a USER. You must learn more about Windows Authentication to better understand how to connect to a Microsoft SQL Server.
Escriba un script de SQL para crear al usuario andres con el password easy78 usando Microsoft SQL ServerL (usted puede crear el usuario en cualquier base de datos.) En este caso, el usuario andrew no podrá ejecutar DELETE o UPDATE en la base de datos. Usted debe aprender más acerca de Windows Authentication para entender mejor como conectase a Microsoft SQL Server.

SQL
USE city_bank;
GO
-- _____________________________________________________ Create Login
CREATE LOGIN andrew WITH PASSWORD = 'easy78'
GO
-- _____________________________________________________ Create user
CREATE USER andrew FOR LOGIN andrew
GO

GRANT SELECT, INSERT TO andrew
GO


Destroying an user

When a user is destroyed, all his objects (tables, views, etc) may also destroyed. The example below destroys the andrew user.
Cuando un usuario es destruido, todos sus objetos (tablas, vistas, etc.) también pueden ser destruidos. El ejemplo de abajo destruye al usuario andrew.

SQL
DROP USER andrew;
-- DROP USER andrew CASCADE;
-- DROP LOGIN andrew;


Microsoft Network

In a corporation, there may be many computers running Microsoft Windows. There is one (or more) computer running Microsoft Windows Server and this computer is the Domain Controller. All client computers must join the domain (the group of computers.)
En una corporación, puede haber varias computadoras corriendo Microsoft Windows. Hay una (o más computadoras) corriendo Microsoft Windows Server y esta computadora es el Controlador del Dominio. Todas las computadoras cliente deben unirse al dominio (al grupo de computadoras).

Domain Controller

It is a computer that is used to manage resources in the Microsoft Network: users, hard drives, printers, etc.
Es una computadora que se usa para administrar los recursos en una red de Microsoft: usuarios, discos duros, impresoras, etc.

Microsoft Integrated Authentication

First, the user authenticates with the Domain Controller. Second, the user gets its permissions in the network based on his credentials (the permissions set in the Domain Controller).
Primero, el usuario se identifica con el Controlador de Dominios. Segundo, el usuario obtiene los permisos en la red en base a sus credenciales (los permisos fijados en el Controlador de Dominios).

Tip
To connect to Microsoft SQL Server, first you must create the user in the Domain Controller (or in the local computer). Second, using SQL, it is necessary to setup this user as shown in the following SQL script. Replace MyComputer with the name of the domain or the computer. Replace MyUsername with the name of the actual user.
Para conectarse a Microsoft SQL Server, primero usted debe crear el usuario en el Controlador de Dominios (o en la computadora local). Segundo, usando SQL, es necesario configurar este usuario como se muestra en el siguiente script de SQL. Reemplace MyComputer con el nombre del dominio o la computadora. Reemplace MyUsername con el nombre real del usuario.

setup_user.sql
IF NOT EXISTS(SELECT * FROM syslogins WHERE NAME='MyComputer\MyUsername')
BEGIN
     CREATE LOGIN [MyComputer\MyUsername] FROM WINDOWS;
END
GO

CREATE USER MyComputerUser FOR LOGIN [MyComputer\MyUsername];
GO

GRANT SELECT, INSERT, DELETE, UPDATE, EXECUTE TO [MyComputer\MyUsername];
GO


Tip
You may need to set up your Fire Wall so that a client may communicate with the SQL Server.
Usted puede necesitar configurar el Corta Fuegos para que el cliente se pueda comunicar con el servidor de SQL.

© Copyright 2000-2021 Wintempla selo. All Rights Reserved. Jul 22 2021. Home