Obtaining Oracle Statistics from the Symfony Command Console

Asked 1 years ago, Updated 1 years ago, 75 views

I was using the URL below to create the command, but I didn't know how to get Oracle statistics using Doctrine.
http://docs.symfony.gr.jp/symfony2/cookbook/console.html

If you run it with the following code, it will be ORA-00900.

$em=$this->getContainer()->get('doctrine')->getManager();
$connection=$em->getConnection();
$execute="execute dbms_stats.gather_table_stats(OWNNAME=>'test',".
                                                 "TABNAME=>'TEST_TABLE',".
                                                 "CASCADE=>true,".
                                                 "NO_INVALIDATE=>false)";
$connection->executeQuery($execute);

symfony2 doctrine2 oracle

2022-09-30 20:33

1 Answers

I think EXECUTE was a SQL*Plus command, not PL/SQL.

BEGIN dbms_stats.gather_table_stats(...);END;

Why don't you do it like this?


2022-09-30 20:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.