Oracle Compile Invalid Object – PLS-00201: identifier ‘DBMS_LOCK’ must be declared

March 29th, 2013 3 comments

Just finished importing a complete oracle database dump with impdp.

Immediately after the import I checked for invalid objects and of course some were present.

In order to get the complete list of schema objects that were invalid I ran the following:

 

Read more…

Categories: Oracle Tags:

Oracle Database Supported Rleases for Linux

March 20th, 2013 Comments off

It usually takes me more than 10 minutes to get to the location of this page through metalink searches or just the search engines.

Now I will know that I have it stashed as a post!

Oracle Linux Supported Releases

Read more…

Categories: Database, Oracle Tags:

Oracle Check Content of Buffer Pool Keep (KEEP CACHE)

November 12th, 2012 Comments off

I tend to need configuration of KEEP_CACHE for static schema objects.
Keep Cache in Oracle is part of the Buffer Pool. Configuring Keep Cache is done with the following command as SYSDBA:

ALTER SYSTEM SET DB_KEEP_CACHE_SIZE=1024M SCOPE=BOTH;

The above will allocate 1GB of SGA Memory to the Keep Cache.

Read more…

Categories: Database, Oracle Tags:

Add Active Directory Users from CSV file

July 9th, 2012 Comments off

A prerequisite for the following is
As a start I have to figure out the command that simply creates the user based on my requirements.
The CSV headers that I have are “FirstName”, “LastName”, “Alias” which I will use for account name and “TempPass” which is a column with randomly generated passwords that the users will initially have to use.

I got the following command working:

new-aduser -samaccountname smithj -Name "John Smith" -GivenName John -Surname Smith -AccountPassword (Convertto-securestring -asplaintext "Bgve1Y24" -force) -changepasswordatlogon $true -Country "US" -DisplayName "John Smith" -Enabled $true

Read more…

Add Domain Name to Hosting on Plesk CLI

June 12th, 2012 Comments off

Hello Dear Readers,
It is the Summer season and I finally have more time to post stuff right after I do it.
Today I had to create a new domain in hosting under Plesk control panel command line and since I never kept notes for the previous times I did it, I had to undergo some documentation reading.
The best resources online are provided by Parallels themselves. It is one of the most well documented APIs that I have come across in the hosting world, have to give them that!
The URL is http://download1.parallels.com/Plesk/PP10/10.1.1/Doc/en-US/online/plesk-unix-cli/index.htm
All I had to do is issue the following two commands in order to create the domain in hosting and then to create a database related to it:

1. Creating a new domain name in Hosting on Plesk CLI

[root@216-55-186-14 bin]# /usr/local/psa/bin/domain --create domainname.me -owner Client1 -ip 216.55.186.14 -status enabled -hosting true -hst_type phys -dns false -login domain_user -passwd temp_pass -shell /bin/bash -cgi false -php true -php_safe_mode true

Read more…

Categories: Linux, Plesk, SSH Tags:

ls xargs rm

June 4th, 2012 2 comments

I keep forgetting the proper xargs arguments when I need them.
My intention today was to list old backup files based on the year time stamp and remove them.
Here is the one liner that works specifically because I have named my backups with the dd-mm-yyyy convention:

[root@webserver1 httpd]# ls -latf|grep 2009|xargs -L 1 rm

Here is a better approach that is independent from the file naming convention:

Read more…

Categories: Linux, SLES, SSH Tags:

PLESK 10 Domain Disabled

January 30th, 2012 4 comments

Yeah, that’s the reason for the domain being disabled for such a long time.
The hosting service for the blog is gently provided by a dear friend of mine however none of us noticed that my subscription for the control panel has expired few days back and this turned the website to the plesk parking page. Anyways we’re back online but let me share a valid experience on enabling domain service through the plesk API.

1. make sure you check the domain status
/usr/local/psa/bin/domain -i soteks.org

From the result of the above check the Domain status and Domain Expiration Date:

Read more…

Categories: Linux Tags: , , , ,

Generate SQL queries from Excel document

October 28th, 2011 1 comment

Hi All,
Long time no see, eh?!
That’s what happens when you start working for utilization targets..
When the business needs some Excel to be processed through a database in a certain manner I tend to save lots of time by generating the SQL queries automatically inside the Excel document.
Example:
You have an Excel document that depicts table structure inside your database. the Excel document contains the latest updated by the business version of some variables that should be updated inside your database. (Here many of you will ask the logical question, who does stuff in such a rigid and obsolete way? And I have nothing to say in my defense)
What I do is to pickup the important columns that form my query and generate in in a free columns on the right hand side.
="update table_name set colum_name_1="&F2&" where column_name_2='"&A2&"' and column_name_3='"&C2&"';"

For F2=5, A2=STRING1, C2=STRING2 the result will be the following:

update table_name set column_name_1=5 where column_name_2='STRING1' and column_name_3='STRING2';

Read more…

Categories: Database, mysql, Oracle Tags:

mysqldump all databases on mysql

February 20th, 2011 2 comments

I was wondering for a few minutes if I can easily backup all databases created by users on a mysql database server. I was trying to automate the process regardless of users creating new databases without my knowledge. I was aware of the convention under which mysql stores the separate databases on the filesystem so I gave it a try.
Fist I tried with few ‘ls’ commands to retrieve the folder names which respectively referred to the database names in the mysql server. On FreeBSD here is the command I used:

[root@bsdbox08 ~]# find /var/db/mysql/ -type d
/var/db/mysql/
/var/db/mysql/mysql
/var/db/mysql/db1
/var/db/mysql/performance_schema
/var/db/mysql/db2

Here I decided not to mysqldump the mysql database and the performance_schema so I changed the command slightly by adding sed and grep to it.

Read more…

Categories: Database, Linux, mysql Tags:

Oracle CTXSYS LEXER issues

January 17th, 2011 Comments off

Hello,

I recently tried to troubleshoot an application issue that was related to a text index. The index itself appeared in valid state but there was obviously some kind of a problem with it.
I started with the following

SQL> connect sys as sysdba
Enter password:
Connected.
SQL> DROP INDEX USER5.INDX71;
Index dropped.
SQL>CREATE INDEX USER5.INDX71 ON USER5.APP_NOTES (DETAIL_TEXT) INDEXTYPE IS CTXSYS.CONTEXT;
REATE INDEX USER5.INDX71 ON USER5.APP_NOTES (DETAIL_TEXT) INDEXTYPE IS CTXSYS.CONTEXT;
*
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
ORA-06512: at “CTXSYS.DRUE”, line 160
ORA-06512: at “CTXSYS.TEXTINDEXMETHODS”, line 364

There was something wrong with the CTXSYS schema and especially with the DEFAULT_LEXER.
I fixed this by reapplying the correct drdefXX.sql script for the database locale.

Read more…

Categories: Database, Oracle Tags: , , ,