Obtaining Oracle Statistics from the Symfony Command Console

Asked 2 years ago, Updated 2 years ago, 155 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:34

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:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.