Explica melhor : ao invés de vir 10 caracteres o substr(USERNAME,1,10) tá 
trazendo mais ou menos caracteres que isso ?? Se sim,  Possibilidades :

- o banco 11g tá usando a completa inhaca do CURSOR_SHARING : há Dúzias de bugs 
com esse cara, inclusive de wrong results

ou

- vc tá usando no banco 11g um characterset double-byte, aonda são usados dois 
bytes para cada caracter representado : o manual mesmo nos diz :

"SUBSTR functions

The SUBSTR functions (SUBSTR, SUBSTRB, SUBSTRC, SUBSTR2, and SUBSTR4) return a 
portion of string, beginning at a specified position in the string. The 
functions vary in how they calculate the length of the substring to return.

    SUBSTR calculates lengths using characters as defined by the input 
character set.
....
"

ou

- vc tem algum caracter "especial", high-ascii sendo retornado MAS o seu 
programa-cliente não os interpreta corretamente : DIFICILMENTE se usam 
caracteres especiais em identificadores internos do database JUSTAMENTE por 
questões do tipo, mas sabe-se lá...

Eu digo pra vc CONSULTAR as propriedades desse database, CONSULTAR os 
parâmetros não-default setados, CONSULTAR os eventos setados E mandar um :

select  USERNAME, dump(username), OSUSER,SID,SERIAL#,LAST_CALL_ET 
"ELAPSED",MACHINE
FROM   V$SESSION
WHERE (TYPE <> 'BACKGROUND')
AND   (STATUS = 'SNIPED');

e veja o que vc vai ver....

[]s

  Chiappa

Responder a