Sunday, 15 March 2020

how to create user in sql server and grant select permission only


Follow the 4 steps for creating user and grant permission:

Example:

step 1: create LOGIN rochelle with password ='admin@123'
step 2: use DatabaseName
step 3: create user s_rochelle for login rochelle
step 4: grant select to s_rochelle
Step 5: GRANT SELECT ON SCHEMA :: wmwhse2 TO DBUAT02 WITH GRANT OPTION;

Wednesday, 11 March 2020

Create new APPPOOL in sql server

IF NOT EXISTS (SELECT name FROM sys.server_principals WHERE name = 'IIS APPPOOL\MLM')
BEGIN
    CREATE LOGIN [IIS APPPOOL\MLM]
      FROM WINDOWS WITH DEFAULT_DATABASE=[master],
      DEFAULT_LANGUAGE=[us_english]
END
GO
CREATE USER [MLMWebDatabaseUser]
  FOR LOGIN [IIS APPPOOL\MLM]
GO
EXEC sp_addrolemember 'db_owner', 'MLMWebDatabaseUser'
GO

redirect to new page from jquery

  function foo(id) { var url = ' @Url . Action ( "Details" , "Branch" , new { id = "__id__" })'...