Entre windows y linux

Hace un tiempo actualicé mi distribución de Linux (de Ubuntu 9.4 a Ubuntu 9.10). Lamentablemente no fue una experiencia del todo feliz. Si bien la actualización fue totalmente desatendida (una vez aceptada la propuesta de actualzación lanzada por el sistema operativo, automáticamente se realizó la descarga e instalación casi sin intervención adicional), algunas cosas dejaron de funcionar, una de ellas fue el modem 3G. Por otro lado, luego de la actualización mi sistema funciona más lento y al mismo tiempo los cambios en la interface de usuario (aunque mínimos) no me resultan más amistosos. Esto me ha llevado a volver a trabajar con más seguido con Windows.

About SQL Server Users and Logins

I think that many developers that work SQL Server do not have a clear understanding of this topic (I used to be one of them) and because of that is that I am writing this post.

Logins vs. User accounts

To connect to a SQL Server instance you first need a login so the instance can authenticate you (know who you are). But to perform operations on a specific database you will need a user account in that database. The user account is used for database access and permission validation. So you could have a login, but if you don’t have a user account associated to that login, you  won’t be able to access that database.

Logins

To create a login you can use the following code snippet.

— To create a login that uses Windows Authentication:
CREATE LOGIN <name of Windows User> FROM WINDOWS; GO

— To create a login that uses SQL Server Authentication:
CREATE LOGIN <login name> WITH PASSWORD = ‘<the password>’ ; GO

The actions you can perform with a SQL Server instance (like create, backup and restore databases) depend on the server roles associated with your login. Once the login is created you can assign it server roles by using the [sp_addsrvrolemember] stored procedure. Possible server roles are: dbcreator, sysadmin and serveradmin among others.

image

User Accounts

User accounts are defined at database instance level, and every user account must be associated to a login, so to create a user account you must provide login.

— To create a user for the myLogin login for the myDatabase database
use myDatabase
create user myUser for login mylogin with default_schema=dbo

As you can see, when creating a user you don’t need to provide a password, because there is already a password associated with the login.What a user can do with the  database is defined by the user’s permissions. Permissions are grouped into Roles and there are three different kind of roles:

  • Database Fixed roles: are pre-defined roles by the system
  • User-defined roles: are roles created by the user
  • Application roles:  are created to support the security needs of an application. (often database applications
    enforce their own security based on the application logic)

When a user is created it is automatically added to the public (fixed) role. To add a user to a role you can use the [sp_addrolemember] stored procedure.

image

Hope you find this useful.

Vacaciones 2010: NOA

Hace una semana regresamos de nuestras vacaciones y ahora sí puedo dar por comenzado el 2010. El destino elegido fue el noroeste argentino (NOA). En una travesía de 9 días recorrimos diversas poblaciones de las provicias de Salta y Jujuy. Este es el mapita que muestra los puntos que visitamos:

image

Si gustan consultarlo online este es el link: http://maps.google.com.ar/maps/ms?ie=UTF8&msa=0&msid=114358693910473847554.00047f7d55a914fde8bc0&ll=-22.583583,-65.412598&spn=4.898449,9.876709&z=7

Por suerte salío todo muy bien, más allá de algunos retrasos habituales en el aeropuerto.

Algunos puntos para destacar:

  • Comimos las mejores empanadas de carne de mi vida
  • La gente nos pareció muy amable
  • Los paisajes son increibles.
  • Pude contactarme con la naturaleza como nunca antes.

Finalmente, durante el viaje sacamos algunas fotos que pueden llegar a resultar útiles para algunas presentación o bien como fondos de escritorio. Este es el link:http://picasaweb.google.com/nicopaez/ArtLandscapes#

image