
Shell scripting in LInux

SQL Server Access
Thanks to Graham Brown our resident SQL server guru for this - thought it is worth sharing.
This has
happened a few times where SQL instances have been built or cloned by ‘other’
people – who then forget about who is meant to be supporting the instances … or
just go on holiday 😊
https://www.sqlshack.com/recover-lost-sa-password/
Once you have gained access yourself please remember to add all the other DBA’s in the team… you know it makes sense!
If you have done the step above and still cannot log on – check the error log
(C:\Program
Files\Microsoft SQL Server\MSSQL13.DYNAMICS_CRM_SQL\MSSQL\Log\errorlog
for example) – in the case of the instance I could see this
just after the startup :
Basically whoever has created the instance has left it at ‘Windows only authentication’ - now although I can understand this depending on the application the instance is being used for it it’s a pain when we have the lack of login issue … and without the ability to use SSMS to change it to ‘SQL Server and Windows Authentication’ we have to hack the registry :
Can't open perl script - RemoteHostExecutor.pl
Despite banging on about making sure you have the latest OPatch applied on your database / grid homes today I was caught out.
If you have different OPatch versions between the grid and database homes you hit a mismatch error but if you have different versions on different RAC nodes you will hit this :
[root@ora01 gridhome]# $ORACLE_HOME/OPatch/opatchauto apply /u99/media/jul2020/31305382 -oh /u01/app/12.2.0/gridhome -analyze
Can't open perl script "/u01/app/12.2.0/gridhome/OPatch/auto/database/bin/RemoteHostExecutor.pl": (null)
oracle.dbsysmodel.driver.sdk.productdriver.ProductDriverException: Unable to execute command : Can't open perl script "/u01/app/12.2.0/gridhome/OPatch/auto/database/bin/RemoteHostExecutor.pl": (null)
OPatchAuto failed.
If you do a quick search you will be told to apply the latest OPatch but I was already using the latest version but once same version on all nodes - happy days!
So latest version all homes and all nodes.