NaPraia 12 Denunciar post Postado Abril 1, 2011 Beleza pessoal, estou com um probleminha, não estou conseguindo gerar um arquivo com text_io no sql plus. SQL> declare 2 v_file text_io.file_type; 3 v_line varchar2(100); 4 begin 5 v_line := '123456'; 6 v_file := text_io.fopen('C:\arquivo.txt','w'); 7 text_io.put_line(v_file,v_line); 8 text_io.fclose(v_file); 9 end; 10 / v_file text_io.file_type; * ERROR at line 2: ORA-06550: line 2, column 9: PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declared estou usando o SQL*Plus: Release 8.0.6.0.0 - Production on Fri Apr 1 16:24:55 2011 Oracle Database 10g Release 10.2.0.3.0 - 64bit Production With the Real Application Clusters option tem alguma forma de executar ou é mehor configurar o utl_file? no forms o text_io funciona sem problemas. O utl_file está configurado para gravar no servidor e não consigo gravar local. já criei diretório indicando para o c:\ mas não foi. não fiz foi alterar o utl_file_dir da v$parameter para adicionar o c:\ Compartilhar este post Link para o post Compartilhar em outros sites
supernoi 0 Denunciar post Postado Abril 1, 2011 Tenta ae... 1. Cria a pasta de saida para o UTL e da permissao de usuario(rw); 2. Alter system set utl_file_dir='c:\pasta' scope=spfile; 3. Create directory XPTO as 'c:\pasta'; 4. Grant read,write on directory XPTO to Usuario; E tenta utilizar o utl... ve se funciona flw Compartilhar este post Link para o post Compartilhar em outros sites
Motta 645 Denunciar post Postado Abril 2, 2011 O Owner tem Grant para a package ? A package está instalada corretamente ? ----------------------------------------- PLS-00201: identifier 'string' must be declared Cause: You tried to reference either an undeclared variable, exception, procedure, or other item, or an item to which no privilege was granted or an item to which privilege was granted only through a role. Action: 1) Check your spelling and declaration of the referenced name. 2) Verify that the declaration for the referenced item is placed correctly in the block structure. 3) If the referenced item is indeed declared but you don't have privileges to refer to that item, for security reasons, you will be notified only that the item is not declared. 4) If the referenced item is indeed declared and you believe that you have privileges to refer to that item, check the privileges; if the privileges were granted only via a role, then this is expected and documented behavior. Stored objects (packages, procedures, functions, triggers, views) run in the security domain of the object owner with no roles enabled except PUBLIC. Again, you will be notified only that the item was not declared. Fonte Compartilhar este post Link para o post Compartilhar em outros sites