Monday, March 06, 2017

Samsung M2070 wireless printer installation , even supporting Linux

Excited with my very first new laser printer, started to set it up.

Followed the quick installation guide, insert the CD to ROM, choose wireless, however the stuck at connecting printer, time out after waiting for 10 minutes. intially suspect it is related to default OOTB 1 minute autosleep, adjust to longer time. still the same problem  -- the installation from the CD failed to detect the printer, although I had the USB cable connected. Real bad user experience, I started to regret chose this brand.
\


Thinking not right time to call the hot line at weekend night, while daytime I need to work.  Does it mean I need to take half day to stay at to call service centre and follow the instruction.

Searched to hard copy manual comes with the box, have to read the  guide again and again, finally I paid attention the sentence "use the CDROM and download installer from www.samsung.com/printersetup "  . I started to guess something with the installer from CDROM.

Tried my luck to download the installer online, in few steps, the new installer detect the wireless printer in few seconds.  I had spent new two hours for that buggy installer from CDROM.

What if customer not so techy like me? Isn't that very bad user experience?

Next I tested with mobile app "samsung mobile print" smoothly.


My final challenge is print from my Ubuntu PC, which I never thought when I decided to buy a laser print.

Tried to add a printer from Ubuntu, but failed to find right model.
Googled and find there is Driver for Linux, thanks to Samsung.

http://www.samsungdrivers.net/samsung-m2070-driver/


The filename I downloaded is ULD_v1.00.29.tar.gz.

tar xvfz it


cd uld

sudo  ./install.sh


...

If you have any questions regarding this agreement and other products, please co
ntact SAMSUNG ELECTRONICS.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

**** Do you agree ? [y/n] : y
**** Are you going to use network devices ? If yes, it is recommended to configure your firewall.
**** If you want to configure firewall automatically, enter 'y' or just press 'Enter'. To skip, enter 'n'. : n
**** Registering CUPS backend ...
**** CUPS restart OK.
**** Print driver has been installed successfully.
**** Registering SANE backend ...
**** Restarting udev ...
**** Scan driver has been installed successfully.
**** Install finished.
hmc@hmc-P55A-UD3:~/Downloads/uld$ sudo

Added the printer again , the correct printer model is shown.






Print the Test Page!


Thanks! I shall have no more worry about dry ink when I want to print!


Other References:

http://askubuntu.com/questions/454910/how-can-i-connect-ubuntu-14-04-to-my-wireless-printer-canon-mp620

http://askubuntu.com/questions/170880/how-do-i-install-the-drivers-for-my-samsung-printer



Addendum:

From the http://www.samsungsetup.com/TS/Client/en/Install.html , I even see there is installer for more platforms like Linux, AIX , Solarix, HPUX !  Appreciate this .

Thursday, March 02, 2017

considerations to use logical standby to sync partial schema

Two points to highlight based on 12.2c document shared below.

1. application side to ensure prerequisites of logical standby database can be met.

http://docs.oracle.com/database/122/SBYDB/creating-oracle-data-guard-logical-standby.htm#SBYDB4731

4.1.1 Determine Support for Data Types and Storage Attributes for Tables

4.1.2 Ensure Table Rows in the Primary Database Can Be Uniquely Identified


2. As partial objects  within a schema, it can be achieved by oracle package dbms_logstdby.   For each new object creation after go-live and to be skipped from changing, the procedure should be executed.  Requires well documentation and maintenance effort.

http://docs.oracle.com/database/122/SBYDB/managing-oracle-data-guard-logical-standby-databases.htm#SBYDB4804

11.5.2 Using DBMS_LOGSTDBY.SKIP to Prevent Changes to Specific Schema Objects


Other relevant article

http://www.databasejournal.com/features/oracle/skipping-schema-dml-in-an-oracle-11.2-logical-standby-database.html


Tuesday, February 28, 2017

convert low_value and high_value for date datatype in column's index statistics

1. The dictionary view of dba_tab_col_statistics

https://docs.oracle.com/cd/B28359_01/server.111/b28320/statviews_2089.htm#REFRN20275

Note the low_value and high_value are in RAW(32) format.


2. google and found a few article, but only this works correctly for me. As some of  them giving higher number for low_value than high_value. i.e. the low_value is likely to be year 2169, while high value is year 2017. Guess this is computer using two digits to represent years in YY.

http://oracle-study-notes.blogspot.sg/2008/06/how-to-display-highvaluelowvalue.html


sharing his code here. Thanks Mr. Sun.

1. create a function as follows (copied from a website) 

create or replace function display_raw (rawval raw, type varchar2)  
return varchar2  
is 
   cn     number;  
   cv     varchar2(32);  
   cd     date;  
   cnv    nvarchar2(32);  
   cr     rowid;  
   cc     char(32);  
begin 
   if (type = 'NUMBER') then 
      dbms_stats.convert_raw_value(rawval, cn);  
      return to_char(cn);  
   elsif (type = 'VARCHAR2') then 
      dbms_stats.convert_raw_value(rawval, cv);  
      return to_char(cv);  
   elsif (type = 'DATE') then 
      dbms_stats.convert_raw_value(rawval, cd);  
      return to_char(cd);  
   elsif (type = 'NVARCHAR2') then 
      dbms_stats.convert_raw_value(rawval, cnv);  
      return to_char(cnv);  
   elsif (type = 'ROWID') then 
      dbms_stats.convert_raw_value(rawval, cr);  
      return to_char(cnv);  
   elsif (type = 'CHAR') then 
      dbms_stats.convert_raw_value(rawval, cc);  
      return to_char(cc);  
   else 
      return 'UNKNOWN DATATYPE';  
   end if;  
end;  
/ 








2. Issue the following statement with table name and column name 


col column_name format a20
col low_val format a20
col high_val format a20

select 
   a.column_name,  
   display_raw(a.low_value,b.data_type) as low_val,  
   display_raw(a.high_value,b.data_type) as high_val,  
   a.num_distinct
from 
   dba_tab_col_statistics a, dba_tab_cols b  
where 
      a.table_name='TABLE_NAME'
  and a.table_name=b.table_name
  and a.column_name=b.column_name  
  and  a.owner='MYOWNER'
  and b.owner='MYOWNER'
--  and a.column_name ='COL_NAME'
/ 



Today I had chance to try this article and found it works well too.

 select low_VALUE , high_value from dba_tab_col_statistics where TABLE_NAME='ACCOUNTS' and COLUMN_NAME='DATETIME';

LOW_VALUE                                                        HIGH_VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
77C50718010101                                                   78710C17103A39

set serveroutput on
DECLARE
rv RAW(32) ;
dt DATE;
BEGIN
select LOW_VALUE into rv from dba_tab_col_statistics where TABLE_NAME='ACCOUNTS' and COLUMN_NAME='DATETIME' and owner='TAN';
dbms_stats.convert_raw_value(rv, dt);
dbms_output.put_line( TO_CHAR(dt, 'dd-MON-yyyy hh:mm'));
END;
/


23-OCT-1970 12:10

PL/SQL procedure successfully completed.



following the code in https://mwidlake.wordpress.com/2010/01/03/decoding-high_value-and-low_value/

The low_value decoded are not correct for date columns.


COLUMN_NAME            DATA_TYPE   LOW_V              HI_V
---------------------- ----------  ------------------ ------------------
ID                     NUMBER      6820               877120576
DATETIME               DATE        2096-7-24 0:0:0    2013-12-23 15:57:56
TRANSACTIONDATE        DATE        2096-7-24 0:0:0    2013-12-23 2:37:3

..
36 rows selected.

..
36 rows selected.