사용자 삽입 이미지

백업받은 데이터를  복구 했다 하지만...

지금 사용하는 DB에도 계정이 있지만.. 접근할 수 없다..

계정은 같지만 그전 DB와 다르기 때문이다.. 있때...  방법은...

dbo라는 계정으로 owner를 대체하고.... 기존 소유자 계정을 삭제한 후

신규 DB의 계정을 소유자로 변경한다...

그럼 소유주를 dbo로 변경하는 방법은 무얼까?

2000과 2005가 조금 다르다.

mssql 2005 이전 버전
exec sp_changeobjectowner '유저명.objects명(테이블 또는 프로시져)','dbo'

mssql 2005
alter schema dbo transfer 유저명.objects명(테이블 또는 프로시져)

예)
snjgame이 소유한 aaa테이블, bbb프로시져

mssql 2005이전

exec sp_changeobjectowner 'snjgame.aaa','dbo'
exec sp_changeobjectowner 'snjgame.bbb','dbo'

mssql 2005

alter schema dbo transfer SagoAdmin.UP_NT_SAGO_CHARGEINFO_CANCEL;


마지막 달의 날자를 구하는 함수 입니다..

Function getTotalMonthDay( strMonth, strYear)
    Dim result = 0

    select case strMonth
    case "1" ,"3", "5", "7", "8", "10", "12"
        result = 31
    case "4", "6", "9", "11"
        result = 30
    case "2"
        if ((strYear mod 4) = 0 and (strYear mod 100) <> 0) or (strYear mod 400) = 0 then
            result = 29
        else
            result = 28
        end if
    end select

     getTotalMonthDay= result

End Function

ASP.Net 을 하실때

아래와 같은 오류가 났을때 처리법입니다..
Failed to execute request because the App-Domain could not be created. Error: 0x80131902


  1. With a command window, get to the latest version of .net under
  2. C:\Windows\Microsoft.Net\Framework\
  3. Now run the following command: "net stop w3svc" to stop web services.
  4. Then use "aspnet_regiis.exe -ua" to uninstall all instances of ASP.NET from IIS. (제거 합니다.)
  5. Follow with "aspnet_regiis.exe -i" to install ASP.NET into IIS. (다시 설치 합니다.)
  6. Now restart web services with "net start w3svc".


이렇게 해주시면 됩니다. ^^

+ Recent posts