none
Convert Oracle to sql server RRS feed

  • Question

  • Hi.

    Below are the few oracle 10 statements and I wanted to write their compatiable statements in SQL server 2008.

    ALTER USER BATCH IDENTIFIED BY BATCH DEFAULT TABLESPACE DATASE ACCOUNT UNLOCK;
    GRANT GISUSER TO LAND_ROLE WITH ADMIN OPTION;
    ALTER USER "GIS" QUOTA UNLIMITED ON DATASE;
    ALTER USER GIS DEFAULT ROLE CONNECT, GISADMIN;

    Thanks in advance
    Monday, September 17, 2012 3:23 PM

All replies

  • So what does these commands to? Remember that this is an SQL Server forum, and we don't know Oracle well here.

    Remember that SQL Server and Oracle are very different products, and one feature in Oracle may correrspond to something completely different in SQL Server. Or be entirely missing.

    The first and last statements I can't make out heads or tails of.

    The second looks like membership in a role, in which case sp_addrolemember may be what you are looking for. But there is no "ADMIN OPTION".

    The last appears to be related to resource alotment, which can be done with Resource Governer, but there is no quota on individual users in SQL Server.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Monday, September 17, 2012 10:08 PM
  • Thanks for the reply.

    Yes I know this is SQL server forum. I thought you guys might have a knowledge of Oracle as well.

    Tuesday, September 18, 2012 10:11 AM
  • Thanks for the reply.

    Yes I know this is SQL server forum. I thought you guys might have a knowledge of Oracle as well.

    ALTER USER BATCH IDENTIFIED BY BATCH DEFAULT TABLESPACE DATASE ACCOUNT UNLOCK;
    I guess above command is used for assigning a new password for a locked user or account corresponding statement for SQL server is as given bewlo
    ALTER LOGIN [Test] WITH PASSWORD=N'Test1' 



    GRANT GISUSER TO LAND_ROLE WITH ADMIN OPTION;
    I guess above command will assign admin role to a user so that he can acess all instances etc and correcsponding statement in  Sql
    EXEC master..sp_addsrvrolemember @loginame = N'GISUSER', @rolename = N'sysadmin'

    ALTER USER "GIS" QUOTA UNLIMITED ON DATASE;
    --not sure what it does

    ALTER USER GIS DEFAULT ROLE CONNECT, GISADMIN;
    I guess above command assins the default database to a user whnevr he connects to the datatbse and its corresponding statement in Sql is
    ALTER LOGIN GIS WITH DEFAULT_DATABASE=GISADMIN ,CHECK_EXPIRATION=OFF, CHECK_POLICY=ON

    I am not sure but i have given as per my understandings

    Please have look on the comment

    Tuesday, September 18, 2012 11:18 AM