probleme de PL/SQL sur 10g
bonjour à tous,
j'ai hérité d'une jolie BD en oracle 9i avec un PL/SQL qui tournait du feu de dieu.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
PROCEDURE EcritStatusDansFichier(Repertoire CHAR, Status INTEGER) IS
w_id UTL_FILE.FILE_TYPE;
BEGIN
w_id := UTL_FILE.FOPEN(Repertoire, 'Status.txt', 'w');
UTL_FILE.PUT_LINE(w_id, TO_CHAR(Status));
UTL_FILE.FCLOSE(w_id);
EXCEPTION
WHEN OTHERS THEN
Trace('>>EcritStatusDansFichier: Erreur lors écriture dans fichier status');
END EcritStatusDansFichier; |
je constate après migration vers une base en 10g que plus rien ne s'ecrit jamais dans ce fichier. Quand je regarde la FAQ du site: http://sheikyerbouti.developpez.com/...e=Chap8#L8.2.5 une ligne me fait très très peur:
" Ouverture d'un fichier Oracle 8i, 9i"
dois ré écrire les fonctions et procédue pour la 10g????
help :calim2:
Sûrement un problème de cote !!!
Salut,
Je pense que le problème provient plus de l'appel de tes variables systèmes ORACLE. Elles doivent être entre cote '.
Code:
1 2 3
| CREATE OR REPLACE DIRECTORY CST_REPERTOIRE_ORCALE AS 'Ton repertoire sur tes HDD ou lecteur réseau';
GRANT READ, WRITE ON DIRECTORY CST_REPERTOIRE_ORCALE TO ton_user;
GRANT all privileges ON DIRECTORY CST_REPERTOIRE_ORCALE TO ton_user; |
Bon, on est large avec les droits, mais si ça marche après tu pourras restreinte comme tu le souhaites.
Et ensuite, tu mets les cotes :
Code:
1 2
|
w_id := UTL_FILE.FOPEN('CST_REPERTOIRE_ORCALE', Fichier, 'r', 3000); |