{"id":9842,"date":"2017-03-07T21:58:17","date_gmt":"2017-03-07T20:58:17","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/"},"modified":"2017-03-07T21:58:17","modified_gmt":"2017-03-07T20:58:17","slug":"oracle-12cr2-changes-for-login-sql","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/","title":{"rendered":"Oracle 12cR2: changes for login.sql"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nIf you use a login.sql script to set the SQL*Plus environment from your current working directory, you will see that it will not run anymore in 12.2. This is a security feature, and a good occasion to explain how sqlplus finds the scripts to run, on Linux.<br \/>\n<!--more--><\/p>\n<p>For my test, I have login.sql, LOGIN.SQL, and script.sql in the following directories<\/p>\n<pre><code>$ tree \/tmp\/mytest\/\n\/tmp\/mytest\/\n\u251c\u2500\u2500 a\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 login.sql\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 LOGIN.SQL\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 script.sqlL\n\u251c\u2500\u2500 b\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 login.sql\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 LOGIN.SQL\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 script.sql\n\u251c\u2500\u2500 login.sql\n\u251c\u2500\u2500 LOGIN.SQL\n\u2514\u2500\u2500 script.sql<\/code><\/pre>\n<p>I&#8217;m going to the parent directory<\/p>\n<pre><code>cd \/tmp\/mytest<\/code><\/pre>\n<p>The scripts display their name:<\/p>\n<pre><code>+ head login.sql LOGIN.SQL script.sql\n==&gt; login.sql  LOGIN.SQL  script.sql &lt;==\nprompt Hello from \/tmp\/mytest\/script.sql<\/code><\/pre>\n<p>I&#8217;ll run commands from bash -x so that they are displayed, and environment variables are set only for the command to be run.<\/p>\n<h3>login.sql<\/h3>\n<pre><code>+ sqlplus -s \/nolog<\/code><\/pre>\n<p>Nothing displayed here. This is what has changed in 12.2 for security reasons the login.sql in the current working directory is not run anymore.<\/p>\n<pre><code>+ sqlplus -s \/nolog @ login.sql<\/code><\/pre>\n<p>This is probably a side effect of the implementation of this new security feature: even when I explicitly want to run the login.sql script it is ignored<\/p>\n<pre><code>+ sqlplus -s \/nolog @ login\nHello from \/tmp\/mytest\/login.sql<\/code><\/pre>\n<p>Here, I rely on the implicit &#8216;.sql&#8217; added and the script is run. Probably the implementation of the security feature is done before this implicit extension.<\/p>\n<pre><code>+ sqlplus -s \/nolog @ \/tmp\/mytest\/login.sql\nHello from \/tmp\/mytest\/login.sql<\/code><\/pre>\n<p>With full path, the script is run.<\/p>\n<p>Actually, the only way to get the current directory login.sql run implicitly when starting sqlplus or connecting is to set the current directory in ORACLE_PATH:<\/p>\n<pre><code>+ ORACLE_PATH=.\n+ sqlplus -s \/nolog\nHello from \/tmp\/mytest\/login.sql\n<\/code><\/pre>\n<p>Note that this defeats the security feature, in the same way it is not recommended to add &#8216;.&#8217; to your shell PATH. It is better to put only absolute paths in the PATH, with directories where you know nobody can add a trojan script.<\/p>\n<h3>LOGIN.SQL<\/h3>\n<pre><code>+ sqlplus -s \/nolog @ LOGIN.SQL<\/code><\/pre>\n<p>The implementation of this new feature is case insensitive. LOGIN.SQL is ignored even when specified in the command line.<\/p>\n<pre><code>+ sqlplus -s \/nolog @ .\/LOGIN.SQL\nHello from \/tmp\/mytest\/LOGIN.SQL<\/code><\/pre>\n<p>Only when using less or more characters to specify it is is used.<\/p>\n<p>Note that the implicit login.sql is case sensitive on Linux:<\/p>\n<pre><code>+ rm login.sql\n+ ORACLE_PATH=.\n+ sqlplus -s \/nolog\n<\/code><\/pre>\n<p>Even with ORACLE_PATH it is not found.<\/p>\n<h3>SQLPATH<\/h3>\n<pre><code>+ SQLPATH=\/tmp\/mytest\n+ sqlplus -s \/nolog<\/code><\/pre>\n<p>SQLPATH is not a solution to find login.sql unlike ORACLE_PATH<\/p>\n<p>Note that the documentation tells very different things in <a href=\"http:\/\/docs.oracle.com\/database\/122\/SQPUG\/configuring-SQL-Plus.htm#SQPUG012\">http:\/\/docs.oracle.com\/database\/122\/SQPUG\/configuring-SQL-Plus.htm#SQPUG012<\/a><\/p>\n<p>Update 28-AUG-17 &#8211; see Edward Rusu about the bug and patch.<\/p>\n<h3>script.sql<\/h3>\n<p>Now, because SQLPATH and ORACLE_PATH was already a mess, I&#8217;ll try with a script that is not login.sql<\/p>\n<pre><code>+ sqlplus -s \/nolog @ script.sql\nHello from \/tmp\/mytest\/script.sql<\/code><\/pre>\n<p>Current directory is still searched for non-login scripts<\/p>\n<pre><code>+ sqlplus -s \/nolog @ \/tmp\/mytest\/script.sql\nHello from \/tmp\/mytest\/script.sql<\/code><\/pre>\n<p>Absolute path can be used, or we can sete a PATH to search:<\/p>\n<pre><code>+ SQLPATH=\/tmp\/mytest\n+ sqlplus -s \/nolog @ script\nHello from \/tmp\/mytest\/script.sql\n<\/code><\/pre>\n<p>Unlike login.sql, SQLPATH can be used to find a script in another directory<\/p>\n<pre><code>+ cd \/tmp\/mytest\/a\n+ SQLPATH=\/tmp\/mytest\n+ sqlplus -s \/nolog @ script\nHello from \/tmp\/mytest\/a\/script.sql<\/code><\/pre>\n<p>But current directory is still the first one that is searched<\/p>\n<pre><code>+ rm script.sql\n+ SQLPATH=\/tmp\/mytest\n+ sqlplus -s \/nolog @ script\nHello from \/tmp\/mytest\/script.sql<\/code><\/pre>\n<p>Only when the script is not in the current directory it is searched in SQLPATH<\/p>\n<pre><code>+ rm \/tmp\/mytest\/script.sql\n+ SQLPATH=\/tmp\/mytest\n+ sqlplus -s \/nolog @ script\nSP2-0310: unable to open file \"script.sql\"\n<\/code><\/pre>\n<p>Again, the documentation is wrong. Only specified directories are looked-up, not sub-directories. But if I specify the subdirectory relative to SQLPATH (I am still in \/tmp\/mytest\/a where there is no script.sql)<\/p>\n<pre><code>+ SQLPATH=\/tmp\/mytest\n+ sqlplus -s \/nolog @ b\/script\nHello from \/tmp\/mytest\/b\/script.sql<\/code><\/pre>\n<p>The b\/script was resolved from the SQLPATH=\/tmp\/mytest<\/p>\n<p>In SQLPATH, we can add multiple paths<\/p>\n<pre><code>+ SQLPATH=\/tmp\/mytest:\/tmp\/mytest\/a:\/tmp\/mytest\/b\n+ sqlplus -s \/nolog @ script\nHello from \/tmp\/mytest\/b\/script.sql<\/code><\/pre>\n<p>Here I have a script.sql only in the &#8216;b&#8217; sub-directory and sqlplus finds it when this directory is listed in SQLPATH<\/p>\n<h3>ORACLE_PATH<\/h3>\n<p>Running the same with ORACLE_PATH instead of SQLPATH<\/p>\n<pre><code>+ ORACLE_PATH=\/tmp\/mytest:\/tmp\/mytest\/a:\/tmp\/mytest\/b\n+ sqlplus -s \/nolog @ script\nHello from \/tmp\/mytest\/a\/login.sql\nHello from \/tmp\/mytest\/b\/script.sql<\/code><\/pre>\n<p>We can have also multiple paths for ORACLE_PATH (this is not in the documentation) and it acts as with SQLPATH but there are a few differences.<\/p>\n<p>First, you have seen that the login.sql script is run.<\/p>\n<p>Then, if I have the script in my current directory, but not in ORACLE_PATH<\/p>\n<pre><code>+ cd \/tmp\n+ echo 'prompt Hello from \/tmp' &gt; script.sql\n+ ORACLE_PATH=\/tmp\/mytest:\/tmp\/mytest\/a:\/tmp\/mytest\/b\n+ sqlplus -s \/nolog @ script\nHello from \/tmp\/mytest\/a\/login.sql\nHello from \/tmp\/mytest\/b\/script.sql<\/code><\/pre>\n<p>The ORACLE_PATH one is used first<\/p>\n<pre><code>+ ORACLE_PATH=\/tmp\/mytest:\/tmp\/mytest\/a\n+ sqlplus -s \/nolog @ script\nHello from \/tmp\/mytest\/a\/login.sql\nHello from \/tmp<\/code><\/pre>\n<p>The current directory is considered only when not found in ORACLE_PATH.<\/p>\n<pre><code>+ ORACLE_PATH=\/tmp\/mytest:\/tmp\/mytest\/a\n+ sqlplus -s \/nolog @ b\/script\nHello from \/tmp\/mytest\/a\/login.sql\nHello from \/tmp\/mytest\/b\/script.sql<\/code><\/pre>\n<p>As with SQLPATH, subdirectory is accessible if mentioned.<\/p>\n<h3>Both, in order<\/h3>\n<p>If you don&#8217;t want to keep it simple, you can specify both ORACLE_PATH and SQLPATH<\/p>\n<pre><code>+ cd mytest\n+ ORACLE_PATH=\/tmp\n+ SQLPATH=\/tmp\/mytest\/b\n+ sqlplus -s \/nolog @ script\nHello from \/tmp<\/code><\/pre>\n<p>and ORACLE_PATH is read first. So the order is:<\/p>\n<ol>\n<li>ORACLE_PATH, in order of paths specified<\/li>\n<li>Current directory (except for login.sq)<\/li>\n<li>SQLPATH (except for login.sql) in order of paths specified<\/li>\n<\/ol>\n<h3>strace<\/h3>\n<p>Better than documentation or testing all combinations, in Linux we can trace the system calls when sqlplus is looking for the script.<\/p>\n<p>I&#8217;ve set non-existing paths \/ORACLE_PATH1 and \/ORACLE_PATH2 for ORACLE_PATH, and \/SQLPATH1 and \/SQLPATH2 for SQLPATH and run &#8216;script&#8217; without the extension<\/p>\n<pre><code>ORACLE_PATH=\/ORACLE_PATH1:\/ORACLE_PATH2 SQLPATH=\/SQLPATH1:\/SQLPATH2 strace -e trace=file sqlplus -s \/nolog @ script<\/code><\/pre>\n<p>This traces all system calls with a file name:<\/p>\n<pre><code>\naccess(\"\/ORACLE_PATH1\/script\", F_OK)    = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH2\/script\", F_OK)    = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH1\/script.sql\", F_OK) = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH2\/script.sql\", F_OK) = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH1\/script\", F_OK)    = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH2\/script\", F_OK)    = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH1\/script.sql\", F_OK) = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH2\/script.sql\", F_OK) = -1 ENOENT (No such file or directory)\nstat(\"script.sql\", 0x7fff01921400)      = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH1\/script\", F_OK)    = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH2\/script\", F_OK)    = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH1\/script.sql\", F_OK) = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH2\/script.sql\", F_OK) = -1 ENOENT (No such file or directory)\nstat(\"\/SQLPATH1\/script.sql\", 0x7fff0191b430) = -1 ENOENT (No such file or directory)\nstat(\"\/SQLPATH2\/script.sql\", 0x7fff0191b430) = -1 ENOENT (No such file or directory)\nSP2-0310: unable to open file \"script.sql\"\naccess(\"\/ORACLE_PATH1\/login.sql\", F_OK) = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH2\/login.sql\", F_OK) = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH1\/login.sql\", F_OK) = -1 ENOENT (No such file or directory)\naccess(\"\/ORACLE_PATH2\/login.sql\", F_OK) = -1 ENOENT (No such file or directory)\nstat(\"\/u01\/app\/oracle\/product\/12.2.0\/dbhome_1\/sqlplus\/admin\/glogin.sql\", {st_mode=S_IFREG|0644, st_size=342, ...}) = 0\naccess(\"\/u01\/app\/oracle\/product\/12.2.0\/dbhome_1\/sqlplus\/admin\/glogin.sql\", F_OK) = 0\nstatfs(\"\/u01\/app\/oracle\/product\/12.2.0\/dbhome_1\/sqlplus\/admin\/glogin.sql\", {f_type=\"EXT2_SUPER_MAGIC\", f_bsize=4096, f_blocks=6676009, f_bfree=2866104, f_bavail=2521221, f_files=1703936, f_ffree=1663469, f_fsid={-1731931108, 1057261682}, f_namelen=255, f_frsize=4096}) = 0\nopen(\"\/u01\/app\/oracle\/product\/12.2.0\/dbhome_1\/sqlplus\/admin\/glogin.sql\", O_RDONLY) = 9\n<\/code><\/pre>\n<p>This is very interesting. First, we see that the paths are searched multiple time, and I don&#8217;t know why. Second, when passing a name without extension (i.e without dot in the name) the exact name is used first for ORACLE_PATH, but lookup in the current directory and in SQLPATH automatically adds &#8216;.sql&#8217;. The system calls are also different: ORACLE_PATH has no stat() call before access(), which is different with current directory and SQLPATH. Finally, login.sql is read from ORACLE_PATH only and glogin.sql from ORACLE_HOME\/sqlplus\/admin.<\/p>\n<h3>Change occurred between 12.2.0.1 and 12.2.0.1<\/h3>\n<p>As a comparison, sqlplus 12.1.0.2 and even 12.2.0.1 DBaaS version (built in October) has the following additional calls to look for login.sql in current path and in SQLPATH:<\/p>\n<pre><code>stat(\"login.sql\", 0x7fffc14d5490)       = -1 ENOENT (No such file or directory)\nstat(\"\/SQLPATH1\/login.sql\", 0x7fffc14cf4c0) = -1 ENOENT (No such file or directory)\nstat(\"\/SQLPATH2\/login.sql\", 0x7fffc14cf4c0) = -1 ENOENT (No such file or directory)<\/code><\/pre>\n<p>This has disappeared in 12.2.0.1 on-premises version (build in January).<\/p>\n<h3>So what?<\/h3>\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">WTF login.sql is not run, even when explicitly started<br \/>Except when mentioning it as &#39;login&#39; or as &#39;.\/login.sql&#39; <a href=\"https:\/\/t.co\/ClfvAUizO6\">pic.twitter.com\/ClfvAUizO6<\/a><\/p>\n<p>&mdash; Franck Pachot (@FranckPachot) <a href=\"https:\/\/twitter.com\/FranckPachot\/status\/839116931428925440?ref_src=twsrc%5Etfw\">March 7, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>Big thanks to the SQL Developer team who gave me the solution approximately 3 seconds after my tweet.<\/p>\n<p>This behavior changed and, as far as I know, is not documented and the MOS note about it is not published. It makes sense, for security reason, to prevent running scripts in the current directory without explicitly allowing it. However, login.sql is often used for formatting only. It seems that SQLcl will implement this in a finer way, running only the formatting commands when it comes implicitly.<\/p>\n<p>Be careful when moving to\/from the Oracle Cloud and your premises because you don&#8217;t run exactly the same version&#8230;<\/p>\n<h3>Update 8th March, 2017<\/h3>\n<p>The MOS note has been published today: <a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocContentDisplay?id=2241021.1\">https:\/\/support.oracle.com\/epmos\/faces\/DocContentDisplay?id=2241021.1<\/a> and mentions that this behavior can come in earlier releases through PSU.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . If you use a login.sql script to set the SQL*Plus environment from your current working directory, you will see that it will not run anymore in 12.2. This is a security feature, and a good occasion to explain how sqlplus finds the scripts to run, on Linux.<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[59],"tags":[1048,209,985],"type_dbi":[],"class_list":["post-9842","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-login-sql","tag-oracle-12c","tag-sqlplus"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Oracle 12cR2: changes for login.sql - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle 12cR2: changes for login.sql\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . If you use a login.sql script to set the SQL*Plus environment from your current working directory, you will see that it will not run anymore in 12.2. This is a security feature, and a good occasion to explain how sqlplus finds the scripts to run, on Linux.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-07T20:58:17+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Oracle 12cR2: changes for login.sql\",\"datePublished\":\"2017-03-07T20:58:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/\"},\"wordCount\":997,\"commentCount\":0,\"keywords\":[\"login.sql\",\"Oracle 12c\",\"sqlplus\"],\"articleSection\":[\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/\",\"name\":\"Oracle 12cR2: changes for login.sql - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2017-03-07T20:58:17+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-changes-for-login-sql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle 12cR2: changes for login.sql\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/oracle-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Oracle 12cR2: changes for login.sql - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/","og_locale":"en_US","og_type":"article","og_title":"Oracle 12cR2: changes for login.sql","og_description":"By Franck Pachot . If you use a login.sql script to set the SQL*Plus environment from your current working directory, you will see that it will not run anymore in 12.2. This is a security feature, and a good occasion to explain how sqlplus finds the scripts to run, on Linux.","og_url":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/","og_site_name":"dbi Blog","article_published_time":"2017-03-07T20:58:17+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Oracle 12cR2: changes for login.sql","datePublished":"2017-03-07T20:58:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/"},"wordCount":997,"commentCount":0,"keywords":["login.sql","Oracle 12c","sqlplus"],"articleSection":["Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/","url":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/","name":"Oracle 12cR2: changes for login.sql - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2017-03-07T20:58:17+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-changes-for-login-sql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Oracle 12cR2: changes for login.sql"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=9842"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9842\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=9842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=9842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=9842"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=9842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}