Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Friday, October 13, 2017

How to Copy File Names in Windows Explorer

Display File Extensions

1. Click "Organize" in the Windows Explorer toolbar and select "Folder and Search Options."
2. Click the "View" tab.
3. Uncheck "Hide Extensions for Known File Types." You will now be able to copy the entire file name, including the extension.
4. Click "OK."

Copy File Name

1. Open Windows Explorer and click the file to select it.
2. Press "F2" on your keyboard to select the name. This enables you to rename the file or copy the name. Alternatively, right-click the file and select "Rename."
3. Press "Ctrl-A" if you also need to copy the file extension. This requires the previous unchecking of "Hide Extensions for Known File Types."
4. Press "Ctrl-C" to copy the file name.
5. Press "Enter" or click another location to exit the renaming mode.

Copy Entire List of Files

1. Hold the "Shift" key, right-click the folder containing a list of files and select "Open Command Window Here."
2. Type "dir /b > filenames.txt" (without quotation marks) in the Command Prompt window. Press "Enter."
3. Double-click the "filenames.txt" file from the previously selected folder to see a list of file names in that folder.
4. Press "Ctrl-A" and then "Ctrl-C" to copy the list of file names to your clipboard.

Monday, July 27, 2015

the macro cannot be found or has been disabled because of your macro security settings(BI Publisher office 2010 and 2007)

Recently I have upgraded MS Office from 2007 to 2010. As I work on some BI projects, part of mine set of oracle programs is oracle BI Publisher Desktop, which use Word as report template designer. When I run BI Publisher macros in Word 2010 I got following error:



When I google term it seems that all advices were not useful. Here are two most common errors and how should Word be setup correctly:


Templates were correctly enabled:

But in Windows event viewer, curious error was more than obvious:



The solution

The solution shown here really works (tested on several computers), so I'm writing this down to be more like documentation for future reference to anyone stack on this case. Idea is to remove old *.EXD files from any location in %USERPROFILE% folders that might exists.
Because mine praxis is to have separate %USERPROFILE% folder location then where are OS files (different then partition then C:), exd file was found as shown. In mine case it was only in one folder:
D:\Users\DamirV\Application Data\Microsoft\Forms>dir
 Volume in drive D is Data

 Volume Serial Number is 505E-794F

 Directory of D:\Users\DamirV\Application Data\Microsoft\Forms

01.02.2011  11:45    <DIR>          .
01.02.2011  11:45    <DIR>          ..

12.03.2009  15:17           165.808 MSComctlLib.exd
31.08.2010  10:34            11.776 WINPROJ.box

01.02.2011  11:19             7.168 WINWORD.box
               3 File(s)        184.752 bytes

               2 Dir(s)  51.699.859.456 bytes free

D:\Users\DamirV\Application Data\Microsoft\Forms>
So all you have to do is:
Rename existing "MSComctlLib.exd" file to "MSComctlLib.exd_bak"
Open Word 2010
Open menu Add-Ins|Oracle BI Publisher|Log On
Last action will create new MSComctlLib.exd file in background:
D:\Users\DamirV\Application Data\Microsoft\Forms>dir
 Volume in drive D is Data

 Volume Serial Number is 505E-794F

 Directory of D:\Users\DamirV\Application Data\Microsoft\Forms

01.02.2011  11:45    <DIR>          .
01.02.2011  11:45    <DIR>          ..

01.02.2011  13:51           167.456 MSComctlLib.exd
12.03.2009  15:17           165.808 MSComctlLib.exd_old

31.08.2010  10:34            11.776 WINPROJ.box
01.02.2011  11:19             7.168 WINWORD.box

               3 File(s)        184.752 bytes
               2 Dir(s)  51.699.859.456 bytes free


D:\Users\DamirV\Application Data\Microsoft\Forms>

Notice different file size and file date of "MSComctlLib.exd". This is now Office 2010 version of EXD file which was not able to be created because of previous version. And that is all.



The EndIf you have upgraded several Office versions (i.e. 2000->2003->2007->2010), you might find ".EXD" files as well in following folders:
%USERPROFILE%\Application Data\Microsoft\Forms
%USERPROFILE%\Local Settings\Temp\Excel8.0

%USERPROFILE%\Local Settings\Temp\VBE
%USERPROFILE%\Local Settings\Temp\Word8.0
Like in previous example rename them and later (when you are sure that all works) you may delete.

Hope this helps!

Cheers!
Post festum part-IMPORTANT!!!
I have received many asks that people complaint about this issue was resolved and later after some Windows updates, all is back to same problem.
For them I have wrote this part what should help them.
Again first step is to rename all .exd files.
For 64-bit operating systems, type the following:
Regsvr32 "C:\Windows\SysWOW64\MSCOMCTL.OCX"
For 32-bit operating systems, type the following:
Regsvr32 "C:\Windows\System32\MSCOMCTL.OCX"
Restart your machine.


Wednesday, June 25, 2014

Materialized Views

Creating materialized view that refreshes every 1 min


I have demonstrated in steps where a materialized view refresh after every one minute ,for having a mv which refresh after 5 minute use next(sysdate+1/1440)
Step1:
Create table temp (A int);
Step2:
Create Materialized view temp_mv
      refresh complete start with (sysdate) next  (sysdate+1/1440) with rowid
        as select * from temp;
Step3:
select count(*) from temp;

       COUNT(*)
      ----------
          0
Step4:
select count(*) from temp_mv;

       COUNT(*)
      ----------
          0
Step5:
begin
      for i in 1..10 loop
         insert into temp values (i+1);
      end loop;
end;
/
Step6:
commit;
Step7:
select count(*) from temp;

       COUNT(*)
     ----------
        10
Step8:
select count(*) from temp_mv;

       COUNT(*)
       ----------
          0
Step9:
select to_char(sysdate,'hh:mi') from dual;

       TO_CH
       -----
       04:28
Step10:
select to_char(sysdate,'hh:mi') from dual;

       TO_CH
        -----
       04:29
Step11:
select count(*) from temp;

      COUNT(*)
     ----------
        10
Step12:
select count(*) from temp_mv;

      COUNT(*)
      ----------
         10

Monday, June 23, 2014

Script to reset Oracle Apps frontend User ID Password

Here is a  sample anonymous PL/SQL block which will reset the Oracle Apps front end password for a given user from back end.


DECLARE
      flag_value BOOLEAN;
BEGIN
      flag_value :=
           fnd_user_pkg.changepassword(username=> 'SXMARGAM'
                                                 ,newpassword => 'welcome1');
     IF flag_value
     THEN
           DBMS_OUTPU.PUT_LINE('The password reset successfully');
     ELSE
           DBMS_OUTPUT.PUT_LINE('The password reset has failed');
     END IF;

END;
/
COMMIT;

Monday, March 31, 2014

Difference between Org_id ,organization_id and operating_unit

For instance let us say you are having Inventory Store.
You have Inventory Stores in two different countries like India and USA
You have installed Oracle Apps single instance and entered all the suppliers information,customers data,tax rules etc.

And your business requirement is like this, all the rules and the data corresponding to indian store shouldnt be applicable/available to american store and vice versa.

So to meet the above requirements you will define two operating units one for india and one for USA.
Now each operating unit will have an ID known as ORG ID.

And we use ORG ID to secure our business data.

Now to do transactions for indian operations you need to define one responsibility and attach indian ORG ID to this responsibility.By this an indian will not see any data/rules applicable to USA.

Similarly you will define another responsibility for USA and attach USA's ORG ID to this responsibility so that an american will not see any data/rules corresponding to India.

This is the concept of ORG ID.

Now let us see what is Organization ID.

Within India you have got various branches in different parts of the country in different states like AP,UP,MP etc.
And the business requirement is like this in AP you will maintain stock of Rice,UP for Wheat and MP for Maize.
To meet this business requirement you will define 3 Inventory Organizations under Indian Operating Unit to maintain the respective stocks of the states..

Each Inventory Organization will have an Organization ID.

This is the outline of the differences between ORG ID and Organization ID.

Thursday, July 25, 2013

Simple Steps to Find Password for an Application User in Oracle Applications

Step 1. Create get_password package specification, as shown below.

CREATE OR REPLACE PACKAGE get_password
AS
   FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
      RETURN VARCHAR2;
END get_password;
/

Step 2. Create get_pwd package body, as shown below.


CREATE OR REPLACE PACKAGE BODY get_password
AS
   FUNCTION decrypt (
      KEY     IN VARCHAR2
    , VALUE   IN VARCHAR2)
      RETURN VARCHAR2
   AS
      LANGUAGE JAVA
      NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
END get_password;
/

Step 3. Query to get password for apps user.


SELECT (SELECT get_password.decrypt (
                  UPPER (
                     (SELECT UPPER (fnd_profile.VALUE ('GUEST_USER_PWD'))
                        FROM DUAL))
                , usertable.encrypted_foundation_password)
          FROM DUAL)
          AS apps_password
  FROM fnd_user usertable
 WHERE usertable.user_name LIKE
          UPPER (
             (SELECT SUBSTR (
                        fnd_profile.VALUE ('GUEST_USER_PWD')
                      , 1
                      , INSTR (fnd_profile.VALUE ('GUEST_USER_PWD'), '/') - 1)
                FROM DUAL));

Step 4. Query to get password for any application user.


SELECT usertable.user_name
     , (SELECT get_password.decrypt (
                  UPPER (
                     (SELECT (SELECT get_password.decrypt (
                                        UPPER (
                                           (SELECT UPPER (
                                                      fnd_profile.VALUE (
                                                         'GUEST_USER_PWD'))
                                              FROM DUAL))
                                      , usertable.encrypted_foundation_password)
                                FROM DUAL)
                                AS apps_password
                        FROM fnd_user usertable
                       WHERE usertable.user_name LIKE
                                UPPER (
                                   (SELECT SUBSTR (
                                              fnd_profile.VALUE (
                                                 'GUEST_USER_PWD')
                                            , 1
                                            ,   INSTR (
                                                   fnd_profile.VALUE (
                                                      'GUEST_USER_PWD')
                                                 , '/')
                                              - 1)
                                      FROM DUAL))))
                , usertable.encrypted_user_password)
          FROM DUAL)
          AS encrypted_user_password
  FROM fnd_user usertable
 WHERE usertable.user_name LIKE UPPER ('&username');

Saturday, May 4, 2013

How to block YOUKU ads


Recently Youku advertising began rounds, the Adblock Plus looks like a bar can not afford to, do not worry there are ways, as shown below
Step 1 :
1)Go to C:\Windows\System32\drivers\etc
2)open hosts File.
3)Add the below ipaddress to it.
127.0.0.1 atm.youku.com
127.0.0.1 Fvid.atm.youku.com
127.0.0.1 html.atm.youku.com
127.0.0.1 valb.atm.youku.com
127.0.0.1 valf.atm.youku.com
127.0.0.1 valo.atm.youku.com
127.0.0.1 valp.atm.youku.com
127.0.0.1 lstat.youku.com
127.0.0.1 speed.lstat.youku.com
127.0.0.1 urchin.lstat.youku.com
127.0.0.1 stat.youku.com
127.0.0.1 static.lstat.youku.com
127.0.0.1 valc.atm.youku.com
127.0.0.1 vid.atm.youku.com
127.0.0.1 walp.atm.youku.com
Step 2:
Follow the path to find static.youku.com folder, then delete the folder, create a new txt file, named static.youku.com (wood suffix, pay attention!), And then set to read-only and then theoretically fly
C: \ Users \ mufeng \ AppData \ Local \ Google \ Chrome \ User Data \ Default \ Pepper Data \ Shockwave Flash \ WritableRoot \ # SharedObjects \ LPT6CBCC

youku.jpg