Search results could not be loaded at the moment. Retry - plesk

I'am get the follow error when try access apps or categories apps under plesk 12:
Search results could not be loaded at the moment. Retry
I have look at the follow article: http://kb.sp.parallels.com/en/121173
And get: ERROR 1146 (42S02): Table 'psa.smb_apspackages' doesn't exist
Under my
/usr/local/psa/admin/logs
I do not have error logs for
php_error.log
How to can I fix the error?

Looks like psa database was not correctly upgraded. Try to fix it with bootstrapper repair procedure.

Solved please check the follow post at plesk:
http://forum.sp.parallels.com/threads/search-results-could-not-be-loaded-at-the-moment-retry.324794/#post-763196
Use the command:
select count(*) from psa.smb_apsPackages where registryUid not in (select uid from apsc.aps_registry_object);
the article at plesk are current, reason for not work as:
select count(*) from psa.smb_apspackages where registryUid not in (select uid from apsc.aps_registry_object);
the p from apspackages need to be apsPackages
Thank you #IgorG for let me know

Related

I can no longer query my view and my code fails over, Any suggestions?

I have a query that has been running for over a week with no issues.
CREATE or REPLACE VIEW VW_AF AS
select f.*
from VW_AFC f
inner join
(
SELECT Forecast, ROUTE_TO_MARKET, FORECASTCURRENCY,LEVEL,IMPORT , MAX(Version) AS maxVersion
FROM VW_AFC
GROUP BY Forecast, ROUTE_TO_MARKET, FORECASTCURRENCY,LEVEL,IMPORT
order by Forecast, ROUTE_TO_MARKET, FORECASTCURRENCY,LEVEL,IMPORT
)x
on x.Forecast = f.Forecast
and x.ROUTE_TO_MARKET = f.ROUTE_TO_MARKET
and x.FORECASTCURRENCY = f.FORECASTCURRENCY
and x.Level = f.level
and x.Import = f.Import
and x.maxversion = f.version;
Today i went to query this view and keep getting errors
--SQL execution internal error: Processing aborted due to error zz:yy; incident xx.--
I have no ideas, I know that for some reason the nested inner query is now failing but cant suss it.
Any experts have advice??
Thxs
According to your comments, I think you already found the correct approach to this error.
Whenever you see "SQL execution internal error" message, you should submit a support ticket to Snowflake. The numbers you see on the error message, can only be interpreted by Snowflake (they point an incident record). Snowflake Support will access to the incident record, see the underlying error message, and provide a workaround or a fix.

Not able to get the load history from INFORMATION_SCHEMA.COPY_HISTORY

I have a Snowflake table which gets its data (via COPY INTO) from an S3 bucket. When I tried to run the below statement to check the load status, it didn't give any result.
SELECT * FROM TABLE(INFORMATION_SCHEMA.COPY_HISTORY(TABLE_NAME=>'HourlyTransactionStaging', START_TIME=> DATEADD(DAY, -14, CURRENT_TIMESTAMP())));
Instead, I got this error
Table DBNAME.STAGING.HOURLYTRANSACTIONSTAGING did not exist or was purged.
However, when I tried to run this, it ran and gave me the results as well.
select * from information_schema.load_history
Where
Schema_name = 'STAGING'
AND TABLE_NAME = 'HOURLYTRANSACTIONSTAGING';
I figured out what the issue was. Apparently, TABLE_NAME parameter in the COPY_HISTORY function is case sensitive and I was providing the table name as per the conventions.
HourlyTransactionStaging --> HOURLYTRANSACTIONSTAGING
Glad you figured it out. Also you need to make sure that you're on the correct database / schema before running the query as below:
use schema your_db.schema;
select *
from table(information_schema.copy_history(table_name=>'table_name', start_time=> dateadd(hours, -1, current_timestamp())));

How to use laravel DB::setDatabaseName?

I use DB::setDatabaseName(<database name>) to reset the databasename, then I use DB::table(<table name>)->get() to retrieve data. However laravel does not change to new database.
This is my error message:
Illuminate/Database/QueryException with message 'SQLSTATE[42P01]:
Undefined table: 7 ERROR: relation "t" does not exist LINE 1: select
* from "t" ^ (SQL: select * from "t")'
The table t is in another database. I think when I use DB::setDatabaseName(<database name>) it would work.
Thank you for your help!
I don't know your database of detail information, but this help you to check database have changed.
// current database is 'db_1'
echo DB::getDatabaseName(); // return db_1
// Set database to 'db_2'
DB::setDatabaseName('db_2');
// If success, should return 'db_2' now.
echo DB::getDatabaseName();
// Check database tables.
DB::select('show tables');
I was facing a similar issue.
But changing the database solely might not always work.
You could use config->set() like so
config()->set('database.connections.mysql', $database_name);
But in my case I had to reconnect the database to change it dynamically.
So maybe this one works for the OP.
\DB::disconnect();
config()->set('database.pgsql.database', $database_name); // psgl = Postgress
\DB::reconnect();
You'll find more info here Laravel 6 config()->get('database.connections.mysql') not matching DB:connection()
Hope it helps

Mule:Database update failing although query works in Oracle

Maybe it is a case of me looking at this for too long. But I have this Oracle update query I am trying to run, I have verified the query works with hardcoded values on SQL Developer, howver when I run it from my flow Mule it fails.can anybody tell me what I am doing wrong?
Here is the query:
<db:update config-ref="DBConf" doc:name="abcd">
<db:dynamic-query><![CDATA[UPDATE myTable
SET TYPE= 'Entry',
ENTERED_DATE=SYSDATE,
ENTRY_BY= 2345,
ENTRY_DATE=TO_DATE('#[flowVars.entryDate]','YYYY-MM-DD')
WHERE ID = 'abcd1234']]>
</db:dynamic-query>
</db:update>
the flowVars.entryDate value is '2017-05-10'
This throws the following Error:
Message : ORA-01841: (full) year must be between -4713 and +9999, and not be 0
(java.sql.SQLDataException). Message payload is of type: Integer
Now the same query works like I said in SQL Developer but not in Mule, Can anybody provide any input
You can find the same problem answer in the following link:
Oracle: year must be between -4713 and +9999, and not be 0
Try this once. TO_DATE('2012-05-12','yyyy-mm-dd').
Delete the quotes for the #[flowvar.entrydate]

'do_replace()' not working?

while trying ATK4 I've found a problem:
$this->api->db->dsql()->table('person')->set('id', 1)->set('name', 'Test user')->do_replace();
This is not working. Then I looked a little bit deeper in ATK4 source and found in /opt/ipism/www/atk4/lib/DB/dsql.php the lines
public $sql_templates=array(
'select'=>"select [options] [field] [from] [table] [join] [where] [group] [having] [order] [limit]",
'insert'=>"insert [options_insert] into [table_noalias] ([set_fields]) values ([set_values])",
'replace'=>"replace [options_replace] into [table_noalias] ([set_fields]) values ([set_values])",
'update'=>"update [table_noalias] set [set] [where]",
'delete'=>"delete from [table_noalias] [where]",
'truncate'=>'truncate table [table_noalias]',
'describe'=>'desc [table_noalias]',
);
After changing the 'replace'-line into
'replace'=>"replace into [table_noalias] ([set_fields]) values ([set_values])",
it worked for me (removing the options_replace and appending a 's' to set_value). I'm using latest version from git with a MySQL database connection.
But I'm not sure, if I'm using 'do-replace()' in the wrong way?
ByE...
By the way: Is there a way to send fixes, without creating an account on GitHub or somewhere?
Edit: Here is the output if the options_replace isn't removed from the template:
replace [options_replace] into `person` (`id`,`name`) values ("1","John Doe") [:a_2, :a]Application Error: Database Query Failed
Exception_DB, code: 0Additional information: pdo_error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[options_replace] into `person` (`id`,`name`) values ('1' at line 1 mode: replace params: :a: 1 :a_2: John Doe query: replace [options_replace] into `person` (`id`,`name`) values (:a,:a_2) template: replace [options_replace] into [table_noalias] ([set_fields]) values ([set_values])/opt/ipism/www/atk4/lib/DB/dsql.php:1519
Stack trace:
File Object NameStack Trace/opt/ipism/www/atk4/lib/BaseException.php:63 Exception_DBException_DB->collectBasicData(Null)
/opt/ipism/www/atk4/lib/AbstractObject.php:545 Exception_DBException_DB->__construct("Database Query Failed", Null)
/opt/ipism/www/atk4/lib/DB/dsql.php:1519 sample_project_db_db_dsql_mysqlDB_dsql_mysql->exception("Database Query Failed")
/opt/ipism/www/atk4/lib/DB/dsql.php:1586 sample_project_db_db_dsql_mysqlDB_dsql_mysql->execute()
/opt/ipism/www/atk4/lib/DB/dsql.php:1624 sample_project_db_db_dsql_mysqlDB_dsql_mysql->replace()
/opt/ipism/www/page/test.php:40 sample_project_db_db_dsql_mysqlDB_dsql_mysql->do_replace()
/opt/ipism/www/atk4/lib/AbstractObject.php:306 sample_project_testpage_test->init()
/opt/ipism/www/atk4/lib/ApiFrontend.php:130 sample_projectFrontend->add("page_test", "test", "Content")
/opt/ipism/www/atk4/lib/ApiWeb.php:428 sample_projectFrontend->layout_Content()
/opt/ipism/www/atk4/lib/ApiFrontend.php:39 sample_projectFrontend->addLayout("Content")
/opt/ipism/www/atk4/lib/ApiWeb.php:275 sample_projectFrontend->initLayout()
/opt/ipism/www/index.php:15 sample_projectFrontend->main()
Note: To hide this information from your users, add $config['logger']['web_output']=false to your config.php file. Refer to documentation on 'Logger' for alternative logging options
Replace is similar to "insert" by it's nature, but instead of failing when primary key is duplicated, it replaces the value.
Please add ->debug() to your line before do_replace and give me the output, which would help me understand why that parameter needs removing.
set_value seems to be a typo, I have changed and committed it into master: https://github.com/atk4/atk4/commit/24b20865b9e3345a8e7504dfb68b7ef96335009e
the best way to submit changes is by creating a pull request. The best way to report issues is through "issues" in github currently.

Resources