Laurent Schneider – Oracle Certified Master
1,309 FOLLOWERS
Laurent Schneider blog is all about Oracle.
Laurent Schneider – Oracle Certified Master
7M ago
this blog is no longer maintained. go there : OEM patch | LaurentSchneider.Com (wordpress.com ..read more
Laurent Schneider – Oracle Certified Master
9M ago
new post on https://laurentschneider.wordpress.com/2023/07/31/wlst/
this blog is no longer maintained ..read more
Laurent Schneider – Oracle Certified Master
9M ago
Back in early 2005 I started this blog on Blogspot. Not being unserious about blogging, I bought this domain later in 2006 with paid hosting. I can recommend my GoDaddy provider for their support and attractive rates, but nowadays, I am no longer an active blogger. I’ll keep posting things occasionally on laurentschneider.wordpress.com. Saad posted the last comment back in February 2022
I thought I could maintain this site expenses covered by Google Ads. But this has been more annoying than profitable, it didn’t even cover the cost of the SSL certificate.
Anyway, see you on the free side of W ..read more
Laurent Schneider – Oracle Certified Master
10M ago
How to select xml with DTD ?
Imagine this XML code
SQL> select xmltype(
'<!DOCTYPE FOO SYSTEM "/public/test/foo.dtd"><FOO/>',
wellformed => 1) xml
from dual;
XML
-----------------------------------------------------
<!DOCTYPE FOO SYSTEM "/public/test/foo.dtd"><FOO/>
Most validations are done with XSD and not DTD, so it is not that easy, even google probably lead you here
Create the dtd in XDB
declare
b boolean;
begin
b := dbms_xdb.createfolder('/public/test');
b := dbms_xdb.createresource(
'/public/test/foo.dtd',
'<!ELEMENT FOO (BAR*)>');
end ..read more
Laurent Schneider – Oracle Certified Master
1y ago
Quite often you select from the sysman schema, let’s say
select target_name from sysman.mgmt$target;
To do so, you better be sys.. because SYS can see everything !
Let’s see what’s missing with a standard user
connect sys/***@oem01 as sysdba;
create user user1 identified by ***;
grant create session to user1;
conn user1/***@oem01;
select count(*) from sysman.mgmt$target;
SQL Error: ORA-00942: table or view does not exist
Fair enough, we don’t have select
connect sys/***@oem01 as sysdba;
grant create session to user1;
grant select on sysman.mgmt$target to user1;
conn user1/***@oem01;
s ..read more
Laurent Schneider – Oracle Certified Master
1y ago
Without Administrative privilege, how would you install ODP.NET?
Note 784309.1 describes the required files if you have no Oracle client
download XCOPY ODAC from Oracle .NET, Visual Studio, and VS Code ODAC Downloads for Oracle Database
Copy the files Oracle.DataAccess.dll OraOps.dll orannzsbb.dll oraociei.dll oci.dll to your directory (ex: C:\ODAC)
Add that directory to your PATH
Create your sqlnet.ora and tnsnames.ora or use ezconnect string host:1521/service.example.com
That’s it. It even works with kerberos
sqlnet.ora
sqlnet.kerberos5_conf=C:\ODAC\krb5.conf
sqlnet.kerberos5_cc_name=OSMS ..read more
Laurent Schneider – Oracle Certified Master
1y ago
done for a friend :
install rpm’s
sudo yum install -y freetds unixODBC unixODBC-devel freetds-libs python3-pyodbc
create odbc.ini and odbcinst.ini
for sybase go there Unix ODBC Sybase
for oracle go there Unix ODBC Oracle
for mssql
~/.odbc.ini : the Database definition
[DB01]
Driver = FreeTDS
Description = DB01
Server = src01
Port = 1433
Database = DB01
~/.odbcinst.ini : the driver definition
[FreeTDS]
Description = Free Sybase & MS SQL Driver
Driver64 = /usr/lib64/libtdsodbc.so.0
Setup64 = /usr/lib64/libtdsS.so.2
Port = 1433
test with isql
isql -v DB01 myuser mypw ..read more
Laurent Schneider – Oracle Certified Master
1y ago
Ages ago I explained how to generate excel from the Unix command line. For instance with HTML or with XML+ZIP
To do this in Windows is way more elegant. You get your dataset from Oracle or any other source.
Then you create an Excel Object, you add content, saves, that’s all folk!
# 1) get a dataset from Oracle
$oracle_home = (
gci -recurse HKLM:\SOFTWARE\Oracle |
Where-Object -Property Property -eq ORACLE_HOME |
Where-Object -Property PSChildName -Match KEY |
get-itemproperty -name ORACLE_HOME ).oracle_home;
'[INFO] '+$oracle_home;
Add-Type ..read more
Laurent Schneider – Oracle Certified Master
1y ago
A new 10.2 feature I mentioned in su in sqlplus – Laurent Schneider is the ability to use a proxy user in a connection string.
This was documented in What’s New in Oracle Call Interface?
Proxy access for a single client can be set using various connect strings.
Today I got one user complaining about ORA-01045: user USER lacks CREATE SESSION
Proxy was introduced in Oracle 8 (OCI only) and enhanced in numerous versions.
In JDBC, we used openProxySession as defined in OracleConnection (Oracle Database JDBC Java API Reference)
In C, we used OCILogon2 and OCIConnectionPoolCreate with an empty ..read more
Laurent Schneider – Oracle Certified Master
2y ago
Precondition : sqlplus can connect to the database server using a kerberos ticket.
I wrote The long long route to Kerberos – Laurent Schneider in 2014, but most of the bugs in 11.2.0.2 / 12.1.0.2 are no longer interesting, so probably you should be fine to just read Configuring Kerberos Authentication (oracle.com)
let’s see
sqlplus /@db01
SQL*Plus: Release 21.0.0.0.0 - Production on Fri May 20 13:33:00 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Last Successful login time: Fri May 20 2022 12:50:44 +02:00
Connected to:
Oracle Database 19c Enterprise Edition ..read more