For Vmware infrastructure : |
Sunday, 27 December 2009
Vmware : Vsphere Console Desktop Shortcut
Posted by Ook at 04:11 0 comments
Labels: VMWare
Monday, 30 November 2009
Windows : What is the NTFS cluster size ?
* Run chkdsk on the drive - chkdsk C: * Cluster size if third line from bottom eg. 4096 bytes in each allocation unit |
Posted by Ook at 03:22 0 comments
Thursday, 12 November 2009
Excel : Bullets in a cell
|
Posted by Ook at 07:56 0 comments
Saturday, 31 October 2009
ESXI : SSH enable
Nb may need to ps aux |grep inetd (getting the PID) and kill -HUP PID scp works, sftp does not. |
Posted by Ook at 09:16 0 comments
Friday, 30 October 2009
New squeezebox server
* Centos 5.4 * squeezeboxserver-7.4.0-1.rpm wget http://triodeplugins.googlecode.com/files/BBCiPlayer-v0.9f.zip manually install BBCiPlayer plugin - would not work auto into /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ * vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none ONBOOT=yes TYPE=Ethernet NETMASK=255.255.255.0 IPADDR=192.168.69.240 GATEWAY=192.168.69.69 * vi /etc/resolv.conf nameserver 212.23.3.100 nameserver 212.23.6.100 * Add additional vm disk 150Gb fdisk /sdb mkfs.ext3 /sdb1 * vi /etc/fstab /dev/sdb1 /u01 ext3 defaults 0 0 * Copy all music mkdir /local/Music mkdir /local/Playlists * vi /etc/samba/smb.conf workgroup = WORKGROUP [Public] path = /local/Public writeable = yes guest ok = yes [Music] path = /local/Music writeable = no guest ok = yes [Photo] path = /local/Photos writeable = no guest ok = yes * chkconfig --level 2345 smb on * vi /etc/yum.repos.d/dag.repo [dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag gpgcheck=1 enabled=1 * vi /etc/yum.repos.d/rpmforge.repo [rpmforge] name = Red Hat Enterprise $releasever - RPMforge.net - dag mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge enabled = 1 protect = 0 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag gpgcheck = 1 * tar xvfz VMwareTools-4.0.0-171294.tar.gz cd vmware-tools-distrib/ ./vmware-install.pl * libtorrent-0.12.0-1.el5.rf - nb. had to downgrade or no connection rtorrent-0.8.0-1.el5.rf * vi /etc/inittab id:3:initdefault: * Copy photos to /u01 * Install squid Copy squid.conf and allowed-sites * Install dnsmasq Copy dnsmasq.conf Update /etc/hosts * Install lighttpd Copy config Copy proxy.pac and link to /srv/www/lighttpd Link /u01/Photos to /srv/www/lighttpd Available at photo.steampig.co.uk/album |
Posted by Ook at 16:40 0 comments
Labels: Linux
Saturday, 17 October 2009
Vmware squeezecenter - now includes BBC iplayer
* Vmware workstation machine * Install Centos 5.3 dvd - Gnome desktop + server heavily cut down - dhcp, no firewall or selinux * yum install Mysql and mysql server * Setup vmware share for host resource directory * rpm install squeezecenter * Switch to static ip /etc/sysconfig/network - gateway xx.xx.xx.xx /etc/sysconfig/network-scripts/ifcfg-eth0 - BOOTPROTO=static IPADDR=xx.xx.xx.xx NETMASK=255.255.255.0 * Set up static dns /etc/resolv.conf - nameserver xx.xx.xx.xx * Setup vmware share for host music directory - ln -s from /dev/hgfs directory * Squeezecenter config - music dir, playlist dir, add iplayer and lazysearch2 plugins, disable unwanted plugins * Test with softsqueeze * Re-point squeezeboxes and customise menus - also set alarm * Increase internet radio buffer to 10 seconds Squeezecenter-Settings-Advanced-Network-Radio Station Buffer Seconds "F:\Program Files\VMware\VMware Workstation\vmware.exe" -x "G:\Iggy (Centos 5.3)\Iggy (Centos 5.3).vmx" |
Posted by Ook at 03:39 0 comments
Friday, 9 October 2009
Oracle : SQL Developer Data Modeller
Pros
|
Posted by Ook at 01:48 0 comments
Tuesday, 6 October 2009
SQL Server : Non-standard ports
When you connect to a server using a default instance configuration (e.g. "myserver"), the SQL client calls the server on the standard port: 1433. When you call a server using a named instance but lacking a port (e.g. "myserver\instancename"), the SQL client calls SQL Server's management service on port 1434. The management service replies with a dynamically assigned port (chosen at sql engine service startup) for the instance and the client connection proceeds using that new port. If the network firewall doesn't have either the management service port nor the dynamic port(s) open the connections fail. Using dynamic ports for SQL instances means that the instance names are like a SQL DNS system. They are simply there to help the server resolve a dynamic port. Once the port is resolved, the name is superfluous. You can use additional, and thus non-standard, ports for the additional SQL instances so as to know the ports so the firewall could be configured to allow them. Once you have a predefined port assigned to a named instance you no longer need the actual instance name for the connection but can simply connect using the server name (or IP) and port number, for example: "myserver,1432". Also you no longer need to run the SQL browser service on the server that provides the instance name lookup. |
Posted by Ook at 09:23 0 comments
Friday, 11 September 2009
Linux : add additonal disk as a logical volume
# Add new disk as a logical volume # Create partition fdisk -l fdisk /dev/sdb n-1-rtn-rtn # Create a physical volume pvcreate /dev/sdb1 pvdisplay # Create a virtual group VolGroup01 vgcreate VolGroup01 /dev/sdb1 # Get PE size from vgdisplay vgdisplay Total PE 4094 # Create a logical volume lvcreate -n vol01 -l 4094 VolGroup01 lvdisplay mkfs.ext3 /dev/VolGroup01/vol01 # Add to fstab vi /etc/fstab /dev/VolGroup01/vol01 /u01 ext3 defaults 0 0 mount /u01 |
Posted by Ook at 07:11 0 comments
Labels: Linux
Thursday, 10 September 2009
BOXI : Restore to point in time with oracle
|
Posted by Ook at 09:43 0 comments
Labels: Oracle
Oracle : Refresh the dataguard instance and re-enable
shudown immediate
Note
|
Posted by Ook at 09:41 0 comments
Labels: Oracle
Wednesday, 9 September 2009
Oracle : 11GR2 - File Watchers
Trigger scheduler jobs when a glob-matched file is created in a directory |
Posted by Ook at 06:27 0 comments
Labels: Oracle
Oracle : 11GR2 - IGNORE_ROW_ON_DUPKEY_INDEX Hint
Silently ignore new rows that violate a single unique index.
Bulk operations? Multiple rows with same UK being inserted - which get in - arbitrary ? |
Posted by Ook at 04:20 0 comments
Labels: Oracle
Oracle : 11GR2 - Recursive subqueries for hierarchy traversal
Recursive Subquery Example =========================== WITH reports_to_101 (eid, emp_last, mgr_id, reportLevel) AS ( SELECT employee_id, last_name, manager_id, 0 reportLevel FROM employees WHERE employee_id = 101 UNION ALL SELECT e.employee_id, e.last_name, e.manager_id, reportLevel+1 FROM reports_to_101 r /* MAGIC IS HERE */ ,employees e WHERE r.eid = e.manager_id ) SELECT eid, emp_last, mgr_id, reportLevel FROM reports_to_101 ORDER BY reportLevel, eid; EID EMP_LAST MGR_ID REPORTLEVEL ---------- ------------------------- ---------- ----------- 101 Kochhar 100 0 108 Greenberg 101 1 200 Whalen 101 1 203 Mavris 101 1 204 Baer 101 1 205 Higgins 101 1 109 Faviet 108 2 110 Chen 108 2 111 Sciarra 108 2 112 Urman 108 2 113 Popp 108 2 206 Gietz 205 2 Ref |
Posted by Ook at 04:11 0 comments
Labels: Oracle
Oracle : 11GR2 - LISTAGG - the long missing string concatentation built-in
Finally LISTAGG Example =============== SELECT department_id "Dept.", LISTAGG(last_name, '; ') WITHIN GROUP (ORDER BY hire_date) "Employees" FROM employees GROUP BY department_id; Dept. Employees ------ ------------------------------------------------------------ 10 Whalen 20 Hartstein; Fay 30 Raphaely; Khoo; Tobias; Baida; Himuro; Colmenares 40 Mavris 50 Kaufling; Ladwig; Rajs; Sarchand; Bell; Mallin; Weiss; Davie s; Marlow; Bull; Everett; Fripp; Chung; Nayer; Dilly; Bissot ; Vollman; Stiles; Atkinson; Taylor; Seo; Fleaur; Matos; Pat el; Walsh; Feeney; Dellinger; McCain; Vargas; Gates; Rogers; Mikkilineni; Landry; Cabrio; Jones; Olson; OConnell; Sulliv an; Mourgos; Gee; Perkins; Grant; Geoni; Philtanker; Markle 60 Austin; Pataballa; Lorentz; Ernst; Hunold 70 Baer
with base_data as ( Ref |
Posted by Ook at 04:09 0 comments
Labels: Oracle
Oracle : 11GR2 - Selected new features
Drawn from the 11GR2 New features doc Definitely Interesting 1.2.2.4 IGNORE_ROW_ON_DUPKEY_INDEX Hint for INSERT Statement 1.3.1.1 Analytic Functions 2.0 1.3.1.2 Recursive WITH Clause 1.3.2.2 Preprocessing Data for ORACLE_LOADER Access Driver in External Tables 1.5.2.1 E-mail Notification 1.5.2.2 File Watcher 1.5.2.4 Remote Database Jobs 1.5.3.1 Data Pump Legacy Mode Possibly Interesting 1.2.3.2 Configurable Real-Time Query Apply Lag Limit 1.9.2.3 Automatic Patching of Time Stamp With Time Zone Data 1.3.4.2 Minimal Effort Parallel Execution - Auto Degree of Parallelism (DOP) and Queuing 1.9.2.10 Enable Sampling for Active Data Guard 1.9.2.12 Global Oracle RAC ASH Report + ADDM Backwards Compatibility RAC - Possibly Interesting 1.4.1.6 Grid Plug and Play (GPnP) 1.4.1.7 Oracle Restart 1.4.1.10 Role-Separated Management 1.4.1.13 Enterprise Manager-Based Clusterware Resource Management 1.4.1.14 Enterprise Manager Provisioning for Oracle Clusterware and Oracle Real Application Clusters 1.4.1.17 Configuration Assistant Support for Removing Oracle RAC Installations 1.4.1.18 Oracle Universal Installer Support for Removing Oracle RAC Installations 1.4.1.22 Out-of-Place Oracle Clusterware Upgrade 1.4.1.26 SRVCTL Support for Single-Instance Database in a Cluster Definitely Interesting 1.2.2.4 IGNORE_ROW_ON_DUPKEY_INDEX Hint for INSERT Statement With INSERT INTO TARGET...SELECT...FROM SOURCE, a unique key for some to-be-inserted rows may collide with existing rows. The IGNORE_ROW_ON_DUPKEY_INDEX allows the collisions to be silently ignored and the non-colliding rows to be inserted. A PL/SQL program could achieve the same effect by first selecting the source rows and by then inserting them one-by-one into the target in a block that has a null handler for the DUP_VAL_ON_INDEX exception. However, the PL/SQL approach would take effort to program and is much slower than the single SQL statement that this hint allows. This hint improves performance and ease-of-programming when implementing an online application upgrade script using edition-based redefinition. 1.3.1.1 Analytic Functions 2.0 New and enhanced analytical functions are introduced in this release. A new ordered aggregate, LISTAGG, concatenates the values of the measure column. The new analytic window function NTH_VALUE (a generalization of existing FIRST_VALUE and LAST_VALUE functions) gives users the functionality of retrieving an arbitrary (or nth) record in a window. The LAG and LEAD functions are enhanced with the IGNORE NULLS option. The new and enhanced SQL analytical functions allow more complex analysis in the database, using (simpler) SQL specification and providing better performance. See Also: Oracle Database Data Warehousing Guide for details 1.3.1.2 Recursive WITH Clause The SQL WITH clause has been extended to enable formulation of recursive queries. Recursive WITH clause complies with the American National Standards Institute (ANSI) standard. This makes Oracle ANSI-compatible for recursive queries. See Also: Oracle Database SQL Language Reference for details 1.3.2.2 Preprocessing Data for ORACLE_LOADER Access Driver in External Tables The syntax for the ORACLE_LOADER access driver is extended in this release to allow specification of a program to preprocess the data files that are read for the external table. The access parameters can specify the name of a directory object and the name of an executable file in that directory object. When the access driver needs to read data from a file, it creates a process that runs the specified program, passing in the name of the data file. The output from the program is passed into the access driver which parses the data into records and columns. The initial use of this feature is by a customer who needs to load data that is stored in compressed files. The user specifies the name of the program used to decompress the file as part of the access parameters. The access driver reads the output of the decompression program. Large customers want to load data from compressed files which requires less disk space and uses the I/O bandwidth between the disk and memory more efficiently. 1.5.2.1 E-mail Notification Oracle Database 11g Release 2 (11.2) users can now get e-mail notifications on any job activity. This feature improves efficiency by enabling users to be notified of any job activity that is of interest to them without having to constantly monitor the job. 1.5.2.2 File Watcher File watcher enables jobs to be triggered when a file arrives on a given machine. This feature improves efficiency and ease-of-use. Jobs with file dependencies are automatically triggered when the specified file is received instead of constantly monitoring for the file. 1.5.2.4 Remote Database Jobs This feature enables users to run PL/SQL blocks or stored procedures that reside in a remote database as a job. This is a key feature for Enterprise Manager scheduling. It improves efficiency and ease-of-use by enabling job scheduling in a distributed environment to be managed centrally. 1.5.3.1 Data Pump Legacy Mode Data Pump Legacy Mode provides backward compatibility for scripts and parameter files used for original Export and Import scripts. This feature enables users to continue using original Export and Import scripts with Data Pump Export and Import. Development time is reduced as new scripts do not have to be created. Possibly Interesting 1.2.3.2 Configurable Real-Time Query Apply Lag Limit A physical standby database can be open for read-only access while redo apply is active only if the Oracle Active Data Guard option is enabled. This capability is known as real-time query. The new STANDBY_MAX_DATA_DELAY session parameter can be used to specify a session-specific apply lag tolerance, measured in seconds, for queries issued by non-administrative users to a physical standby database that is in real-time query mode. This capability allows queries to be safely offloaded from the primary database to a physical standby database, because it is possible to detect if the standby database has become unacceptably stale. 1.9.2.3 Automatic Patching of Time Stamp With Time Zone Data Time stamp with time zone data could become stale in the database tables when the time zone version file is updated. Today, users have to manually fix the affected data. This feature updates the system and user data transparently with minimal downtime and provides automatic and transparent patching of time stamp with time zone data whenever a time zone file is updated. Also, when a server time zone version is patched, all of the clients that communicate with the server need to be patched as well. With this feature, OCI, JDBC, Pro*C, and SQL*Plus clients can now continue to work with the server without having to update their client-side files. This new feature provides automatic and transparent patching of time stamp with time zone data whenever a time zone file is updated. 1.3.4.2 Minimal Effort Parallel Execution - Auto Degree of Parallelism (DOP) and Queuing When activated, Oracle determines the optimal degree of parallelism (DOP) for any given SQL operation based on the size of the objects, the complexity of a statement, and the existing hardware resources. 1.9.2.10 Enable Sampling for Active Data Guard Active Session History (ASH) is now available on standby systems. Having ASH data available on standby systems for Data Guard environments allows customers to troubleshoot performance problems specific to their standby environments. 1.9.2.12 Global Oracle RAC ASH Report + ADDM Backwards Compatibility The Active Session History (ASH) report now includes cluster-wide information, greatly enhancing it's utility in identifying and troubleshooting performance issues that span nodes for a cluster database. RAC - Possibly Interesting 1.4.1.6 Grid Plug and Play (GPnP) Grid Plug and Play (GPnP) eliminates per-node configuration data and the need for explicit add and delete nodes steps. This allows a system administrator to take a template system image and run it on a new node with no further configuration. This removes many manual operations, reduces the opportunity for errors, and encourages configurations that can be changed easily. Removal of the per-node configuration makes the nodes easier to replace, because they do not need to contain individually-managed state. Grid Plug and Play reduces the cost of installing, configuring, and managing database nodes by making their per-node state disposable. It allows nodes to be easily replaced with regenerated state. 1.4.1.7 Oracle Restart Oracle Restart improves the availability of your single-instance Oracle database. Oracle Restart automatically restarts the database instance, the Automatic Storage Management (ASM) instance, the listener, and other components after a hardware or software failure or whenever your database host computer restarts. Server Control (SRVCTL) is the command line interface to manage Oracle processes that are managed by Oracle Restart on a standalone server. This feature provides improved reliability and automated management of a single-instance Oracle database and the management of any process or application running on the database server. 1.4.1.10 Role-Separated Management Role-separated management for Oracle Clusterware allows certain administrative tasks to be delegated to different people, representing different roles in the company. It is based on the idea of a clusterware administrator. The administrator may grant administrative tasks on a per resource basis. For example, if two databases are placed into the same cluster, the clusterware administrator can manage both databases in the cluster. But, the clusterware administrator may decide to grant different administrative privileges to each DBA responsible for one of those databases. Role-separated management allows multiple applications and databases to share the same cluster and hardware resources, but ensures that different administration groups do not interfere with each other 1.4.1.13 Enterprise Manager-Based Clusterware Resource Management New in this release is an Enterprise Manager graphical user interface (GUI) to manage various Oracle Clusterware resources with full lifecycle support. In addition to allowing the creation and configuration of resources within Oracle Clusterware, it also helps to monitor and manage resources once deployed in the cluster. Using Oracle Enterprise Manager as a GUI to monitor and manage various Oracle Clusterware resources eases the daily management in high availability environments. 1.4.1.14 Enterprise Manager Provisioning for Oracle Clusterware and Oracle Real Application Clusters Enterprise Manager provisioning introduces procedures to easily scale up or scale down Oracle Clusterware and Oracle Real Application Clusters. Ease-of-implementation and management for a clustered database environment can be achieved through utilizing the terprise Manager provisioning framework. 1.4.1.17 Configuration Assistant Support for Removing Oracle RAC Installations Database Configuration Assistant (DBCA), Database Upgrade Assistant (DBUA), and Net Configuration Assistant (NETCA) have been updated to support the complete deinstallation and deconfiguration of Oracle RAC databases and listeners. This support improves the manageability of an Oracle RAC environment through automation of deinstallation and deconfiguration of Oracle RAC databases. 1.4.1.18 Oracle Universal Installer Support for Removing Oracle RAC Installations The installer can clean up a failed Oracle Clusterware installation or upgrade of an environment prior to reattempting the operation. This ensures that the reattempted operation is done over a clean environment, thereby eliminating the chances of errors related to environmental inconsistencies. Easily cleaning up an environment provides improved Oracle RAC manageability and deployment. 1.4.1.22 Out-of-Place Oracle Clusterware Upgrade A new version of Oracle Clusterware is now installed into a separate home from the current installation. This reduces the downtime required to upgrade a node in the cluster and facilitate the provisioning of clusters within an enterprise. The benefit is a reduction in planned outage time required for cluster upgrades which assists in meeting availability service levels. This also makes it easier to provide a standard installation across the enterprise. 1.4.1.26 SRVCTL Support for Single-Instance Database in a Cluster Using SRVCTL, you can register a single-instance database to be managed by Oracle Clusterware. Once registered, Oracle Clusterware starts, stops, monitors, and restarts the database instance. This feature provides an improved management interface which makes it easy to provide higher availability for single-instance databases that are running on a server that is part of a cluster. Fini |
Posted by Ook at 04:03 0 comments
Labels: Oracle
Thursday, 3 September 2009
Oracle: Exporting Grid Control Repository Database
Resolve EXP-00079 EXP-00056 (exp) and ORA-28112 (expdp) Errors when Exporting Grid Control Repository Database using Traditional Export or Datapump Export (1oG+) grant exempt access policy to EXPORTING_USER; |
Posted by Ook at 08:23 0 comments
Labels: Oracle
Oracle : Archivelog mode 2
# For RAC bring down other instances srvctl stop instance -d NTPDB1 -i NTPDB12 # On remaining instance alter system set log_archive_dest_1='location=/u02/volntpdblogs01/oradata/NTPDB1/archive' scope=spfile alter system set log_archive_format='%t_%s_%r.dbf' scope=spfile shutdown immediate; startup mount; alter database archivelog; alter database open; ALTER SYSTEM SWITCH LOGFILE; # For RAC bring back other instances srvctl start instance -d NTPDB1 -i NTPDB12 |
Posted by Ook at 03:29 0 comments
Labels: Oracle
Tuesday, 1 September 2009
Oracle : Drop corrupt AQ tables
alter session set events '10851 trace name context forever, level 2'; This disables ORA-24005 message then table can be dropped using conventional SQL DROP |
Posted by Ook at 05:57 0 comments
Labels: Oracle
Friday, 21 August 2009
Windows : Count files
From command line - not excludes hidden files dir "C:\" /b/s |find /v /c "::" |
Posted by Ook at 02:54 0 comments
Tuesday, 4 August 2009
Linux : Renew dhcp lease
sudo dhclient -r (windows = ipconfig \r) |
Posted by Ook at 04:14 0 comments
Labels: Linux
Vmware Server : Port redirection for NAT network access to guest SSH+RDP
* Add lines to the NAT config to redirect the host ports to the required guest ports vi /etc/vmware/vmnet8/nat/nat.conf # SSH # ssh -p 8889 root@localhost 8822 = 192.168.84.129:22 # RDP 8889 = 192.168.84.128:3389 * Restart the vm network services /usr/lib/vmware/net-services.sh restart |
Posted by Ook at 03:16 0 comments
Labels: VMWare
Thursday, 30 July 2009
Linus : Rpm query by install time shorter version
rpm -qa --last | less |
Posted by Ook at 07:34 0 comments
Friday, 24 July 2009
Windows Server 2003: Install DNS and Active Directory
http://www.petri.co.il/how_to_install_active_directory_on_windows_2003.htm |
Posted by Ook at 08:00 0 comments
Wednesday, 22 July 2009
OEM : Netapps custom reports
1. Grant additional perms Need following perms on OEM repos as query is reliant on base tables not oem application views - could rework later perhaps grant select on MGMT_METRICS_RAW to mgmt_view; 2.1 Create Report Navigate to Reports->Create Title : NTAP001 - Netapps Raw IO-Rate Category : Custom Reports (may have to add) Subcategory : Development (may have to add) Target : Target Type=Network Appliance Filer Time Period : This reoport has a time period = ticked. Time Period = This Year, Allow the report viewer... = ticked 2.2 Create chart element Navigate to tab Elements->Add Select Chart from SQL Navigate to Set Parameters Header : Io Rate Statment : select mt.TARGET_NAME, mrw.COLLECTION_TIMESTAMP, --mm.column_label, mrw.VALUE /*-- DEBUG ,mm.COLUMN_LABEL_NLSID ,'MRW->' ,mrw.* ,',MT->' ,mt.* ,'MM->' ,mm.* */ from MGMT_METRICS_RAW mrw, MGMT_METRICS mm, MGMT_TARGETS mt where 1=1 and mrw.metric_guid = mm.metric_guid and mrw.TARGET_GUID = mt.TARGET_GUID and mt.TARGET_TYPE = mm.TARGET_TYPE and mt.type_meta_ver = mm.type_meta_ver and (mt.TARGET_TYPE = 'netapp_filer' ) AND mrw.collection_timestamp >= ??EMIP_BIND_START_DATE?? and mrw.collection_timestamp <= ??EMIP_BIND_END_DATE?? and mt.TARGET_GUID = ??EMIP_BIND_TARGET_GUID?? and column_label_nlsid in ( 'netapp_filer_total_disk_io_rate' --,'netapp_filer_pct_busy' --,'netapp_filer_nfs_calls_rate' --,'netapp_filer_total_network_io_rate' ) ORDER BY mt.TARGET_NAME, mrw.COLLECTION_TIMESTAMP, mm.column_label Statement type : SQL Legent Position : Right Width : 1000 Height : 400 2.3 Create Table element Navigate to tab Elements->Add Select Table from SQL Repeat settings for Chart from SQL element above 3. Clone to create other reports Repeat altering Sql in each case for NTAP001 - Netapps Raw IO-Rate = netapp_filer_total_disk_io_rate NTAP002 - Netapps Raw CPU %Busy = netapp_filer_pct_busy NTAP003 - Netapps Raw NFS Call Rate = netapp_filer_nfs_calls_rate NTAP004 - Netapps Raw Network IO Rate = netapp_filer_total_network_io_rate |
Posted by Ook at 02:18 0 comments
OEM : Add ability to run queries on target dbs for OEM report elements
'target_user_table_from_sql', 'oracle.sysman.db.util.reports.TableTargetRenderController',0,NULL,'EM',NULL, '10.2.0.1.0'); Insert into SYSMAN.MGMT_IP_ELEM_PARAM_CLASSES (ELEMENT_NAME_NLSID, ELEMENT_TYPE_NLSID, ELEMENT_PARAM_CLASS, DISPLAY_ORDER) Values ('target_user_table_from_sql', 'database_target_type','oracle.sysman.eml.ip.render.elem.HeaderParamController', 1); Insert into SYSMAN.MGMT_IP_ELEM_PARAM_CLASSES (ELEMENT_NAME_NLSID, ELEMENT_TYPE_NLSID, ELEMENT_PARAM_CLASS, DISPLAY_ORDER) Values ('target_user_table_from_sql', 'database_target_type', 'oracle.sysman.eml.ip.render.elem.SQLStatementParamController', 2); Commit;
|
Posted by Ook at 02:05 0 comments
Labels: Oracle
OEM : UDMs and Custom reports
1. Create user defined metric on LIVE1, ESTDB2 (has to be a db), DBQLIVE1
(select program_name ,min(least(nvl(first_allow_time,sysdate+1),nvl(first_deny_time,sysdate+1))) min_first_time from odl_dbadmin_dbo.client_app_login where 1=1 group by program_name order by 2 desc) where min_first_time >= sysdate-30
2.1 Create Report
key_value "Metric Name", UPPER(target_name) "Target Name", TO_CHAR(collection_timestamp, 'MM-DD-YYYY HH24:MI') "Last Collected" ,nvl(to_char(data_value_int),string_value) "Metric Value" --,M.* FROM sysman.em$current_metrics m WHERE 1=1 AND METRIC_NAME = 'SQLUDM' AND key_value like 'ODL%' ORDER BY 1, 2
2.3 Set a preferred credentials against the OEM repos target for the report running user
|
Posted by Ook at 02:05 0 comments
Friday, 17 July 2009
Oracle : Tracing the session behind an ORA-54 resource busy message
select oracle_username || ' (' || s.osuser || ')' username , s.sid || ',' || s.serial# sess_id , owner || '.' || object_name object , object_type , decode( l.block , 0, 'Not Blocking' , 1, 'Blocking' , 2, 'Global') status , decode(v.locked_mode , 0, 'None' , 1, 'Null' , 2, 'Row-S (SS)' , 3, 'Row-X (SX)' , 4, 'Share' , 5, 'S/Row-X (SSX)' , 6, 'Exclusive', TO_CHAR(lmode)) mode_held from v$locked_object v , dba_objects d , v$lock l , v$session s where v.object_id = d.object_id and v.object_id = l.id1 and v.session_id = s.sid order by oracle_username , session_id ALTER SYSTEM KILL SESSION '109,27585'; --sess_id |
Posted by Ook at 01:52 0 comments
Labels: Oracle
Saturday, 11 July 2009
Firefox 3.5 startup speedup
Remove files from the following directories which are scanned for security: C:\Documents and Settings\*user*\Local Settings\History C:\Documents and Settings\*user*\Local Settings\Temporary Internet Files C:\Documents and Settings\*user*\My Recent Documents C:\Documents and Settings\*user*\Temp\ |
Posted by Ook at 02:00 0 comments
Thursday, 25 June 2009
Windows : Remote desktop - terminal server has exceeded the maximum ...
Getting a RC console session
|
Posted by Ook at 03:41 0 comments
Tuesday, 23 June 2009
Sharepoint - Map subsite to a drive
Mapping the sharepoint wiki as a mapped drive
Adding sharepoint as a Network Place
<b><b>http://www.phase2.com/blog/?p=96 |
Posted by Ook at 09:06 0 comments
Sharepoint : Embed excel in the wiki
To add an excel spreadsheet for viewing in sharepoint
|
Posted by Ook at 06:27 0 comments
Labels: Oracle
Thursday, 18 June 2009
SourceSafe : Get a release based on a label
To check out the labelled release from VSS using the GUI
set PATH=%PATH%;C:\Program Files\Microsoft Visual SourceSafe
REM ss.exe getTo label projects (directories) in GUI
To view labels in GUI
|
Posted by Ook at 09:02 0 comments
Labels: Oracle
Wednesday, 20 May 2009
USB Mass Storage
First is to ensure that the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR start value is 3. If you are an administrator on the machine, ensure C:\windows\system32\drivers have SYSTEM user access especially USBSTOR.SYS. If you don't have usbstor.inf in that directory or anywhere in c:\windows, go download from the web. Go to Device Manager an uninstall the " ? " which was a result of the failed driver installation. Plug-in the device, then when asked where to search, point to c:\windows\system32\drivers... |
Posted by Ook at 03:37 0 comments
Wednesday, 1 April 2009
RAC : Disable CRS
Disabled the three lines that keep the demons running in /etc/inittab #h1:35:respawn:/etc/init.d/init.evmd run >/dev/null 2>&1 </dev/null #h2:35:respawn:/etc/init.d/init.cssd fatal >/dev/null 2>&1 </dev/null #h3:35:respawn:/etc/init.d/init.crsd run >/dev/null 2>&1 </dev/null Marked crs as disabled in the file that controls its behaviour at start up /etc/oracle/scls_scr/lontestdb01/root/crsstart Check logs in /var/log/messsages and CRS_HOME/log/<hostname>/* Fini |
Posted by Ook at 10:31 0 comments
Labels: Oracle
Tuesday, 31 March 2009
Oracle : Empty listener log
http://boomslaang.wordpress.com/2007/11/07/ooops/ Temporarily stop logging
Check entries re-appearing in logfile Fini |
Posted by Ook at 03:03 0 comments
Labels: Oracle
Oracle : Stop listener logging
http://lc.leidenuniv.nl/awcourse/oracle/network.920/a96581/listener.htm add following to listener.ora
Check with
Confirm via
Fini |
Posted by Ook at 03:00 0 comments
Labels: Oracle
Wednesday, 25 March 2009
11g : Errors using exp as it is de-supported
Got some errors running exp on an 11G cluster due to missing perms |
Posted by Ook at 08:15 0 comments
Thursday, 5 March 2009
identifying trace files in 11g (RAC)
SELECT pid, program, tracefile FROM gv$process where pid in (37,84) |
Posted by Ook at 07:42 0 comments
Friday, 27 February 2009
Perl one-liner to summarize file sizes
ls -l /u02/volestlivelogs01/oradata/ESTDB/archive/*.dbf | sed -e "s/:/ /g" -e "s/ / /g" | perl -lane 'BEGIN {%hash=();} $hash{"$F[5]$F[6]-$F[7]:00"}+= $F[4]; END {foreach $k (sort keys %hash) {print "$k " . int($hash{$k}/(1024*1024)) . " Mb"; } }' |
Posted by Ook at 03:18 0 comments
Total size of an arbitrary list of files
ls -lrt | grep "Feb 17" | awk '{tot += $5;ct +=1; print $9 " " $5/(1024*1024) "Mb"} END {printf(" Files : %s TOTAL SIZE %4.2f Gb\n",ct,tot/(1024*1024*1024))}' Remove files ls -lrt | grep "Feb 19" | cut -d":" -f2 | cut -d" " -f2 | xargs rm -rf |
Posted by Ook at 03:17 0 comments
Wednesday, 18 February 2009
Total size of an arbitrary list of files
ls -lrt | grep "Feb 17" | awk '{tot += $5;ct +=1; print $9 " " $5/(1024*1024) "Mb"} END {printf(" Files : %s TOTAL SIZE %4.2f Gb\n",ct,tot/(1024*1024*1024))}' |
Posted by Ook at 14:41 0 comments
Friday, 30 January 2009
Oracle : Display refcursor content in SqlPlus or Toad
Proc to xml-ify the refcursor create or replace procedure refcursor_print (p_refcursor in sys_refcursor, p_null_handling in number := 0) as l_xml xmltype; l_context dbms_xmlgen.ctxhandle; l_clob clob; l_null_self_argument_exc exception; pragma exception_init (l_null_self_argument_exc, -30625); procedure print (p_msg in varchar2) as l_text varchar2(32000) := p_msg; begin loop exit when l_text is null; dbms_output.put_line(substr(l_text,1,250)); l_text:=substr(l_text, 251); end loop; end print; begin /* Purpose: print debug information (ref cursor) Remarks: outputs weakly typed cursor as XML */ /* get a handle on the ref cursor */ l_context:=dbms_xmlgen.newcontext (p_refcursor); /* # DROP_NULLS CONSTANT NUMBER:= 0; (Default) Leaves out the tag for NULL elements. # NULL_ATTR CONSTANT NUMBER:= 1; Sets xsi:nil="true". # EMPTY_TAG CONSTANT NUMBER:= 2; Sets, for example, <foo/>. */ /* how to handle null values */ dbms_xmlgen.setnullhandling (l_context, p_null_handling); /* create XML from ref cursor */ l_xml:=dbms_xmlgen.getxmltype (l_context, dbms_xmlgen.none); print('Number of rows in ref cursor: ' || dbms_xmlgen.getnumrowsprocessed (l_context)); begin l_clob:=l_xml.getclobval(); print('Size of XML document (anything over 32K will be truncated): ' || length(l_clob)); print(substr(l_clob,1,32000)); exception when l_null_self_argument_exc then print('Empty dataset.'); end; end ; Call like this Nb returns a refcursor into c1 Output via dbms_output c1 sys_refcursor; begin get_refcursor_with_some_params('X1001',TO_DATE('12/02/2008','DD/MM/YYYY'),c1); refcursor_print(c1); end; |
Posted by Ook at 06:09 0 comments
Labels: Oracle
Wednesday, 28 January 2009
Rdesktop under linux into a Cisco VPN
IPSec gateway IPSec ID IPSec secret ### Put your username here Xauth username Xauth password
Misc Putty - selection cursor shows up black on black - change the mouse pointer on the remote machine to something more usable (Control panel -> Mouse->Pointers Tab->Text Selection) |
Posted by Ook at 07:36 0 comments
Labels: Linux
Friday, 23 January 2009
Conficker related links
Stopping Autorun http://nick.brown.free.fr/blog/2007/10/memory-stick-worms.html How to disable the use of USBs (MS) http://support.microsoft.com/kb/823732 |
Posted by Ook at 09:29 0 comments
Monday, 19 January 2009
Windows: Remote query for installed patches
wmic /user:Administrator /password:,password> /node:"spread-00811" qfe | find /N "KB958644" |
Posted by Ook at 06:35 0 comments
Windows : Remote registry query/changes
reg query \\SPREAD-01058\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL /s |
Posted by Ook at 06:30 0 comments
Windows: Admin command window via Runas
runas /user:odl\administrator cmd |
Posted by Ook at 06:29 0 comments
Thursday, 15 January 2009
Oracle: DBCA template reverse engineering problem solved
Silent create template dbca -createTemplateFromDB -sourceDB lontestdb02:1521:NEWDEV4 -templateName ZPFL1 -sysDBAUserName sys -sysDBAPassword password -maintainFileLocations false -silent Problem When using the DBCA to create a RAC database when selecting next on the node selection screen are receiving the following error: java.security.AccessControlException: access denied (java.sql.SQLPermission setLog) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270) at java.security.AccessController.checkPermission(AccessController.java:401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:542) at java.sql.DriverManager.setLogStream(DriverManager.java:392) CauseThe problem is that the user (oracle user) which use the DBCA does not have the permission to use the java packages for the RAC environment across the nodes. To create a file which set the permissions it will be checked and used to perform the action needed to be able to create the instances across the nodesFixCreate the file:.java.policy on each node in the Oracle Users Home directory. containing the following code. grant { permission java.security.AllPermission; }; When done, changed the permission to 770 for the .java.policy file for the files/nodes Start the DBCA again. Template created in $ORACLE_HOME/dbca |
Posted by Ook at 05:51 1 comments
Labels: Oracle
Tuesday, 6 January 2009
Oracle 10.2 RAC reboottime tweakables
http://mengmark.spaces.live.com/blog/cns!9BA8E9209B123692!179.entry Oracle Database 10g Release 2 CSS (Cluster Synchronization Service) parameters: With 1. Oracle Database 10.2.0.1 2. Oracle Database 10.2.0.1 + Patch for Bug 4896338 3. Oracle Database 10.2.0.2 4. Oracle Database 10.2.0.3 1. Oracle Database 10.2.0.1 There The default value for misscount is 60 seconds. 2. Oracle Database 10.2.0.1 + Patch 4896338 and Oracle Database 10.2.0.2 There Oracle Database 10.2.0.2 has a fix for this bug. There are three CSS parameters available in 10.2.0.2 and 10.2.0.1 + patch for bug 4896338; they are as follows: a) b) c) reboottime - It is the amount of time allowed for a node to complete a reboot after the CSS daemon has been evicted. Default values for these parameters are as follows: misscount = 60 seconds disktimeout = 200 seconds reboottime = 3 seconds Using CRS internally calculates two parameters namely diskshorttimeout and disklongtimeout (can be checked in ocssd.log), where a) b) 3. Oracle Database 10.2.0.3 This That is in Oracle Database 10.2.0.3 diskshorttimeout = disklongtimeout if css disktimeout parameter is less than css misscount. 4. Recommendations for Oracle Database 10g Release 2 CSS parameter values to be used with NetApp storage: As 1. Oracle Database 10.2.0.1 misscount = 120 seconds (default is 60 seconds) 2. Oracle Database 10.2.0.1 + Patch for Bug 4896338 misscount = 120 seconds (default is 60 seconds) disktimeout = 200 seconds (default) reboottime = 3 seconds (default) 3. Oracle Database 10.2.0.2 misscount = 120 seconds (default is 60 seconds) disktimeout = 200 seconds (default) reboottime = 3 seconds (default) 4. Oracle Database 10.2.0.3 misscount = 120 seconds (default is 60 seconds) disktimeout = 200 seconds (default) reboottime = 3 seconds (default) All the above recommendations are for Linux Operating system. Note: Appendix Commands to check / modify CSS parameters: 1. crsctl get css misscount ---------- to check misscount value 2. crsctl get css disktimeout --------- to check disktimeout value 3. crsctl get css reboottime ---------- to check reboottime value 4. crsctl set css misscount 120 --------- to set misscount to 120 seconds 5. crsctl set css disktimeout 200 ------- to set disktimeout to 200 seconds 6. crsctl set css reboottime 3 ----------- to set reboottime to 3 seconds http://el-caro.blogspot.com/2006/10/case-study-on-how-to-diagnose-node.html There have been a couple of additional CSS related parameters introduced in the
|
Posted by Ook at 06:46 0 comments
Office : Outlook Rule limits
http://corinnalo.blogspot.com/2008/10/exchange-outlook-rules-32k-limit.html There is a Microsoft KB that talks about some workarounds on the Exchange 32K rules storage limit problem. Basically, rename your rules to shorter names, merge some of your rules, change your local folders to shorter names, move your Outlook data files to another location on the file system that has a shorter path, etc. |
Posted by Ook at 03:21 0 comments