Asking questions, following them up

November 8, 2016

Hello Guys

Not all situations, however for certain interesting cases, I spend loads of time out of my professional and personal life to nail down the concerns, situations you highlight through the comments and I feel neglected and insulted when YOU don’t respond to my queries on timely manner. No, it doesn’t mean I am not going to respond to your specific questions, however I may not follow up the progresses you have made unless I see a keen involvement.

Further, many instances I contact you through the emails provided with your comments and other than 1-2 instances, I have never received replies. I send you emails to insure that your private information are not being visible through the comments area. Hence, please make sure that you will be using regularly used email accounts while commenting or asking questions.

Please follow the below guidelines if you are keen about getting answered

  • Provide me an email address that you are frequently checking
  • Regularly check for the comment replies (You get a notification on email when I reply to your comment)

If I am not supported by YOU as the initiator, please be informed that, I do have better things to do :)

Sorry for the “Attitude”, however, that is going to save me some precious time!

regards,

 

 


Posting Code Blocks with your free WordPress Blog

February 27, 2015

Please visit https://en.support.wordpress.com/code/posting-source-code/ for detailed information about how to post source code blocks with your free wordpress.com blog.
A tip from me: Have a look at the source code of wordpress support page opened ;) you “MAY” get more ideas. Okay I didn’t say that!
Let us look at some samples:

1

Will produce the below, syntax highlighted code block for you

your code here

2

Refer the above image, the usage of additional tags within the code tag will syntax highlight a short VB script, avoiding the gutter (line numbers)

Public Class Form1
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim xmlFile As XmlReader
        xmlFile = XmlReader.Create("MyVMS.xml", New XmlReaderSettings())
        Dim ds As New DataSet
        ds.ReadXml(xmlFile)
        DataGridView1.DataSource = ds.Tables(0)
        DataGridView1.Columns(0).HeaderText = "Id"
        DataGridView1.Columns(1).HeaderText = "VM Name"
        DataGridView1.Columns(2).HeaderText = "Shutoff Mode"
  
    End Sub
End Class

Avoid leaving spaces between tags inside “code” tag, as doing so could totally mess-up the code blocks. Just put everything tightly spaced like following

language=”VB” gutter=”false”, there are no spaces between language & = or = & the opening ”

The language (or lang) parameter controls how the code is syntax highlighted. The following languages are supported:

  • actionscript3
  • bash
  • clojure
  • coldfusion
  • cpp
  • csharp
  • css
  • delphi
  • erlang
  • fsharp
  • diff
  • groovy
  • html
  • javascript
  • java
  • javafx
  • matlab (keywords only)
  • objc
  • perl
  • php
  • text
  • powershell
  • python
  • r
  • ruby
  • scala
  • sql
  • vb
  • xml

If the language parameter is not set, it will default to “text” (no syntax highlighting).

Code in between the source code tags will automatically be encoded for display, you don’t need to worry about HTML entities or anything.

Configuration Parameters

The shortcodes also accept a variety of configuration parameters that you may use to customize the output. All are completely optional.

  • autolinks (true/false) — Makes all URLs in your posted code clickable. Defaults to true.
  • collapse (true/false) — If true, the code box will be collapsed when the page loads, requiring the visitor to click to expand it. Good for large code posts. Defaults to false.
  • firstline (number) — Use this to change what number the line numbering starts at. It defaults to 1.
  • gutter (true/false) — If false, the line numbering on the left side will be hidden. Defaults to true.
  • highlight (comma-seperated list of numbers) — You can list the line numbers you want to be highlighted. For example “4,7,19”.
  • htmlscript (true/false) — If true, any HTML/XML in your code will be highlighted. This is useful when you are mixing code into HTML, such as PHP inside of HTML. Defaults to false and will only work with certain code languages.
  • light (true/false) — If true, the gutter (line numbering) and toolbar (see below) will be hidden. This is helpful when posting only one or two lines of code. Defaults to false.
  • padlinenumbers (true/false/integer) — Allows you to control the line number padding. true will result in automatic padding, false will result in no padding, and entering a number will force a specific amount of padding.
  • title (string) — Set a label for your code block. Can be useful when combined with the collapse parameter.

regards,

rajesh


Windows7bugs | Script Copying Instructions

November 9, 2014

Hello guys

Once in a while we receive complaints about scripts copied from our blog causing issues. We regret those issues and apologizing to everyone who suffered due to. Our blog is totally free until date and unfortunately, different browsers behave differently while parsing the code tags.

We were using

 [ code ] [ /code ]

tag for long time, found that few scripts getting totally messed up with double quotes being showsn and &quote etc. This has forced us to start using

[ sourcecode ] [ /sourcecode ] 

and realized if we have more than one block of scripts, the 2nd and consecutive scripts blocks being totally garbled.

With reference to above said, we request you to kindly make sure that the scripts those you copy from our posts are thoroughly checked for special characters prior applied. Especially registry related scripts as such attempts could completely wreck your Windows registry databases.

We hope you read us clearly and continue supporting us.

Regards,


How to install Samba server on CentOS 6

June 16, 2017

Lazy Geek -:)

Part 1: Configuring anonymous share with samba server

To install the samba package,enter the following command:

sudo yum install samba samba-client samba-common

Check the version of installed samba software by using this command:

smbd --version

Configure the samba service, so that, it will start automatically at boot time:

sudo chkconfig smb onsudo chkconfig nmb on

Disable the SELinux:

sudo nano /etc/selinux/config

Change SELinux from enforcing to disabled:

SELINUX=disabled

Add these Iptables rules, so that samba will work perfectly:

sudo iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPTsudo iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPTsudo iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPTsudo service iptables save

Restart the Server!!!

Go to your Windows machine and use this command in order to check the WORKGROUP…

View original post 355 more words


Oracle: Create PFILE from SPFILE

June 6, 2017

Logbuffer-Blog

I just ran into an error while trying to bounce a long running Oracle-DB:

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-16032: parameter LOG_ARCHIVE_DEST destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
SVR4 Error: 2: No such file or directory

So there must be something wrong with that LOG_ARCHIVE_DEST. But where the heck is it pointing to?!

To get a parameterfile (PFILE), which is human readable as it’s in plain ASCII, one can use “CREATE PFILE FROM SPFILE” in sqlplus. That command will result in a pfile in $ORACLE_HOME/dbs where also the spfile resides. Until now I thought that I had to bring the instance into NOMOUNT-state with “STARTUP NOMOUNT” for beeing able to execute the given command, because the SPFILE is read just then. But…

SQL> startup nomount ORA-16032: parameter LOG_ARCHIVE_DEST destination string cannot be translated ORA-07286: sksagdi:…

View original post 433 more words


Oracle Backup to Google Drive?

June 6, 2017

Hi guys

This is a follow up post to my previous post about using a simple batch script for creating a dump export file on regular basis for Oracle database.

Backup. The most essential, however many times highly ignored element of the digital world even today as many small scale industries find the investments made to this particular mechanism hardly comes in effect, unless a disaster arises. My personal experiences with convincing the management to go for sophisticated backup solutions were always the toughest, until we had a HUGE disaster.

As a thumb rule, the first thing I always did for an Oracle database was to setup a dump export every night (if the database is truly small in size), after the normal working hours, in addition to RMAN backups. These export files are kept in a different partition & regularly monitored and purged by the beginning of a new month, keeping the last day backup for the previous month, which is deleted by the beginning of a new year.

Keeping the backup in the same hardware could prove fatal when the hardware fails, and almost all the servers are configured to use RAID, using different levels. In such scenarios even if the drives are intact, retrieving the data from raided volumes will be a professional job, costing investment and time.

For small databases, like the one I have mentioned with my previous post we can design multiple options like mapping a network folder & copying the files automatically once after a new dump file is created as the part of a backup script.

I have devised two methods for my party, and they were

  1. FTP the compressed latest dump file to another machine hosting FTP server
  2. Using google drive (Free 15GB), upload the latest compressed dump file

The first method was already explained here so I will go to 2nd method in which Google drive sync is used to insure that the party has a valid backup stored somewhere in the cloud

  • Database dump export size: 300MB approximately
  • Zipped dump file size: 50MB approximately

Install google drive on your Windows 2008 x, Windows 2012 server machine. You may need to install corresponding Visual C++ Redistributable packages in order to come across python related errors. Please read more here for solutions.

Once the google drive starts working fine, you can use the following script, which will create a dump file first, then create a zip file against the latest dump file created and then copy the zip file to google drive for cloud synching.

Please note, I have moved the google drive folder from the default location to somewhere else, like E:\Google_Drive to make sure that my batch file has shortest path entry for the copying. If you plan the same, you can change the default location for google drive by exiting the application first, then pointing google drive to your folder of choice when google drive complains about missing default location

Windows batch file for Creating, zipping & copying the files to Google Drive

@echo off
FOR /F "tokens=2-4 delims=/ " %%a IN ('date/t') DO exp system/password@connectionstring full = y file=d:\Orabackup\exp_%%b%%a%%c.dmp 

SETLOCAL
::Get the latest dump file name, generated using exp command
::Switch to the folder where the dump (.dmp) files are stored
CD D:\Orabackup\
:: D:\Orabackup is the folder where everyday dump files are stored.
for /f "tokens=*" %%a in ('dir *.dmp /o:-d /b') do set NEWEST=%%a&& goto :next
:next
REM echo The most recently created file is %NEWEST%
::http://stackoverflow.com/questions/15567809/batch-extract-path-and-filename-from-a-variable
FOR %%i IN ("%NEWEST%") DO (
REM ECHO filedrive=%%~di
REM ECHO filepath=%%~pi
SET ZIPNAME=%%~ni
REM ECHO fileextension=%%~xi
)

SET ZIPNAME=%ZIPNAME%.zip
::You can use built-in zip or 7-Zip to create archives
zip %ZIPNAME% %NEWEST%
::E:\Google_Drive is the folder used by the google drive in my setup
COPY %ZIPNAME% E:\Google_Drive

del %ZIPNAME%

::Exit

While this method looks pretty awesome for small size databases, please be noted that, may not be at all feasible for larger ones. I will OPT this method for a backup dump file that could be compressed to a size of 400-500MB maximum, including the possibilities of corrupt compressed files.

Whatever, as far the party has a reliable internet connection with decent bandwidth, based on the size of compressed file, will always have access to a recent backup dump file, stored free in the cloud!

Does it look decent? ;)

Tip: Running Google drive sync as Windows Service

regards,

rajesh


Oracle database 11g on Windows 2008 R2 & later | ORA-12518 error

June 6, 2017

Hi guys

Recently I was approached by a party to migrate their 14+ years old mini ERP system that is client/server architecture to a new hardware. This legacy application has such a small footprint that, the export dump was hardly reaching 300Mbs in size after a full database export.

Scenario

  1. OS: Windows 2003 SP3, 32-Bit
  2. Oracle Database: 10g Release 1
  3. Client side, Developer 6i with Patch 18
  4. Clients using Windows 7, 64-Bit with DLL hacks for running forms/reports based application

Requirement(s)

  1. Database upgrade to 11g R2 64-Bit, in order to maximize the performance and properly utilize the new hardware (HP DL380 g9 with 32GB memory and more than 1TB storage)

We’ve initiated the migration by testing all possible scenarios using ORACLE VirtualBox. Created a VM for Windows 2008 R2 server, Created both Windows 10 & Windows 7 SP1 VMs for client side testing. After thorough checking to insure that there were no technical errors, decided to move the solution to physical server. Throughout the testing using VMs we never changed any database parameters (not even CASE SENSITIVE logon), yet all clients were happily connecting and executing forms and reports as expected.

The following were performed on the physical server after installing & updating Windows Server 2008 R2

  1. Installed Developer Suite 6i
  2. Installed Oracle Database 11g r2 (11.2.0.4), accommodating 40% the physical memory and set the memory management as automatic.
  3. Configured RMAN
  4. Imported specific users from the latest export dump

We tried to start the application from one of the clients and the application started & the queries were executed at lightning speed. Client exit from the application and tried to restart, hitting Oracle not found error!

All of a sudden from the smirks, panic took over all the parties involved. We shutdown the services, restarted. Client gets connected, and 2nd attempt returns the same error  ‘Oracle not found’

Again the client connects and trying to run the reports prompts them a popup windows asking for logon to database.

After cross checking between VMs and Physical server, we confirm that both the scenarios share the same database and client settings (totally missing the PROCESSES parameter). Yet the physical scenario was continuously falling victim to Oracle not found error

A quick googling brought to me a blog page that asked to check the number of processes parameter set in the database instance, which was 150 by default in our case. I have cross checked with the VM instance and found the value to be 200. I have to redo the exercises to figure out whether I have changed the parameter after creating the database using DBCA.

Next I ran the following SQL as root to figure out the max processes count registered by the database

select resource_name, current_utilization, max_utilization from v$resource_
limit where resource_name in (‘processes’,’sessions’);

which returned me the following:

RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION
—————————— ——————- —————

processes                                       47             175

sessions                                        54             173

Obviously, the max_utilization has crossed the default value of 150 processes & I changed the parameter with 450 using alter system command.

Alter system set processes=450 scope=spfile;

After altering the system, a shutdown immediate followed by startup has fixed nightmare.

Further readings has given me a fairly good idea that 11g R2 has not the above said issues related to number of processes, many other related to network stack.

So, if you are planning to setup 11g to work with Developer 6i, which is not certified as a combination by Oracle, be prepared to bite the silver bullet(S)

regards,

rajesh


ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

June 5, 2017

Hi guys

I’m back to blogging after couple of busy weeks and quite bit of traveling. I’m currently playing around with Oracle 12c database Release 2 & Developer 6i with Patch 18, again hacked using Patch 3 DLL files in order to execute forms/reports on Windows7-10

Obvious that, starting from Oracle 11g, Oracle has introduced stricter password policies by implementing case sensitive logons, number of attempts and password age etc. I hardly believe small industries are really ever going to implement these policies as Oracle intended to in real life scenarios as it would require a full time DBA, a lot of tracking and auditing (which in my experience never happens)

Anyway, for testing, I have always kept the commands ready to disable said all three security elements. Once a new test database is made, prior attempting any other, I change password complexity, expiry & reuse times using the below given alter commands

  • alter system set sec_case_sensitive_logon=false scope=both;
  • alter profile DEFAULT limit PASSWORD_REUSE_TIME unlimited;
  • alter profile DEFAULT limit PASSWORD_LIFE_TIME  unlimited;

With 12c Oracle has made many changes to the security, SQL Net connections etc. If you are truly interested, please refer this document to understand what has been deprecated Upgrade Guide 12c Release 1 (12.1) E41397-11

According to the documentation, SEC_CASE_SENSITIVE_LOGON is maintained only for backward compatibility & most probably will be dropped from future builds. I’ve checked altering sec_case_sensitive_logon on a 12c R2 database it works. However, during each startup, I receive a notification that says “ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance”

image

and executing the following command returns a number of parameters those are not supposed to be used against 12c release Winking smile


SELECT name from v$parameter WHERE isdeprecated = 'TRUE' ORDER BY name;

and the following will be listed

NAME
——————————————————————————–
O7_DICTIONARY_ACCESSIBILITY
active_instance_count
asm_preferred_read_failure_groups
background_dump_dest
buffer_pool_keep
buffer_pool_recycle
commit_write
cursor_space_for_time
db_block_buffers
fast_start_io_target
instance_groups

NAME
——————————————————————————–
lock_name_space
log_archive_start
parallel_adaptive_multi_user
plsql_debug
plsql_v2_compatibility
rdbms_server_dn
remote_os_authent
resource_manager_cpu_allocation

sec_case_sensitive_logon

serial_reuse
sql_trace

NAME
——————————————————————————–
standby_archive_dest
unified_audit_sga_queue_size
user_dump_dest
utl_file_dir

26 rows selected.

SQL>

So, we could see that sec_case_sensitive_logon has been listed as deprecated. Now, how exactly we are going to work around this little annoyance totally depends upon us, developers & DBAs. While I prefer a test environment with no password related hassles, a production environment should be designed to accommodate case sensitive logons & other recommended password policies as Oracle may not re-introduce the parameter in future builds.

While the notification/warning we receive about deprecated parameters are generic to all deprecated parameters, in this post, I have only mentioned about case sensitive passwords.

regards,

rajesh


Step by Step : Installing & Configuring WSUS in Server 2012 R2

May 16, 2017

Just a random "Microsoft Server / Client Tech" info..

Hi folks,

Today lets go through a step by step on how to installing & configuring WSUS in Windows Server 2012 R2.

But as usual, before we start, let me explain a little bit about WSUS (Windows Server Update Services).

What Is WSUS?

WSUS is a server role included in the Windows Server 2012 R2 OS, and that downloads and distributes updates to Windows clients and servers.

WSUS can obtain updates that are applicable to the OS and common Microsoft applications such as Microsoft Office and Microsoft SQL Server.

In the simplest configuration, a small organization can have a single WSUS server that downloads updates from Microsoft Update.

The WSUS server then distributes the updates to computers that are configured to obtain automatic updates from the WSUS server. You must approve the updates before clients can download them.

For more info about WSUS, please browse to http://technet.microsoft.com/en-us/windowsserver/bb332157.aspx, and for those who will…

View original post 1,206 more words


Oracle 12c database installation | Points to consider

May 7, 2017

Hi guys

Have you noticed the major changes with the installation media of Oracle 12c database release 2? Oracle has made it as a single package, eliminating the user to merge the folders from 2 different installation media to get it done. While I welcome such a move from Oracle with whole heart, once again there are few difficulties getting the software installed properly.

One of the major issues is, when the administrator decides to disable hidden admin shares to secure the box from accessed using C$, D$ calls from a remote machine with domain/local administrative privileges. Disabling the admin shares are handled by tweaking the registry & easily forgotten in the long run. Lack of earlier experiences with installing Oracle software could force one to finally formatting the box to address the registry tweaking for disabling the admin shares.

Few of the errors present are like following:

e2

e1

And the error message reads like following:

Cause – Failed to access the temporary location.  Action – Ensure that the current user has required permissions to access the temporary location.  Additional Information:
– PRVG-1901 : failed to setup CVU remote execution framework directory “C:\Users\username\AppData\Local\Temp\CVU_12.2.0.1.0_username\” on nodes “hostname”  – Cause:  An operation requiring remote execution could not complete because
         the attempt to set up the Cluster Verification Utility remote
         execution framework failed on the indicated nodes at the
         indicated directory location because the CVU remote execution
         framework version did not match the CVU java verification
         framework version. The accompanying message provides detailed
         failure information.  – Action:  Ensure that the directory indicated exists or can be created and
         the user executing the checks has sufficient permission to
         overwrite the contents of this directory. Also review the
         accompanying error messages and respond to them. Summary of the failed nodes hostname- Version of exectask could not be retrieved from node “hostname”  – Cause: Cause Of Problem Not Available  – Action: User Action Not Available  – Version of exectask could not be retrieved from node “hostname”  – Cause: Cause Of Problem Not Available  – Action: User Action Not Available

 

Hence, the 1st place to look for is the registry, precisely, Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters and to make sure that a REG DWORD named “AutoShareWks” exists with a value “0”. If yes, change the value to “1” and restart the box.

2nd, if you have a 32bit Oracle client installed prior attempting to install the 12c/11g 64Bit database, make sure you Stop “OracleRemExecServiceV2” service using the Windows Service console. There is a conflict between the 32Bit & 64Bit installation procedures and unless this particular service is stopped, the 64Bit installation will not proceed.

Now attempt the 12c/11g 64Bit database installation.

If you come across more errors, please update us using the comments section and we would love to investigate them.

regards,

rajesh