hybris direct sql query with commit ON is not having affect - sap-commerce-cloud

I'm trying to run direct SQL queries on Hybris Admin Console (HAC) with commit ON but it is not having an effect on the record.
UPDATE users SET p_email = 'test#sql.com' WHERE p_uid = 'testuser#test.com'
Is there anything I'm missing?

1) Verify the updated value using select query
SELECT p_email FROM users WHERE p_uid='testuser#test.com'
2) Clear the cache to get it reflected in the Model as well
Go to hac > monitoring > cache and click on Clear cache

Related

Site Map Node Issue Acumatica ERP

Loading the site returns the error: site map root node is null, the database is demo data stock
You can run this SQL command against the database to check if the node exists:
SELECT * from sitemap where Title = 'Sitemap Root' and CompanyID > 0;
If it is not there the deployment is corrupted and you will need to re-install the website.
There's not enough information in the question to determine how it was deployed and which data set was used. For SalesDemo data it should be deployed from the wizard.

View rows and tables for my data in Graphcool?

With Graphcool is it possible to view the SQL database to see your tables, rows, items etc?
My application will use GraphQL queries (obviously!) but as an admin it would be handy for me to be able to see my entire database.
{
allGroups{
name
id
}
}
In the terminal run graphcool console from your server directory. There is then a data menu link in the page that opens.

How to unlock hybris in the DB?

To refresh data in a non production environment (from production) I'm sent a DB dump that I need to import, update the admin password and 'unlock' hybris - the deploy would be a lot easier if this new environment is unlocked before the deployment happens so I can do an 'update running system'. Is it possible to unlock Hybris by making changes in the database, before Hybris is started up?
update props set valuestring1='0' where name='system.locked';
or
delete from props where name='system.locked';
go to the adminpanel console/flexiblesearch section and choose SQL query Not flexible query after that check if you have any DB lock by this code
select * from SYSTEMINIT;
when checking the cluster you can cluster node , and try kill the process by this code
delete from SYSTEMINIT where CLUSTERNODE='?YourClusterNodeNumber';
I hope this helps you.

DocumentDB Data migration Tool, can't migrate from db to db

I'm using DocumentDB Data Migration Tool to migrate a documentDB db to a newly created documentDB db. The connectionStrings verify say it is ok.
It doesn't work (no data transferred (=0) but not failure written in the log file (Failed = 0).
Here is what is done :
I've tried many things such as :
migrate / transfer a collection to a json file
migrate to partitionned / non partitionned documentdb db
for the target indexing policy I've taken the source indexing policy (json got from azure, documentdb db collection settings).
...
Actually nothing's working, but I have no error logs, maybe a problem of documentdb version ?
Thanx in advance for your help.
After debugging the solution from the tool's repo I figure the tools fail silently if you mistyped the database's name like I did.
DocumentDBClient just returns an empty async enumerator.
var database = await TryGetDatabase(databaseName, cancellation);
if (database == null)
return EmptyAsyncEnumerator<IReadOnlyDictionary<string, object>>.Instance;
I can import from an Azure Cosmos DB DocumentDB API collection using DocumentDB Data Migration tool.
Besides, based on my test, if the name of the collection that we specify for Source DocumentDB is not existing, no data will be transferred and no error logs is written.
Import result
Please make sure the source collection that you specified is existing. And if possible, you can try to create a new collection and import data from this new collection, and check if data can be transferred.
I've faced same problem and after some investigation found that internal document structure was changed. Therefor after migration with with tool documents are present but couldn't be found with data explorer (but with query explorer using select * they are visible)
I've migrated collection through mongo api using Mongichef
#fguigui: To help troubleshoot this, could you please re-rerun the same data migration operation using the command line option? Just launch dt.exe from the same folder as Data Migration Tool for syntax required. Then after you launch it with required parameters, please paste the output here and I'll take a look what's broken.

Azure Mobile Service (node backend) __updatedAt property not automatically set after edit

After reading the documentation I was expecting that this field is automatically set by Azure Mobile Services. Apparently it isn't.
Should I configure something extra?
Other options that I see (to do for each table):
* add an axtra line to the node js update(item, user, request) function:
item.__updatedAt = new Date();
* create an update trigger in the database
Anybody experience with this?
Thx!
The __updatedAt column is updated by a trigger created in the underlying SQL Server database, so it should be updated any time a row is updated. Note that this requires a database operation to occur for it to be updated.

Resources