CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
ASM Reclamation Utility (ASRU)

 

First page Previous page 1 2 Next page Last page  View All


Laurent_R
Veteran / Moderator

Dec 14, 2013, 5:08 AM

Post #26 of 32 (1564 views)
Re: [NiaCo] ASM Reclamation Utility (ASRU) [In reply to] Can't Post

The 3 'x's in the "-rwxrwxrwx" string say that your file is executable by the file owner (first x), the members of the owner's group (second x), and the entire world (third x).

So your problem does not have to do with file permissions, but more probably by Windows not being able to recognize that it should launch the Perl interpreter when it sees your file in a command script. Maybe changing the file name to zerofill.pl and changing the command line launching it would be sufficient. Or changing the command line launching zerofill to "perl zerofill".

There is no real difference in the two ways to set the permissions, the "777" version is just faster to type.


FishMonger
Veteran / Moderator

Dec 14, 2013, 6:51 AM

Post #27 of 32 (1559 views)
Re: [NiaCo] ASM Reclamation Utility (ASRU) [In reply to] Can't Post


Quote
And what is the difference between giving permission by numbers and giving by words?(ugoa+rwx & 777)

The difference is that not all systems support all options for the chmod command, but all systems support the octal-mode setting. The octal syntax is cleaner, shorter and works the same on all systems.

Going back to an earlier post you stated:

Quote
I run it in the Visual studio's command line using the follwing command:
"perl ASRU.pl MyDiskGroupName"


Are you still running it that way, or are you running it under the cygwin environment (which is a bash shell)?

If you're not running it under cygwin, then trying to use the chmod command to make it executable is a big waste of time/effort.

If you're running the script from the Windows cmd prompt, then you can comment out the section of code that does the -x test (i.e., lines 590-594).

Code
  if(! -x $script) 
{
print "\n $script is not executable\n";
return;
}



BillKSmith
Veteran

Dec 14, 2013, 8:10 AM

Post #28 of 32 (1552 views)
Re: [FishMonger] ASM Reclamation Utility (ASRU) [In reply to] Can't Post

Let me repeat my previous warning. This script was written for Unix. FishMonger's suggestion will fix the current problem, but it is unlikely that this is the only problem you will encounter running it under windows.
Good Luck,
Bill


NiaCo
Novice

Dec 14, 2013, 11:20 AM

Post #29 of 32 (1537 views)
Re: [Laurent_R] ASM Reclamation Utility (ASRU) [In reply to] Can't Post

Thanks for your explanation, you gave me a clear vision about that.


NiaCo
Novice

Dec 14, 2013, 11:35 AM

Post #30 of 32 (1535 views)
Re: [BillKSmith] ASM Reclamation Utility (ASRU) [In reply to] Can't Post

Dear BillkSmith,

Now, I believe that you and FishMonger are right.
Based on what I've explained from the beginning, that the hole story is about reclaiming an space which was used by Oracle in thin provisioning storage, after eliminating data, and tablespaces, considering that the only feasible solution is taking advantage of ASRU utility.

And again based on what is inside the "read me" file:

"This package contains three files other than the README namely ASRU, ASRU.pl
and zerofill. All these files should be in same directory.

ASRU is a shell script wrapper for ASRU.pl. It calls ASRU.pl with appropriate
arguements.

ASRU.pl has the code that does the necessary actions to reclaim the allocated
but unused space. It calls the zerofill script with appropriate arguements
appended.

zerofill script takes the power, name of the disks and ranges to be zeroed as
arguements. It writes zeroes using the 'dd' command. This script can be
customized."

Considering this fact that unfortunately I'm forced to use Windows as the OS for the Oracle database...

As the last question for now, do you guys want to tell me that there is no way out to run and execute these codes in Windows?

Is it what you are trying to conclude?

Regards.


FishMonger
Veteran / Moderator

Dec 14, 2013, 11:59 AM

Post #31 of 32 (1532 views)
Re: [NiaCo] ASM Reclamation Utility (ASRU) [In reply to] Can't Post


Quote
As the last question for now, do you guys want to tell me that there is no way out to run and execute these codes in Windows?

Is it what you are trying to conclude?


No, that's not what we're saying.

We're saying that you have 2 options if you want to us a Windows system.

1) Modify the script(s) so that they can run on Windows (i.e., make them platform independent).

2) Run the scripts as they are currently designed but run them under the cygwin bash environment.

You still may need to make some minor adjustments if you choose option 2, but not as many as would be needed if you choose option 1.

I have not looked at them in depth, but my initial analysis is that they are using some questionable coding practices and if I were in charge of implementing their use, I would rewrite them from scratch.


Laurent_R
Veteran / Moderator

Dec 14, 2013, 2:06 PM

Post #32 of 32 (1527 views)
Re: [NiaCo] ASM Reclamation Utility (ASRU) [In reply to] Can't Post


In Reply To

As the last question for now, do you guys want to tell me that there is no way out to run and execute these codes in Windows?

Is it what you are trying to conclude?


The short answer is probably yes, from your own description of what it does, this code is very very unlikely to run under Windows. At least not without significant changes to the code. And making these changes is probably fairly difficult.

First page Previous page 1 2 Next page Last page  View All
 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives