Script for purge RAM in Mavericks
In 10.7 Lion I made and script in Automator for apply purge command when I want to free up the RAM memory. I´ve been whatching that in Mavericks is necesary to put sudo before purge and then Terminal ask for the password. The question is: How can I make a script in Automator for do this stuff including sudo and the answer for the password?
You don't need such scripts. They are of little or no use. OS X performs its own memory management without the need for third-party utilities. Here are three such utiilties if you must.
RAM Cleaning
MemoryOptimize
MacPurge
Similar Messages
-
Hi All,
I have a database with version
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionI have a purge script to purge the database which is not working. Can anyone tell has oracle released any purge scripts for purging 11G database.
DECLARE
MAX_CREATION_DATE timestamp;
MIN_CREATION_DATE timestamp;
batch_size integer;
max_runtime integer;
retention_period timestamp;
BEGIN
MIN_CREATION_DATE := to_timestamp('2012-03-10','YYYY-MM-DD');
MAX_CREATION_DATE := to_timestamp('2012-03-20','YYYY-MM-DD');
max_runtime := 20;
retention_period := to_timestamp('2012-03-20','YYYY-MM-DD');
batch_size := 20000;
soa.delete_instances(
min_creation_date => MIN_CREATION_DATE,
max_creation_date => MAX_CREATION_DATE,
batch_size => batch_size,
max_runtime => max_runtime,
retention_period => retention_period,
purge_partitioned_component => false);
END;Thanks
DUOSYou need to be more specific.
First, you said that you wanted to purge your database, and then the tablespace, and finally, some tables...
If you want to flush data from a table completelly, use TRUNCATE TABLE.
If you want to remove some rows of that table, use DELETE FROM TABLE WHERE [your condition here] -
Did Apple Script change - upgraded Snow Leopard Mavericks
I used to use below script to toggle sound output (assigned to function key) in Snow Leopard.
Upgraded to Mavericks few weeks ago and wanted to use that script again, but keep on getting error -1728 as displayed hereafter, anyone out there to tell me what I should do to make it work in Mavericks?
Thx,
Laerg1
Here's the full script:
--This script toggles between two audio outputs in the "Sound" pane in "System Preferences.
--USES GUI SCRIPTING - "ENABLE ASSISTIVE DEVICES" OPTION MUST BE CHECKED IN "UNIVERSAL ACCESS" PREFERENCE PANE
--Adapted from script written by Corey Menscher for toggling outputs using Salling Erickson Clicker
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell application process "System Preferences"
set frontmost to true
click menu item "Sound" of menu "View" of menu bar 1
if my wait4window("Sound") is false then return false
tell window "Sound"
tell tab group 1
tell radio button "Output"
click
end tell
(* You can add your own audio output descriptive text, such as "iMic USB Audio", in the next section. *)
if (selected of row 2 of table 1 of scroll area 1) then
set selected of row 1 of table 1 of scroll area 1 to true
else
set selected of row 2 of table 1 of scroll area 1 to true
end if
end tell
end tell
end tell
end tell
tell application "System Preferences" to quit
on wait4window(this_title)
tell application "System Events"
tell process "System Preferences"
repeat with i from 1 to 60
if the name of window 1 is this_title then return true
delay 1
end repeat
end tell
end tell
return false
end wait4windowLet's double-check the amount of RAM in that machine. Click the Apple logo in the upper left corner & choose About This Mac. In the window that comes up, what's listed for RAM?
That machine will run Snow Leopard very nicely with 2GB of RAM. For it to run Mavericks, I would upgrade it to at least 4GB or more if it can handle it.
If I was in your position, I would run Snow Leopard for a while and see how well it serves you. If you want to upgrade, my personal opinion would be to go to Mountain Lion, rather than Mavericks, but that is simply because I found that Mavericks slowed one of my machines to a crawl and was not pleased with the performance. Went back to Mountain Lion and it's humming along.
~Lyssa -
Script for Free Space in Datafiles
Hi
Got the below script from metalink [130866.1] to identify free space within a data file.Couple of questions
1)Is dba_Free_Space an exact indicator of how much space is available in a file.
2) What is the significance of using blocks in vs using bytes.
cursor c_freespace(v_file_id in number) is
select block_id, block_id+blocks max_block
from dba_free_space
where file_id = v_file_id
order by block_id desc;
Thanks in advance for you help.
Script for checking backwards for free space at end of file
REM Script is meant for Oracle version 9 and higher
REM -----------------------------------------------
set serveroutput on
exec dbms_output.enable(1000000);
declare
cursor c_dbfile is
select f.tablespace_name,f.file_name,f.file_id,f.blocks,t.block_size
from dba_data_files f,
dba_tablespaces t
where f.tablespace_name = t.tablespace_name
and t.status = 'ONLINE'
order by f.tablespace_name,f.file_id;
cursor c_freespace(v_file_id in number) is
select block_id, block_id+blocks max_block
from dba_free_space
where file_id = v_file_id
order by block_id desc;
/* variables to check settings/values */
dummy number;
checkval varchar2(10);
block_correction number;
/* running variable to show (possible) end-of-file */
file_min_block number;
/* variables to check if recycle_bin is on and if extent as checked is in ... */
recycle_bin boolean:=false;
extent_in_recycle_bin boolean;
/* exception handler needed for non-existing tables note:344940.1 */
sqlstr varchar2(100);
table_does_not_exist exception;
pragma exception_init(table_does_not_exist,-942);
begin
/* recyclebin is present in Oracle 10.2 and higher and might contain extent as checked */
begin
select value into checkval from v$parameter where name = 'recyclebin';
if checkval = 'on'
then
recycle_bin := true;
end if;
exception
when no_data_found
then
recycle_bin := false;
end;
/* main loop */
for c_file in c_dbfile
loop
/* initialization of loop variables */
dummy :=0;
extent_in_recycle_bin := false;
file_min_block := c_file.blocks;
begin
<<check_free>>
for c_free in c_freespace(c_file.file_id)
loop
/* if blocks is an uneven value there is a need to correct with -1 to compare with end-of-file which is even */
block_correction := (0-mod(c_free.max_block,2));
if file_min_block = c_free.max_block+block_correction
then
/* free extent is at end so file can be resized */
file_min_block := c_free.block_id;
else
/* no more free extent at end of file, file cannot be further resized */
exit check_free;
end if;
end loop;
end;
/* check if file can be resized, minimal size of file 16 blocks */
if (file_min_block = c_file.blocks) or (c_file.blocks <= 16)
then
dbms_output.put_line('Tablespace: '||c_file.tablespace_name||' Datafile: '||c_file.file_name);
dbms_output.put_line('cannot be resized no free extents found');
dbms_output.put_line('.');
else
/* file needs minimal no of blocks which does vary over versions */
if file_min_block < 16
then
file_min_block := 16;
end if;
dbms_output.put_line('Tablespace: '||c_file.tablespace_name||' Datafile: '||c_file.file_name);
dbms_output.put_line('current size: '||(c_file.blocks*c_file.block_size)/1024||'K'||' can be resized to: '||round((file_min_block*c_file.block_size)/1024)||'K (reduction of: '||round(((c_file.blocks-file_min_block)/c_file.blocks)*100,2)||' %)');
/* below is only true if recyclebin is on */
if recycle_bin
then
begin
sqlstr:='select distinct 1 from recyclebin$ where file#='||c_file.file_id;
execute immediate sqlstr into dummy;
if dummy > 0
then
dbms_output.put_line('Extents found in recyclebin for above file/tablespace');
dbms_output.put_line('Implying that purge of recyclebin might be needed in order to resize');
dbms_output.put_line('SQL> purge tablespace '||c_file.tablespace_name||';');
end if;
exception
when no_data_found
then null;
when table_does_not_exist
then null;
end;
end if;
dbms_output.put_line('SQL> alter database datafile '''||c_file.file_name||''' resize '||round((file_min_block*c_file.block_size)/1024)||'K;');
dbms_output.put_line('.');
end if;
end loop;
end;
Example output for Oracle version 9 and higher:
Tablespace: TEST Datafile: /oradata/v112/test01.dbf
cannot be resized no free extents found
Tablespace: UNDOTBS1 Datafile: /oradata/v112/undotbs01.dbf
current size: 9384960K can be resized to: 106496K (reduction of: 98.87 %)
SQL> alter database datafile '/oradata/v112/undotbs01.dbf' resize 106496K;
Tablespace: USERS Datafile: /oradata/v112/users01.dbf
current size: 328960K can be resized to: 117248K (reduction of: 64.36 %)
Extents found in recyclebin for above file/tablespace
Implying that purge of recyclebin might be needed in order to resize
SQL> purge tablespace USERS;
SQL> alter database datafile '/oradata/v112/users01.dbf' resize 117248KHi
Got the below script from metalink [130866.1] to identify free space within a data file.Couple of questions
1)Is dba_Free_Space an exact indicator of how much space is available in a file.
2) What is the significance of using blocks in vs using bytes.
cursor c_freespace(v_file_id in number) is
select block_id, block_id+blocks max_block
from dba_free_space
where file_id = v_file_id
order by block_id desc;
Thanks in advance for you help.
Script for checking backwards for free space at end of file
REM Script is meant for Oracle version 9 and higher
REM -----------------------------------------------
set serveroutput on
exec dbms_output.enable(1000000);
declare
cursor c_dbfile is
select f.tablespace_name,f.file_name,f.file_id,f.blocks,t.block_size
from dba_data_files f,
dba_tablespaces t
where f.tablespace_name = t.tablespace_name
and t.status = 'ONLINE'
order by f.tablespace_name,f.file_id;
cursor c_freespace(v_file_id in number) is
select block_id, block_id+blocks max_block
from dba_free_space
where file_id = v_file_id
order by block_id desc;
/* variables to check settings/values */
dummy number;
checkval varchar2(10);
block_correction number;
/* running variable to show (possible) end-of-file */
file_min_block number;
/* variables to check if recycle_bin is on and if extent as checked is in ... */
recycle_bin boolean:=false;
extent_in_recycle_bin boolean;
/* exception handler needed for non-existing tables note:344940.1 */
sqlstr varchar2(100);
table_does_not_exist exception;
pragma exception_init(table_does_not_exist,-942);
begin
/* recyclebin is present in Oracle 10.2 and higher and might contain extent as checked */
begin
select value into checkval from v$parameter where name = 'recyclebin';
if checkval = 'on'
then
recycle_bin := true;
end if;
exception
when no_data_found
then
recycle_bin := false;
end;
/* main loop */
for c_file in c_dbfile
loop
/* initialization of loop variables */
dummy :=0;
extent_in_recycle_bin := false;
file_min_block := c_file.blocks;
begin
<<check_free>>
for c_free in c_freespace(c_file.file_id)
loop
/* if blocks is an uneven value there is a need to correct with -1 to compare with end-of-file which is even */
block_correction := (0-mod(c_free.max_block,2));
if file_min_block = c_free.max_block+block_correction
then
/* free extent is at end so file can be resized */
file_min_block := c_free.block_id;
else
/* no more free extent at end of file, file cannot be further resized */
exit check_free;
end if;
end loop;
end;
/* check if file can be resized, minimal size of file 16 blocks */
if (file_min_block = c_file.blocks) or (c_file.blocks <= 16)
then
dbms_output.put_line('Tablespace: '||c_file.tablespace_name||' Datafile: '||c_file.file_name);
dbms_output.put_line('cannot be resized no free extents found');
dbms_output.put_line('.');
else
/* file needs minimal no of blocks which does vary over versions */
if file_min_block < 16
then
file_min_block := 16;
end if;
dbms_output.put_line('Tablespace: '||c_file.tablespace_name||' Datafile: '||c_file.file_name);
dbms_output.put_line('current size: '||(c_file.blocks*c_file.block_size)/1024||'K'||' can be resized to: '||round((file_min_block*c_file.block_size)/1024)||'K (reduction of: '||round(((c_file.blocks-file_min_block)/c_file.blocks)*100,2)||' %)');
/* below is only true if recyclebin is on */
if recycle_bin
then
begin
sqlstr:='select distinct 1 from recyclebin$ where file#='||c_file.file_id;
execute immediate sqlstr into dummy;
if dummy > 0
then
dbms_output.put_line('Extents found in recyclebin for above file/tablespace');
dbms_output.put_line('Implying that purge of recyclebin might be needed in order to resize');
dbms_output.put_line('SQL> purge tablespace '||c_file.tablespace_name||';');
end if;
exception
when no_data_found
then null;
when table_does_not_exist
then null;
end;
end if;
dbms_output.put_line('SQL> alter database datafile '''||c_file.file_name||''' resize '||round((file_min_block*c_file.block_size)/1024)||'K;');
dbms_output.put_line('.');
end if;
end loop;
end;
Example output for Oracle version 9 and higher:
Tablespace: TEST Datafile: /oradata/v112/test01.dbf
cannot be resized no free extents found
Tablespace: UNDOTBS1 Datafile: /oradata/v112/undotbs01.dbf
current size: 9384960K can be resized to: 106496K (reduction of: 98.87 %)
SQL> alter database datafile '/oradata/v112/undotbs01.dbf' resize 106496K;
Tablespace: USERS Datafile: /oradata/v112/users01.dbf
current size: 328960K can be resized to: 117248K (reduction of: 64.36 %)
Extents found in recyclebin for above file/tablespace
Implying that purge of recyclebin might be needed in order to resize
SQL> purge tablespace USERS;
SQL> alter database datafile '/oradata/v112/users01.dbf' resize 117248K -
Creating a script to purge particular cursor in shared pool
hi Guys, not good in scripting need help
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Solaris: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
SQL> !uname -a
SunOS 5.10 Generic_142909-17 sun4u sparc SUNW,SPARC-Enterprise
SQL>
we want to purge the cursor for particular sql id if the version_count exceeds more than 100 in shared pool.
So the action plan is
create a script and put in cron that will
select sql_id, version_count from v$sqlarea where sql_id ='32543gwegfdsg';
1 if version_count >100
then
select address, hash_value from v$sqlarea
where sql_id = '32543gwegfdsg';
ADDRESS HASH_VALUE
00000004FBDBE8D8 455331075
execute the procedure
exec sys.dbms_shared_pool.purge('&address, &hash_value','c')
Edited by: ricky on 19-Aug-2011 12:43 PM
Edited by: ricky on 19-Aug-2011 12:43 PM
Edited by: ricky on 19-Aug-2011 1:00 PMexec sys.dbms_shared_pool.purge('&address, &hash_value','c')is V11.1 that much different from V11.2 for PURGE arguments?
SQL> desc dbms_shared_pool
PROCEDURE ABORTED_REQUEST_THRESHOLD
Argument Name Type In/Out Default?
THRESHOLD_SIZE NUMBER IN
PROCEDURE KEEP
Argument Name Type In/Out Default?
NAME VARCHAR2 IN
FLAG CHAR IN DEFAULT
PROCEDURE PURGE
Argument Name Type In/Out Default?
NAME VARCHAR2 IN
FLAG CHAR IN DEFAULT
HEAPS NUMBER IN DEFAULT
PROCEDURE SIZES
Argument Name Type In/Out Default?
MINSIZE NUMBER IN
PROCEDURE UNKEEP
Argument Name Type In/Out Default?
NAME VARCHAR2 IN
FLAG CHAR IN DEFAULT -
Hi All,
i got this following requiring requirement for the modifying a script for packing list,
this is the logic i have to include:
b. Remove the carton ID & box ID from the print out, the line item should just print the total delivery quantity, do not split the printing by different box ID or carton ID.
<b>i. Delivery Item= LIPS-POSNR
ii. Delivery Qty for Item = LIPSD-G_LFIMG= LIPSD-PIKMG</b>
<b>c. Add Total Boxes for each item, this should be a calculation field for each material HUMV4-MATNR, count how many handling unit VEKPVB-EXIDV has been used to pack the same material , output the total boxes for each delivery item.
</b>d. <b>Add Gross Weight for each item , retrieve data from LIPS-BRGEW</b>
e. Add Net weight to the print out, below the gross weight retrieve data from LIKP-NTGEW
f. For Net Weight & Gross Weight all convert to KG before output on the print out
can any body help me what the exact bussiness flow i have to follow and any necessary hints on this
Message was edited by:
ram gHi Ram,
You have to take the help of the functional consultant also and take the printout of the existing form for the packing list and note down all the changes to be done on the hard copy taken first.
then search in the script for the respective windows and for the respective fields in textelements of the script
One delivery may have multiple Handling Units
the link is VEPO-VBELN = LIPS-VBELN
from HU item table VEPO take the delivery no and link it with LIPS and LIKP table
What I understood is In Packing list the present data is coming from Delivery
but they wants to print certain things based on delivery and certain based on Handling Unit data
1.Remove the HU number from the print(Box id)-VEKP-EXIDV
2.Qty is printing based on HU remove that
now just print the qty based on delivery(sum of all items LIPS-LFIMG)
3. Add total boxes for each item(means no of HU's for each Delivery)
4. Take the Item wise gross weight from LIPS (brgew)
5.Take netweight from LIKP
6.Convert the unit of the Weight to KG
using a fun module UNIT_CONVERSION_SIMPLE
There may be already data fetching from the respective tables in the script check for the same and use
Otherwise to write the code you have to use the external subroutines to write some small program if extra coding is required to get the data from other tables
Hope this helps
Regards
Anji -
Hi,
Struggling with Numbers. I believe the solution lies in an applescript. Unfortunately I'm not really familiar with applescript. So, for me, it's like inventing the wheel.
What I would like is this : a table in which I enter a row of data (dates, names, codes, text, etc). Then via a button or (preferably) a code I want this row to be copied, in another (secured) table an additional row opened and to be filled with this data. Would be nice if the data in the first table could be cleared after that. Not essential. Is this possible with applescript? If so, can someone give me something to get me started?
Thanks
MarcelHello
Here's the requested script.
Specify the destination folder's POSIX path in variable dst in _main(). Currently it is set to ~/Desktop/test. Note that ~ (tilde) notation for home directory is NOT supported in AppleScript. The pdf name is obtained from sheet 6's table 1's cell "C5". Note that : (colon) cannot be used in HFS file name and so it is replaced with . (period) here.
Tested with Numbers v2.0.5 under OSX 10.6.8.
Hope this may help,
H
PS. If you're using 10.9, it appears very complicated to enbale GUI scripting for applets or services due to its demanding kindergarten requirements.
cf.
http://macosxautomation.com/mavericks/guiscripting/index.html
_main()
on _main()
set dst to (path to home folder)'s POSIX path & "Desktop/test" -- # POSIX path of destination directory (predefined)
--set dst to (choose folder with prompt "Choose destination folder")'s POSIX path -- # or choose destination directory at run-time
set p2d to (path to desktop)'s POSIX path -- POSIX path of desktop
-- (1) save table as pdf on desktop
tell application "Numbers"
tell document 1
tell sheet 6
tell table 1
--set pdfname to (cell "C5"'s value as Unicode text) & ".pdf" -- [1]
set pdfname to my copy_as_text(cell "C5") & ".pdf" -- to get displayed value; # see [1]
set pdfname to my _gsub(pdfname, ":", ".") -- [2]
my select_table(it)
set pdfname_used to my save_selection_as_pdf(pdfname, {_replace:true})
end tell
end tell
end tell
end tell
-- (2) move saved pdf to destination directory (replacing existing file)
set pdfname_used_posix to _gsub(pdfname_used, "/", ":") -- [3]
do shell script "mv -f " & (p2d & pdfname_used_posix)'s quoted form & " " & dst's quoted form
[1] (cell's value) property can be different than displayed value and there's no (cell's displayed value) property;
thus the only way to get cell's displayed value is to select the cell, perform copy, and get value from clipboard.
[2] : (colon) is reserved in HFS path; here it is replaced with . (period).
[3] / (solidus) is reserved in POSIX path; / in HFS path is to be represented by : (colon) in POSIX path.
end _main
on save_selection_as_pdf(pdfname, {_replace:_replace})
string pdfname : output pdf file name (pdfname = "" denotes default name, e.g., "Untitled.pdf")
boolean _replace : true to replace existing pdfname, false otherwise
return string or boolean : pdf name actually saved in if operation is not canceled, false otherwise
* pdf file is saved in ~/Desktop
* pdf name actually saved in may be different than the given pdfname, e.g., : is replaced with - by Preview.app
* return value is false iff _replace = false and pdfname already exists
script o
property _canceled : false
property _preview_was_running : application "Preview" is running
-- (1) copy current selection
tell application "Numbers"
my _keystroke(it, "c", {command down}, 0.2) -- copy current selection
end tell
-- (2) make new pdf document from clipboard in Preview.app
tell application "Preview"
my _keystroke(it, "n", {command down}, 0.2) -- new pdf document from clipboard
my _keystroke(it, "s", {command down}, 0.2) -- save
end tell
-- (3) save front pdf document in Preview.app
tell application "System Events"
tell process "Preview"
keystroke "d" using {command down} -- desktop
tell (window 1 whose subrole = "AXStandardWindow")
tell sheet 1 -- save sheet
if pdfname ≠ "" then set text field 1's value to pdfname
set pdfname_used to text field 1's value
click button 1 -- Save
delay 0.1
repeat while exists
delay 0.2
tell sheet 1 -- alert sheet (already exists)
if exists then
if _replace then
click button 1 -- Replace
else
click button 2 -- Cancel
set _canceled to true
end if
end if
end tell
if _canceled then click button 2 -- Cancel
end repeat
end tell
end tell
end tell
end tell
-- (4) close or quit Preview.app
tell application "Preview"
if _preview_was_running then
my _keystroke(it, "w", {command down}, 0.2) -- close
else
my _keystroke(it, "q", {command down}, 0.2) -- quit
end if
if _canceled then my _keystroke(it, space, {}, 0.2) -- don't save changes; # see [1]
end tell
-- (5) activate Numbers.app
tell application "Numbers" to activate
if not _canceled then
return pdfname_used
else
return false
end if
end script
tell o to run
[1] this may not work as expected or even fail under 10.7 or later due to its auto-save behaviour.
end save_selection_as_pdf
on copy_as_text(_range)
reference _range : target range
return string : copied value of the range
* this handler destroys the current contents of clipboard
* this handler will change the current selection range to _range
tell application "Numbers"
set _table to (_range as record)'s every reference's item 1
set _sheet to (_table as record)'s every reference's item 1
my select_sheet(_sheet) -- [1]
tell _table
set selection range to _range
end tell
my _keystroke(it, "c", {command down}, 0.2)
end tell
the clipboard as Unicode text
[1] this is required to swtich current sheet
end copy_as_text
on select_table(_table)
reference _table : table object of Numbers
tell application "Numbers"
set _sheet to (_table as record)'s every reference's item 1
my select_sheet(_sheet) -- [1]
tell _table
set selection range to cell 1
end tell
my _keystroke(it, return, {command down, control down}, 0.2)
end tell
[1] this is required to swtich current sheet
end select_table
on select_sheet(_sheet)
reference _sheet : sheet object of Numbers
set _name to _sheet's name
tell application "System Events"
tell process "Numbers"
set frontmost to true
tell (window 1 whose subrole = "AXStandardWindow")
tell splitter group 1
tell splitter group 1
tell scroll area 1
tell outline 1
tell (row 1 whose group 1's static text 1's value = _name)
set selected to true
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end select_sheet
on _keystroke(_app, _key, _modifiers, _delay)
reference _app : application reference
string _key : character(s) to be keystroked [1]
list _modifiers : list of modifier key to be pressed; enumerations are
command down
option down
shift down
control down
number _delay : post-delay amount [sec]
[1] Character must be present on the current keyboard layout. Otherwise, it is replaced by 'a'.
tell _app to activate
tell application "System Events"
tell (process 1 whose bundle identifier = (_app's id))
keystroke _key using _modifiers
end tell
end tell
if _delay > 0 then delay _delay
end _keystroke
on _gsub(t, s, r)
string t, s, r : source string, search string, replace string
return string : every occurence of s being replaced by r in t
return _join(r, _split(s, t))
end _gsub
on _split(d, t)
string or list d : separator(s)
string t : source string
return list : t splitted by d
local astid0, tt
try
set {astid0, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {} & d}
set tt to t's text items
set AppleScript's text item delimiters to astid0
on error errs number errn
set AppleScript's text item delimiters to astid0
error errs number errn
end try
return tt
end _split
on _join(d, tt)
string d : separator
list tt : source list
return string : tt joined with d
local astid0, t
try
set {astid0, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {} & d}
set t to "" & tt
set AppleScript's text item delimiters to astid0
on error errs number errn
set AppleScript's text item delimiters to astid0
error errs number errn
end try
return t
end _join -
Where can i find start/stop scripts for all SAP instances
Hi,
I installed CI, DB and Dialog instance on a standalone S10 machine and i could see start scripts under /sapmnt/RAM/profile
START_DVEBMGS09_hostSAP
START_D24_hostSAP
But i cann't see stop scripts for the above and also i cann't see start and stop scripts for SAP DB instance. Could some one point me where i can find them when everything is installed on a single box.
Thanks,
RamUSAGE: STARTSAP.EXE name=<SID> nr=<SYSNR> SAPDIAHOST=<host>
FURTHER INFORMATION:
- The executable sapstart.exe must be in the same directory
when you start sap instacne, it will check db instance first, if db instance not start , it will automatic start db instance then sap instance.
vice visa :
stopsap is alos can be used. -
Creating SQL-Loader script for more than one table at a time
Hi,
I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
It looks like I can create SQL-Loader scripts for all the tables
or for one table at a time. If I want to create SQL-Loader
scripts for 5-6 tables, I have to either create script for all
the tables and then delete the unwanted tables or create the
scripts for one table at a time and then merge them.
Is there a simple way to create migration scripts for more than
one but not all tables at a time?
Thanks,
Prashant RaneNo there is no multi-select for creating SQL-Loader scripts.
You can either create them separately or create them all and
then discard the one you do not need. -
error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable.
I am creating many site collections reading records from sharepoint list using powershell in sharepoint online tenant (office 365).
Few site collections are created and then getting above error so this error record will be skipped then few succeeding record processed then again getting error.
pattern is like:
success
success
success
success
Error
success
success
success
success
success
success
error
successHi,
As it is an online environment, to troubleshoot this issue in an easier way, I suggest you contact Office 365 Support to see if there is any useful information in
the log files in the server side:
https://support.office.com/en-us/article/Contact-Office-365-for-business-support-32a17ca7-6fa0-4870-8a8d-e25ba4ccfd4b?ui=en-US&rs=en-US&ad=US
Best regards
Patrick Liang
TechNet Community Support -
Custom calculation script for checkboxs
Hello,
Can anyone help me out with custom calculation script for this? I have two mutually exclusive checkboxes that, when checked, I want to populate data into other text fields.
If Checkbox1 is checked:
Company1=Warehouse Alpha
Address1=1234 Any Street
City/State/Zip1= Los Angeles, CA 90020
Contact Name1= Mr. Nice Guy
Phone Number1= 213-854-8565
Email1=[email protected]
If Checkbox2 is checked:
Company2=Warehouse Beta
Address2= 5678 Awesome Blvd.
City/State/Zip2= San Bernardino, CA 96545
Contact Name2= Mr. Handsome
Phone Number2= 909-824-8265
Email2=[email protected]
Thanks,
BryanSo one has two check boxes and one wants them to be mutually exclusive. Name them the same and change the export value of the field. Try it and observe what happens as you check the different check boxes.
You have described what happens if either box is checked but what happens when a checked box Is unckecked?
One can place scripts in many locations. I would use a mouse up action for both the check boxes, use the same script for both check boxes.
I would assume you are using the following names for the fields to populate:
Company
Address
CityStateZip
ContactName
PhoneNumber
Email
// Mouse up action for both check boxes;
// initial value for the fields:
this.getField("Company"),value = "";
this.getField("CityStateZip"),value = "";
this.getField("ContactName"),value = "";
this.getField("PhoneNumber"),value = "";
this.getField("Email"),value = "";
// test for check box value for selected box;
if(event.value == 1) {
this.getField("Company"),value = "Warehouse Alpha";
this.getField("CityStateZip"),value = "1234 Any Street";
this.getField("ContactName"),value = "Los Angeles, CA 90020";
this.getField("PhoneNumber"),value = "213-854-8565";
this.getField("Email"),value = "[email protected]";
if(event.value == 2) {
this.getField("Company"),value = "Warehouse Beta";
this.getField("CityStateZip"),value = "5678 Awesome Blvd.";
this.getField("ContactName"),value = "San Bernardino, CA 96545";
this.getField("PhoneNumber"),value = "Mr. Handsome";
this.getField("Email"),value = "[email protected]";
// end Mouse up action for both check boxes; -
Sharepoint warmup script for https sites
we want to warm up https site which is based on sharepoint 2010.
When we run some sample powershells it shows access forbidden error so we are not able to warm up https site.
Its slow on first load so need some warmup script for https sites.
sharepointerJust ensure that the service account that you use to trigger the Powershell scripts has access to IIS and SharePoint. Most often, the SharePoint Farm account would be used for scheduling the warm up scripts on the WFE server.
I trust that answers your question...
Thanks
C
http://www.cjvandyk.com/blog -
WSUS script for pending reboot possible addition - How
Hi, I am found script for pending reboot and script work perfectly. My problem is that script generate only pending computers reboot for master wsus server not for replica servers. Can I modify this script to generate pending reboot for all replica servers on
one place(wsus master server) or I must run this script on every replica server. This is script:
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
if (!$wsus) {
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
$computerScope = new-object Microsoft.UpdateServices.Administration.ComputerTargetScope;
$computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
$updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$computers = $wsus.GetComputerTargets($computerScope);
$report = @()
$computers | foreach-object {
$computer = $_.FullDomainName
$updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
$updatesForReboot | foreach-object {
$temp = "" | Select Computer,Update
$temp.Computer = $computer
$temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
$report += $temp
$report | Select "Computer","Update" | Export-Csv -Path c:\..PendingReboot.csv -Delimiter 1 -NoTypeInformationModified script
work great. I have report from all replica server and master server after new updates
from today. I am add mail option and finaly this is what I am modify:
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
if (!$wsus) {
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
$computerScope = new-object Microsoft.UpdateServices.Administration.computerTargetScope;
$computerScope.IncludeDownstreamComputerTargets = $true
$computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
$updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$computers = $wsus.GetComputerTargets($computerScope);
$report = @()
$computers | foreach-object {
$computer = $_.FullDomainName
$updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
$updatesForReboot | foreach-object {
$temp = "" | Select Computer,Update
$temp.Computer = $computer
$temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
$report += $temp
$report | Select "Computer","Update" | Export-Csv -Path c:\yourpath...PendingReboot.csv -Delimiter 1 -NoTypeInformation
$smtpServer = "your mail server"
$att = "c:\yourpath...PendingReboot.csv"
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = "[email protected]"
$msg.To.Add("[email protected]")
$msg.Subject = "Pending Reboot"
$msg.Body = "Your msg"
$msg.Attachments.Add($att)
$smtp.Send($msg) -
Running Permission Scripts for App-V packages in VDI environment
Hi
We use App-V 5.0 SP1 in VDI environment.
We have a major problem with packages' permissions
Our users don't have administrative privileges on their machines.
As the option for "Security Descriptors" is discontinued, the only way to give permissions to a folder in a package is to use the VFSCACLS.vbs as a startup script of a package.
This way the first time users launch an application they're prompt to reopen it, and the second time they can use the application with the needed permissions.
The problem:
The script saves those permission changes under LOCALAPPDATA\AppV...
Therefore, everytime the users logoff the folder is deleted (VDI...) and again, they must run the script for the first again to get the permissions back after logon!
We cannot roam the LOCALAPPDATA\AppV folder as its size can be dozens of GBs...
Folder permissions with group policy is also not a solution, as the folder name changes everytime we upgrade a package and it's impossible to follow with hundreds of packages.
So it's either we're missing something critical in the architecture with VDI environment or there's a normal solution for these situations.
Would love to get some help
Thanks
Tamir LevyHi Nicke
that's what I did! the problem is that I find my self over and over again want to sequence packages in App-V 5.0 and forced to sequence it in App-V 4.6.
I really hope that it wasn't App-V team's goal. announcing App-V 5.0 and tell us it doesn't support many things so we will still need App-V 4.6 forever.
I have to maintain 2 different App-V environments with 4 different servers , 4 different sequencers and 2 clients on each computer. it doesn't make any sense for me to forced to stay with both of the versions forever.
correct me if I'm wrong but App-V 4.6 is a legacy application. the new versions cover only support on newer operating systems and nothing more. I won't be surprised if in the next version of MDOP won't come with App-V 4.6 anymore and Microsoft will announced
it's unsupported very soon.
Every time I open a ticket with MS Support the best thing I get is "It's a known issue, we can't tell when it will be fixed"
can you help me more ? move it forward to other people from the inside? at least agree with me that something is not as expected in App-V 5.0... :(
I love the technology, I believe in it, I'm kinda depend on it and I only want it to be better
Tamir Levy -
One script for multiple loaded movie clips
Hello,
I am sure that this has been asked or answered before, but
could not locate the correct response.
Problem:
There are 20 movie clips loaded onto the stage through
actionscript. I have 20 different onPress scripts to start the drag
for each (which also contain custom variable).
Problem, I have one single onRelease script which is to be
used for each, but do now wish to give 20 custom handled scripts.
Can I somehow use certain scripting for using one single
generic script for the onRelease? So no matter what was released it
will go through this one script.
Thanks
Dlike this...
activate
set the_folder to choose folder with prompt "Select the folder you want to add folders to..."
tell application "Finder"
set the_name to "Name"
set the_count to 3
repeat with this_num from 1 to the_count
set new_num to this_num as string
if (count new_num) is 1 then set new_num to "0" & new_num
make new folder at the_folder with properties {name:the_name & " " & new_num}
end repeat
end tell
Maybe you are looking for
-
ZIndex issue with thumbnails in spry gallery
I am seeing problems with the z-index (zIndex) of the thumbnails for the gallery demo in IE browsers (IE6 XP and IE7 Vista)... works fine in Firefox and others, of course. If you reduce the margin around the thumbnails div... the image is "under" the
-
HR_INFOTYPE_OPERATION adding the COBL structure.
hello, I need to modify an 2006 infotype created by PA30. I use the MF RP_PLANT_DATA_UPDATE_TABLES to create the assob and asshr entries for that infotype, that´s ok. Next i try to place the pa2002-REFEX = 'X' with the FM HR_INFOTYPE_OPERATION but,
-
Hi, I am trying to setup email alerts on x4500 with Solaris 10 as OS. Is there any way that I could get the alerts in case of any hardware failures. I just found that one of the PS is not working. But that I was able to find out when I went to the se
-
Convert a Windows license into a Mac license
Hello, i accidentally bought a windows version of PE12. could someone tell me how to change it into a mac version?
-
Hi, I've placed a native photoshop image into Indesign and when I send it to print, I see a faint background. I read that transparency caused this to happen. Is there a work-around in removing the background. Thanks, Sutagami