달력

22012  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
글쎄 한동안 잘 사용해오던 

STL의  remove_if와 unique 함수의 버그(?)같은 것을 찾았다.

둘다 특정 조건에 부합되는 부분을 일정 위치 이후로 옮기고, 그 위치를 리턴 하는 방식으로 데이터를 정리할 때 사용한다.

// 일반적으로 아래와 같이 사용을 한다.
std::vector<int> vecAny;

std::vector<int>::iterator it = std::remove_if( vecAny.begin(), vecAny.end(), ANYFunction );
if( it !=  vecAny.end() )
{
     vecAny.erase( it,  vecAny.end() );
}

그런데 이 놈의 것이 헛질거리를 하는 것을 본 것이 
std::vector<ANY_InstancePointerPOINTER> vecAny;
  std::vector<int>::iterator it = std::remove_if( vecAny.begin(), vecAny.end(), ANYFunction );
if( it !=  vecAny.end() )
{
    std::for_each( it,   vecAny.end(), _ANY_INSTANCE_REMOVE );
    vecAny.erase( it,  vecAny.end() );
}

위와 같이 잘 쓰고 있었다. 그런데.

이넘이 엄한 짓을 하고 있었다.

remove_if 시 정렬이 it가 가리키고 있는 곳과 잘 정리해서 준줄 알았는데, 주소값을 보면 중복적으로 처리되어 있는 부분이 있다.

즉. std::for_each를 이용해서 삭제를 할 경우 실제 instance가 앞쪽에 정렬되어 있는 넘과 같아서 남아 있어야 할 넘이 지워지는 경우까지 발생했다.

이와 같은 문제는 std::unique에서도 동일하게 발견되었다.

이 넘들 땜시 갑자기 죽어나가는 상황을 찾느라... ㅠ.ㅠ

결국 앞의 remove_if는 방법을 바꿔서 처리했다.

// 기존 방식
std::vector<int>::iterator it = std::remove_if( vecAny.begin(), vecAny.end(), ANYFunction );
if( it !=  vecAny.end() )
{
     vecAny.erase( it,  vecAny.end() );
}

// 문제 회피 방식
std::vector<int>::iterator it = std::find_if( vecAny.begin(), vecAny.end(), ANYFunction ); 
while(  it  !=  vecAny.end() )
{
   delete *it;
   vecAny.erase(it);
   if( vecAny.empty() == true ) break;

    it = std::find_if( vecAny.begin(), vecAny.end(), ANYFunction ); 
}

// unique의 경우는 보다 길어 졌다.
Dummy로 한쪽으로 옮겨놓고 원래 Container로 unique하게 만들때, 일일이 검사하는 방법으로 처리했다..
길어서 내용은 봐서~~ 나중에.. 

여하튼 참 고민스럽게 만든 부분들 이었다..

 
Posted by 촌돌애비
|
Visual Studio 로 컴파일 할 때 "이 프로젝트는 만료되었습니다."

라고 나오며 항상 재컴파일을 요구하는 경우..

여러가지를 확인해본다. 

C/C++ 영역에서 - 최소 다시빌드 선택여부

링커 영역에서 - 증분링크  사용여부

그런데 이도저도 다 해봐도 계속 나온다면..

솔루션에 포함된 파일중에 존재하지 않는 파일이 있을 수 있다...<------------- 징그러운 넘...

Posted by 촌돌애비
|
메모리 관리는 습관적으로 하고 있으나, 타인의 코드나 기타 부득불 디버깅을 해봐야 할 경우가 있다.

이때 도움이 될만한 정보...


http://msdn.microsoft.com/en-us/library/x98tx3cf(VS.71).aspx
Posted by 촌돌애비
|

sql창으로


One way that I did is to use sql;

SQL> alter system set processes=100 scope=spfile; 


Step 2: Connect as DBA and restart the Oracle Instance…

 SQL> conn / as sysdba

Connected.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started. 




또는 Windows에서 설정.....



다음 파일에서 굵게 표시된 부분으로 수정합니다

c:\oraclexe\app\oracle\product\10.2.0\server\config\scripts

##############################################################################

# Copyright (c) 1991, 2005, Oracle. All rights reserved.

##############################################################################


###########################################

# Cursors and Library Cache

###########################################

open_cursors=300


###########################################

# Database Identification

###########################################

db_name=XE


###########################################

# Diagnostics and Statistics

###########################################

background_dump_dest=c:\oraclexe\app\oracle\admin\XE\bdump

core_dump_dest=c:\oraclexe\app\oracle\admin\XE\cdump

user_dump_dest=c:\oraclexe\app\oracle\admin\XE\udump


###########################################

# File Configuration

###########################################

control_files=(“c:\oraclexe\oradata\XE\control.dbf”)


###########################################

# Job Queues

###########################################

# job_queue_processes=4

job_queue_processes=10


###########################################

# Miscellaneous

###########################################

compatible=10.2.0.1.0


###########################################

# Processes and Sessions

###########################################

sessions=20


###########################################

# SGA Memory

###########################################

sga_target=768M


###########################################

# Security and Auditing

###########################################

audit_file_dest=c:\oraclexe\app\oracle\admin\XE\adump

remote_login_passwordfile=EXCLUSIVE


###########################################

# Shared Server

###########################################

dispatchers=”(PROTOCOL=TCP) (SERVICE=XEXDB)”

shared_servers=4


###########################################

# Sort, Hash Joins, Bitmap Indexes

###########################################

pga_aggregate_target=256M


###########################################

# System Managed Undo and Rollback Segments

###########################################

undo_management=AUTO

undo_tablespace=UNDO


###########################################

# Backup and Recovery

###########################################

DB_RECOVERY_FILE_DEST_SIZE = 10G

DB_RECOVERY_FILE_DEST = c:\oraclexe\app\oracle\flash_recovery_area


os_authent_prefix=”"

Posted by 촌돌애비
|
ORA-00054: 리소스가 사용 중이어서 NOWAIT가 지정되었거나 시간 초과가 만료된 상태로 획득합니다.
00054. 00000 -  "resource busy and acquire with NOWAIT specified"


통상적으로 해당 오류는 사용 중인 테이블에 lock이 걸린 상태에서 발생한다.
일단, commit을 실행 하는 것이 가장 간단한 해결 방법이다.
commit으로도 해결되지 않으면, 하단의 방법으로 진행하면 된다.


1명의 사용자가 사용 중인 DB에서 lock이 걸리는 경우는
주로 DML 실행 중에 비정상 종료나 정지를 시키면 발생한다.
이런 경우는 해당 session을 kill하는 것이 가장 간단하다.

# session kill
SELECT a.session_id AS SESSION_ID, b.serial# AS SERIAL_NO,
a.os_user_name AS OS_USER_NAME, a.oracle_username AS ORACLE_USERNAME, b.status AS STATUS
FROM v$locked_object a, v$session b
WHERE a.session_id = b.sid;

상단의 쿼리를 실행하여 나온 SESSION_ID와 SERIAL_NO를 하단의 쿼리에 값으로 넣어서 실행한다.

alter system kill session 'SESSION_ID,SERIAL_NO';


다수의 사용자가 하나의 DB로 작업하다가 lock이 걸리는 경우는
선행 사용자가 commit 해주면 간단히 해결되는 경우가 있다.

또한, commit으로 해결되지 않으면
상단에 작성한 session kill 방법을 이용해도 해결이 가능하다.
Posted by 촌돌애비
|
참조: http://msdn.microsoft.com/en-us/library/bb773559(VS.85).aspx
윈도우의 Visual C++에서 파일 경로를 조작할 때 사용할 수 있는 유용한 API 함수들이다.
사용하기 위해 아래와 같이 선언한다.
#include <shlwapi.h>
#pragma comment(lib, "shlwapi")


PathAddBackslash - 경로에 백슬레시를 덧붙여준다. 백슬레시가 이미 붙어 있으면 변경하지 않는다.
"c:\abc" -> "c:\abc\"
"c:\abc\" -> "c:\abc\"

PathAddExtension - 파일 경로 뒤에 지정된 확장자를 덧붙여준다. 확장자가 이미 있다면 변경하지 않는다.
"c:\abc", ".bak" -> "c:\abc.bak"
"c:\abc.cpp", ".tmp" -> "c:\abc.cpp"

PathAppend - 두 개의 경로를 덧붙인다. 사이에 백슬레시가 없으면 자동으로 추가해 준다.
"c:\abc", "def" -> "c:\abc\def"
"c:\abc\", "def" -> "c:\abc\def"
"c:\abc", "\def" -> "c:\abc\def"
"c:\abc\", "\def" -> "c:\abc\def"

PathBuildRoot - 드라이브 식별번호를 드라이브 경로로 변경해 준다.
0 -> "A:\"
1 -> "B:\"
2 -> "C:\"

PathCanonicalize - 특별한 경로 문자열을 정리해 준다.
"c:\abc\def\..\ghi" -> "c:\abc\ghi"
"c:\abc\def\.\ghi" -> "c:\abc\def\ghi"

PathCombine - 두 개의 경로를 결합한다. 백슬레시도 검사해서 추가하고 ., ..과 같은 특별한 경로 문자열도 정리해 준다.
"c:\abc", "def.txt" -> "c:\abc\def.txt"
"c:\abc\", "..\def\ghi.txt" -> "c:\def\ghi.txt"

PathCommonPrefix -  공통된 경로를 골라낸다.
"c:\abc\def.txt", "c:\abc\ghi\" -> "c:\abc"
"c:\abc\def\jkl.txt", "c:\abc\def\..\jkl.txt" -> "c:\abc\def"

PathCompactPath -  경로를 dc와 pixel 폭 크기에 알맞게 적당히 줄여준다.
hDC, "c:\abc\def\ghi\jkl.txt", 100 -> "c:\abc\...\jkl.txt"

PathCompactPathEx - 경로를 최대 문자열 길이에 알맞게 적당히 줄여준다.
"c:\\abc\\def\\jkl.txt", 15 -> "c:\...\jkl.txt"

PathCreateFromUrl - URL로 쓰여진 파일명을 경로로 변환한다.
"file:///c:/abc/def.txt" -> "c:\abc\def.txt"

PathFileExists - 해당 경로나 파일이 실제로 존재하는지 검사한다.

PathFindExtension - 확장자의 위치를 찾아서 반환한다.

"c:\abc\def.txt" -> ".txt"

PathFindFileName - 파일 이름의 위치를 찾아서 반환한다.
"c:\abc\def.txt -> "def.txt"

PathFindNextComponent - 전체 경로 중 한 단계씩 하위로 내려간 경로를 반환한다.
"c:\abc\def.txt" -> "abc\def.txt"
"abc\def.txt" -> "def.txt"
"def.txt" -> ""

PathFindOnPath - 파일을 찾아서 완전한 경로를 반환한다. (목록이 NULL일 경우 실행 PATH에서 찾기)
"cmd.exe", NULL -> "C:\WINDOWS\system32\cmd.exe"
"iexplore.exe", { "c:\Windows", "c:\Program Files", "c:\Program Files\Internet Explorer", NULL } -> "c:\Program Files\Internet Explorer\iexplore.exe"
파일이 여러개라면 첫번째로 발견된 파일의 경로만 반환

PathFindSuffixArray - 지정된 접미사 목록에서 입력된 경로에 일치하는 것을 찾는다. (대소문자 구분)
"c:\abc\DEF.txt", { "def.txt", "DEF.txt", ".txt" }, 3 -> "DEF.txt"
"c:\abc\def\ghi.txt", { "def.txt", "DEF.txt", ".txt" }, 3 -> ".txt"

PathGetArgs - 전체 문자열에서 앞 단어를 무시한 입력 인자 위치를 찾아서 반환한다.
"test.exe temp.txt sample.doc" -> "temp.txt sample.doc"
"test.exe sample All 15" -> "sample All 15"
"test.exe" -> ""
"abc def ghi" -> "def ghi"

PathGetCharType - 문자가 경로에서 어떤 목적으로 쓰일 수 있는지 확인한다.
':' -> GCT_SEPARATOR
'.' -> GCT_LFNCHAR | GCT_SHORTCHAR
'\\' -> GCT_SEPARATOR
'/' -> GCT_INVALID
'\"' -> GCT_INVALID
'\'' -> GCT_LFNCHAR | GCT_SHORTCHAR
'\t' -> GCT_INVALID
'\n' -> GCT_INVALID
',' -> GCT_LFNCHAR
'*' -> GCT_WILD
'?' -> GCT_WILD
입력된 문자열을 검색하면서 리턴값을 조사하면 올바른 경로인지 미리 검사할 수 있다.

PathGetDriveNumber - 경로가 어느 드라이브에 있는지 번호를 확인한다.
"c:\abc\def.txt" -> 2
"d:" -> 3
"s:\test" -> 18

PathIsContentType - 파일 확장자가 콘텐츠 형식과 일치하는지 확인한다.
"c:\abc\def.txt", "text/plain" -> TRUE
".txt", "text/plain" -> TRUE
"txt", "text/plain" -> FALSE

PathIsDirectory - 실제로 존재하는 폴더인지 확인한다.
"c:\windows" -> TRUE
"c:\abc" -> FALSE

PathIsDirectoryEmpty - 폴더 내부가 비어있는지 확인한다.
"c:\windows" -> FALSE

PathIsFileSpec - 주어진 경로에 경로 문자들이 없는지 확인한다. 결과가 참이라도 올바른 파일명이 아닐 수 있다.
"c:\abc\def.txt" -> FALSE
"test.txt" -> TRUE
"*/wow." -> TRUE

PathIsHTMLFile - 콘텐츠 형식이 "text/html"인 확장자인지 확인한다.
"test.html" -> TRUE
"test.htm" -> TRUE
"test.xml" -> FALSE
"test.txt" -> FALSE

PathIsLFNFileSpec - 주어진 경로가 긴파일이름에 적합한지 확인한다.

PathIsNetworkPath - 주어진 경로가 네트워크 경로 형식인지 확인한다. (실제로 존재하는지 확인하지는 않음)
"c:\abc\def.txt" -> FALSE
"\\abc\def.txt" -> TRUE
"http://abc/def.txt" -> FALSE

PathIsPrefix - 경로가 주어진 위치에서 시작하는지 확인한다.
"c:\", "c:\abc" -> TRUE
"C:\", "c:\abc" -> TRUE
"c:", "c:\abc" -> FALSE
"..\abc", "..\abc\def" -> TRUE
"d:\abc", "d:\def" -> FALSE

PathIsRelative - 주어진 경로가 상대 경로인지 확인한다. (파일명만 있어도 상대 경로로 인정)
".\abc.txt" -> TRUE
"..\abc\def.txt" -> TRUE
"c:\abc\def.txt" -> FALSE
"c:\abc\..\def.txt" -> FALSE
"test.txt" -> TRUE

PathIsRoot - 주어진 경로가 드라이브 루트인지 검사한다.
"c:\" -> TRUE
"c:" -> FALSE
"c:\test.txt" -> FALSE

PathIsSameRoot - 주어진 경로가 같은 드라이브에 있는지 검사한다.
"c:\abc\def", "c:\test.txt" -> TRUE

PathIsSystemFolder - 시스템 속성을 가진 폴더인지 확인한다.
"c:\windows" -> FALSE
"c:\program files" -> TRUE
"C:\Documents and Settings" -> FALSE
"C:\Documents and Settings\All Users\Application Data" -> TRUE

PathIsUNC - 네트워크 공유 경로인지 확인한다. (실제로 존재하는지 확인하지는 않음)
"c:\abc\def" -> FALSE
"\\abc\def" -> TRUE
"\\192.168.0.1" -> TRUE
"\\abc\def.txt" -> TRUE
"\\" -> TRUE
"\\test.txt" -> TRUE

PathIsUNCServer - 네트워크 공유 서버인지 확인한다. (실제로 존재하는지 확인하지는 않음)
"c:\abc\def" -> FALSE
"\\abc\def" -> FALSE
"\\192.168.0.1" -> TRUE
"\\abc\def.txt" -> FALSE
"\\" -> TRUE
"\\test.txt" -> TRUE

PathIsUNCServerShare -  네트워크 공유 폴더인지 확인한다. (실제로 존재하는지 확인하지는 않음)
"c:\abc\def" -> FALSE
"\\abc\def" -> TRUE
"\\192.168.0.1" -> FALSE
"\\abc\def.txt" -> TRUE
"\\" -> FALSE
"\\test.txt" -> FALSE

PathIsURL - 주어진 경로가 URL 형식이 맞는지 확인한다.

PathMakePretty - 대문자로 만들어진 경로 문자열을 소문자로 변환한다. (소문자가 하나라도 있으면 실패)
"C:\ABC\DEF" -> TRUE, "C:\abc\def"
"c:\ABC\DEF" -> FALSE, "c:\ABC\DEF"
"C:\abc\DEF" -> FALSE, "C:\abc\DEF"

PathMakeSystemFolder - 지정된 폴더를 시스템 폴더로 만든다.

PathMatchSpec - 와일드카드 형식으로 파일명과 일치되는지 확인한다.
"test.txt", "*.txt" -> TRUE
"abc.txt", "ab?.*" -> TRUE
"c:\abc\def.txt", "*\???.txt" -> TRUE

PathParseIconLocation - 파일 경로와 아이콘 인덱스 번호를 분리한다.
"iexplore.exe, 1" -> 1, "iexplore.exe"

PathQuoteSpaces - 경로에 공백이 포함되어 있으면 큰따옴표로 묶어준다. 공백이 없으면 무시
c:\1. abc -> "c:\\1. abc"
c:\abc -> c:\abc

PathRelativePathTo - 한 경로에서 다른 경로로 가는 상대 경로를 추출한다. (같은 드라이브에서만 가능)
"c:\abc\def\ghi\jkl.txt", 0, "c:\abc\mno\pqr.txt", 0 -> TRUE, "..\..\mno\pqr.txt"
"c:\abc\def\ghi\jkl", FILE_ATTRIBUTE_DIRECTORY, "c:\abc\mno\pqr.txt", 0
-> TRUE, "..\..\..\mno\pqr.txt"
"c:\abc\def\ghi\jkl.txt", 0, "c:\abc\mno\pqr", FILE_ATTRIBUTE_DIRECTORY
-> TRUE, "..\..\mno\pqr"

PathRemoveArgs - 경로에 포함된 인자를 지운다.
"test.exe temp.txt sample.doc" -> "test.exe"
"test.exe sample All 15" -> "test.exe"
"test.exe" -> "test.exe"
"abc def ghi" -> "abc"

PathRemoveBackslash - 경로 끝에 백슬레시가 있으면 삭제한다.
"c:\abc\" -> "c:\abc"
"c:\abc" -> "c:\abc"

PathRemoveBlanks - 경로 앞뒤에 공백문자가 있으면 삭제한다.
"  c:\abc   " -> "c:\abc"

PathRemoveExtension - 확장자를 삭제한다.
"c:\abc\def.txt" -> "c:\abc\def"

PathRemoveFileSpec - 파일 이름을 삭제한다.
"c:\abc\def.txt" -> "c:\abc"
"c:\abc\def\" -> "c:\abc\def"

PathRenameExtension - 확장자를 교체한다.
"c:\abc\def.txt", ".bak" -> "c:\abc\def.bak"
"c:\abc\def", ".bak" -> "c:\abc\def.bak"
"c:\abc\def\", ".bak" -> "c:\abc\def\.bak"

PathSearchAndQualify - 주어진 경로의 오류를 바로잡고, 상대 경로도 정리하고, 환경 변수도 적용한다.
"C:\foo\." -> "C:\foo"
"C:\foo\baz\.." -> "C:\foo"
"C:\foo\\\baz" -> "C:\foo\baz"
"\\server\aa\..\bb" -> "\\server\aa\bb"
"notepad.exe" -> "C:\Windows\System32\notepad.exe"
"%SystemRoot%\System32\notepad.exe" -> "C:\Windows\System32\notepad.exe"
(XP에서는 환경변수 확장이 제대로 작동하지 않음)

PathSetDlgItemPath - 주어진 다이얼로그 아이템 윈도우의 크기에 알맞게 긴 경로를 적당히 줄여준다.

PathSkipRoot - 루트 경로를 제외한 첫번째 위치를 찾아서 반환한다.
"c:\abc\def" -> "abc\def"
"\\\\abc\\def\\ghi.txt" -> "ghi.txt"

PathStripPath - 가장 마지막 경로만 남기고 삭제한다.
"c:\abc\def.txt" -> "def.txt"
"c:\abc\def" -> "def"
"c:\abc\def\" -> "def\"

PathStripToRoot - 루트 경로만 남기고 삭제한다.
"c:\abc\def.txt" -> "c:\"
"c:\abc\def" -> "c:\"

PathUndecorate - 경로에서 임시 파일에 붙는 숫자를 삭제한다.
"C:\Path\File[5].txt" -> "C:\Path\File.txt"
"C:\Path\File[12]" -> "C:\Path\File"
"C:\Path\File.txt" -> "C:\Path\File.txt"
"C:\Path\[3].txt" -> "C:\Path\[3].txt"
인터넷으로 접근한 임시파일들은 [#]과 같은 식으로 번호가 뒤에 붙는데 그러한 임시 번호를 제거한다.

PathUnExpandEnvStrings - 경로에서 환경 변수에 해당하는 문자열을 환경 변수 이름으로 교체한다.
"c:\Windows\test.txt" -> "%SystemRoot%\test.txt"
"c:\program files\test.txt" -> "%ProgramFiles%\test.txt"
"c:\abc\def" -> "%SystemDrive%\abc\def"

PathUnmakeSystemFolder - 지정된 폴더의 시스템 속성을 해제한다.

PathUnquoteSpaces - 큰 따옴표로 감싸진 경로에서 따옴표를 제거한다.
"c:\abc\1 def" -> c:\abc\1 def
c:\abc\def -> c:\abc\def
Posted by 촌돌애비
|

 참조: http://msdn.microsoft.com/en-us/library/bb773559(VS.85).aspx 

Shell Path Handling Functions

1 out of 1 rated this helpful Rate this topic

This section describes the Windows Shell path handling functions. The programming elements explained in this documentation are exported by Shlwapi.dll and defined in Shlwapi.h and Shlwapi.lib.

In this section

TopicDescription

PathAddBackslash

Adds a backslash to the end of a string to create the correct syntax for a path. If the source path already has a trailing backslash, no backslash will be added.

PathAddExtension

Adds a file name extension to a path string.

PathAppend

Appends one path to the end of another.

PathBuildRoot

Creates a root path from a given drive number.

PathCanonicalize

Removes elements of a file path according to special strings inserted into that path.

PathCombine

Concatenates two strings that represent properly formed paths into one path; also concatenates any relative path elements.

PathCommonPrefix

Compares two paths to determine if they share a common prefix. A prefix is one of these types: "C:\\", ".", "..", "..\\".

PathCompactPath

Truncates a file path to fit within a given pixel width by replacing path components with ellipses.

PathCompactPathEx

Truncates a path to fit within a certain number of characters by replacing path components with ellipses.

PathCreateFromUrl

Converts a file URL to a Microsoft MS-DOS path.

PathCreateFromUrlAlloc

Creates a path from a file URL.

PathFileExists

Determines whether a path to a file system object such as a file or directory is valid.

PathFindExtension

Searches a path for an extension.

PathFindFileName

Searches a path for a file name.

PathFindNextComponent

Parses a path and returns the portion of that path that follows the first backslash.

PathFindOnPath

Searches for a file.

PathFindSuffixArray

Determines whether a given file name has one of a list of suffixes.

PathGetArgs

Finds the command line arguments within a given path.

PathGetCharType

Determines the type of character in relation to a path.

PathGetDriveNumber

Searches a path for a drive letter within the range of 'A' to 'Z' and returns the corresponding drive number.

PathIsContentType

Determines if a file's registered content type matches the specified content type. This function obtains the content type for the specified file type and compares that string with the pszContentType. The comparison is not case-sensitive.

PathIsDirectory

Verifies that a path is a valid directory.

PathIsDirectoryEmpty

Determines whether a specified path is an empty directory.

PathIsFileSpec

Searches a path for any path-delimiting characters (for example, ':' or '\' ). If there are no path-delimiting characters present, the path is considered to be a File Spec path.

PathIsHTMLFile

Determines if a file is an HTML file. The determination is made based on the content type that is registered for the file's extension.

PathIsLFNFileSpec

Determines whether a file name is in long format.

PathIsNetworkPath

Determines whether a path string represents a network resource.

PathIsPrefix

Searches a path to determine if it contains a valid prefix of the type passed by pszPrefix. A prefix is one of these types: "C:\\", ".", "..", "..\\".

PathIsRelative

Searches a path and determines if it is relative.

PathIsRoot

Parses a path to determine if it is a directory root.

PathIsSameRoot

Compares two paths to determine if they have a common root component.

PathIsSystemFolder

Determines if an existing folder contains the attributes that make it a system folder. Alternately, this function indicates if certain attributes qualify a folder to be a system folder.

PathIsUNC

Determines if the string is a valid Universal Naming Convention (UNC) for a server and share path.

PathIsUNCServer

Determines if a string is a valid UNC for a server path only.

PathIsUNCServerShare

Determines if a string is a valid UNC share path, \\server\share.

PathIsURL

Tests a given string to determine if it conforms to a valid URL format.

PathMakePretty

Converts a path to all lowercase characters to give the path a consistent appearance.

PathMakeSystemFolder

Gives an existing folder the proper attributes to become a system folder.

PathMatchSpec

Searches a string using a MS-DOS wildcard match type.

PathMatchSpecEx

Matches a file name from a path against one or more file name patterns.

PathParseIconLocation

Parses a file location string that contains a file location and icon index, and returns separate values.

PathQuoteSpaces

Searches a path for spaces. If spaces are found, the entire path is enclosed in quotation marks.

PathRelativePathTo

Creates a relative path from one file or folder to another.

PathRemoveArgs

Removes any arguments from a given path.

PathRemoveBackslash

Removes the trailing backslash from a given path.

PathRemoveBlanks

Removes all leading and trailing spaces from a string.

PathRemoveExtension

Removes the file name extension from a path, if one is present.

PathRemoveFileSpec

Removes the trailing file name and backslash from a path, if they are present.

PathRenameExtension

Replaces the extension of a file name with a new extension. If the file name does not contain an extension, the extension will be attached to the end of the string.

PathSearchAndQualify

Determines if a given path is correctly formatted and fully qualified.

PathSetDlgItemPath

Sets the text of a child control in a window or dialog box, using PathCompactPath to ensure the path fits in the control.

PathSkipRoot

Parses a path, ignoring the drive letter or UNC server/share path elements.

PathStripPath

Removes the path portion of a fully qualified path and file.

PathStripToRoot

Removes all parts of the path except for the root information.

PathUndecorate

Removes the decoration from a path string.

PathUnExpandEnvStrings

Replaces certain folder names in a fully-qualified path with their associated environment string.

PathUnmakeSystemFolder

Removes the attributes from a folder that make it a system folder. This folder must actually exist in the file system.

PathUnquoteSpaces

Removes quotes from the beginning and end of a path.

SHSkipJunction

Checks a bind context to see if it is safe to bind to a particular component object.

UrlApplyScheme

Determines a scheme for a specified URL string, and returns a string with an appropriate prefix.

UrlCanonicalize

Converts a URL string into canonical form.

UrlCombine

When provided with a relative URL and its base, returns a URL in canonical form.

UrlCompare

Makes a case-sensitive comparison of two URL strings.

UrlCreateFromPath

Converts a MS-DOS path to a canonicalized URL.

UrlEscape

Converts characters in a URL that might be altered during transport across the Internet ("unsafe" characters) into their corresponding escape sequences.

UrlEscapeSpaces

A macro that converts space characters into their corresponding escape sequence.

UrlFixupW

Attempts to correct a URL whose protocol identifier is incorrect. For example, htttp will be changed to http.

UrlGetLocation

Retrieves the location from a URL.

UrlGetPart

Accepts a URL string and returns a specified part of that URL.

UrlHash

Hashes a URL string.

UrlIs

Tests whether a URL is a specified type.

UrlIsFileUrl

Tests a URL to determine if it is a file URL.

UrlIsNoHistory

Returns whether a URL is a URL that browsers typically do not include in navigation history.

UrlIsOpaque

Returns whether a URL is opaque.

UrlUnescape

Converts escape sequences back into ordinary characters.

UrlUnescapeInPlace

Converts escape sequences back into ordinary characters and overwrites the original string.

 

Posted by 촌돌애비
|
USER_EXTENTS, DBA_EXTENTS, USER_SEGMENTS, DBA_SEGMENTS,

USER_FREE_SPACE, DBA_FREE_SPACE, DBA_USERS, DBA_TS_QUOTAS,

USER_TABLESPACES, DBA_TABLESPCES, DBA_DATA_FILES, V$DATAFILE


 

'삽질' 카테고리의 다른 글

[펌]VC++ 경로제어 함수들  (0) 2012.02.04
Shell Path Handling Functions  (1) 2012.02.04
[펌]테이블/ 테이블스페이스별 사용량 확인  (0) 2012.02.03
ImageSafer... Image Protection  (1) 2011.11.17
std::remove_if ....  (0) 2011.11.06
Posted by 촌돌애비
|
SELECT SEGMENT_TYPE
         , SEGMENT_NAME
         , TABLESPACE_NAME
         , BYTES
  FROM USER_SEGMENTS
WHERE SEGMENT_TYPE = 'TABLE'
ORDER BY SEGMENT_TYPE,SEGMENT_NAME; 

테이블스페이스별 사용량 확인

 SELECT U.TABLESPACE_NAME "테이블스페이스명"
         , U.BYTES / 1024000 "크기(MB)"
         , (U.BYTES - SUM(NVL(F.BYTES,0))) / 1024000 "사용됨(MB)"
         , (SUM(NVL(F.BYTES,0))) / 1024000 "남음(MB)"
         , TRUNC((SUM(NVL(F.BYTES,0)) / U.BYTES) * 100,2) "남은 %"
  FROM DBA_FREE_SPACE F, DBA_DATA_FILES U
 WHERE F.FILE_ID(+) = U.FILE_ID
 GROUP BY U.TABLESPACE_NAME, U.FILE_NAME, U.BYTES
 ORDER BY U.TABLESPACE_NAME;

'삽질' 카테고리의 다른 글

Shell Path Handling Functions  (1) 2012.02.04
TableSpace와 관련된 DataDictionary View  (0) 2012.02.03
ImageSafer... Image Protection  (1) 2011.11.17
std::remove_if ....  (0) 2011.11.06
image 포맷 변환.  (0) 2011.11.04
Posted by 촌돌애비
|