To drop a running procedure
Dear guys
i made a procedure for sending mails in loop and when i executed it...its running continuosly,even i closed session,its keep on sending mail as somewhere the loop is wrong.
Is there anyway to stop running the execution of the procedure. as i am unable to drop it with command
drop procedure procedure name
os-linux
db-10.2.0.4
SELECT a.username,serial#,c.os_user_name, a.sid,c.session_id,a.terminal,
b.object_id,substr(b.object_name,1,40) object_name
from v$session a, dba_objects b, v$locked_object c
where a.sid = c.session_id
and b.object_id = c.object_id
ALTER SYSTEM KILL SESSION 'sid,serial#';
Similar Messages
-
Error while running procedure for refreshing AWS
Hello There,
I am using a procedure which consists the script of refreshing the analytic workspace. I call this procedure from Business objects data services for automatic refresh.
It used to work perfectly until the recent changes implemented.
The issue is, when I run the procedure the cube refreshes successfully. When the same procedure is called from BODS, it shows an error.
Error is :: XOQ-01601: error while loading data for cube dimension "BI_PETRA_DWH.ACTIVITY_TIME" into analytic workspace
Underlying DB error is : ORA-01858: a non -numeric character was found where a numeric was expected.
I dont get this error if I run procedure directly in SQL developer.
I verified attribues of dimension, there is only one numeric attribute and it is mapped to only numeric columns of view.
Can you please help me fixing this issue?
Thanks in advance.Hello There,
I am using a procedure which consists the script of refreshing the analytic workspace. I call this procedure from Business objects data services for automatic refresh.
It used to work perfectly until the recent changes implemented.
The issue is, when I run the procedure the cube refreshes successfully. When the same procedure is called from BODS, it shows an error.
Error is :: XOQ-01601: error while loading data for cube dimension "BI_PETRA_DWH.ACTIVITY_TIME" into analytic workspace
Underlying DB error is : ORA-01858: a non -numeric character was found where a numeric was expected.
I dont get this error if I run procedure directly in SQL developer.
I verified attribues of dimension, there is only one numeric attribute and it is mapped to only numeric columns of view.
Can you please help me fixing this issue?
Thanks in advance. -
Fax remmitance issue during teh Payemnt run procedure
Hi Gurus ,
There is a scenario : whenever a payment run is executed through F110 , the payments information of vendors or customers are sent to BANK .
now there is an issue that fax remmitance information has not beeen recievd by the same individual
How do we check the settings of automatic payment program :in order to check teh fax remmitance details being
sent to Vendors while payment ?
Does this kind of sending information deals with a configured workflow in system ?
Could someone guide me in : Where do we find the configuration settings for Automatic payemnt run procedure?
Thanks
KylieTishaHi Gurus ,
this is a question about Payemnt Run :-
While conducting the payemnt run a variant is being used , which populates paying company code , company code posting date etc parameters and the printer details also where the payment remittances needs to be sent .
Payment remittances will include : Fax detailsof vendors etc.
Fax remittances : vendor fax details as entered in FK03 are supposed to be received at the printer .
Now could anybody guide me in the information :-
Fax details as entered in the Vendor Master data will be utilized whileprinting this remittances or do we need toalso mention
the Standard Communication method : FAX ? Is there a relation between the fields in XK03 Standard Communication method and the Tel Details/Fax Details/Email Detials being entered for the Vendor ?
now along with vendor fax details do we need to mention the standard communication method as ' FAX ' also in XK03
so that Payment Run can send only the fax details .
Any information is appreciable
Please help.
Thanks
Kylietisha
Edited by: kylietisha on Jul 1, 2010 9:55 PM -
How run Procedure in SQL Developer?
I need run procedure in SQL Developer with parameter : 2009
create or replace PROCEDURE "update_table" (ff_year in varchar2) AS
CURSOR c_update IS
select DISTINCT P.mafew name, u.frew nameone, t.greddf, .........
I click green button RUN and have new window Run PL/SQL. Where in this script I need to print 2009?
DECLARE
FF_YEAR VARCHAR2(200);
BEGIN
FF_YEAR := NULL;
update_table(
FF_YEAR => FF_YEAR
END;Hi,
user10886774 wrote:
Thanks all!
I can run the procedure like 1 or 2 example? Is it right?
1 like Run Script
EXEC "UPDATE_TABLE" ('2009');
2 click RUN on UPDATE_TABLE procedure
DECLARE
FF_YEAR VARCHAR2(200);
BEGIN
FF_YEAR := '2009';
UPDATE_TABLE(
FF_YEAR => FF_YEAR
END;
What is the name of the procedure?
Is it update_tabe (all small letters)? If so, you must reference it as "update_table" (all small letters, inside double-quotes).
Is it UPDATE_TABLE (all capital letters)? If so, you have the choice of referencing it as "UPDATE_TABLE" (all capital letters, inside double-quotes) or as update_table, or Update_Table, or UPDATE_TABLE, or uPdAtE_taBle, or ... (any kind of letters, without quotes).
How about commit after?How about it?
What is the question?
If you want to commit, say COMMIT or click on the COMMIT icon. -
Run procedure - error handling
Hi,
I 've created a run procedure to fire off my test cases. In cases of success he puts ' PASS', in case of failure he puts 'FAIL' as status , however when the sql query is invalid he currently stops the procedure and RAISES the error.
I would like to let the procedure continue till the end and as status insert 'ERRO' for that query rather than that the procedure stops and raises teh error. This, to enable the procedure to be run completely even if a test case is badly written.
Could someone pls help out?
thnx
CREATE OR REPLACE PROCEDURE RUN_TEST_CASES
AS
cursor c_etrm_test_cases
is
select test_group,
test_id,
test_type,
test_desc,
test_level,
test_query,
test_owner,
test_creation,
expected_result
from etrm_test_cases;
v_result number (10);
v_tstart timestamp (0);
v_tend timestamp (0);
v_cresult char (4);
v_remark varchar2 (2000);
v_runid number (3);
begin
--check for active run_id
select a.run
into v_runid
from zainet_dev_mig.ZN_TEC_INFRA_RUN a
where a.active = 'Y';
for r_etrm_test_cases in c_etrm_test_cases
loop
--start timestamp
select CURRENT_TIMESTAMP (0) into v_tstart from DUAL;
--execute the query - test case
begin
execute immediate TO_CHAR (r_etrm_test_cases.test_query)
into v_result;
exception
when others
then raise;
end;
--was the result as expected?
if v_result = r_etrm_test_cases.expected_result
then
v_cresult := 'PASS';
v_remark := null;
else
v_cresult := 'FAIL';
v_remark :=
'Expected '
|| TO_CHAR (r_etrm_test_cases.expected_result)
|| ', got '
|| TO_CHAR (v_result);
end if;
--end timestamp
select CURRENT_TIMESTAMP (0) into v_tend from DUAL;
BEGIN
UPDATE ZAINET_DEV_MIG.etrm_test_log
SET ZAINET_DEV_MIG.etrm_test_log.result = v_result,
ZAINET_DEV_MIG.etrm_test_log.time_start = v_tstart,
ZAINET_DEV_MIG.etrm_test_log.time_end = v_tend,
ZAINET_DEV_MIG.etrm_test_log.status = v_cresult,
ZAINET_DEV_MIG.etrm_test_log.run_id = v_runid,
ZAINET_DEV_MIG.etrm_test_log.action = 'UPDATE'
WHERE ZAINET_DEV_MIG.etrm_test_log.test_id in (select test_id from ZAINET_DEV_MIG.etrm_test_cases);
EXCEPTION WHEN others
THEN
BEGIN
insert into ZAINET_DEV_MIG.etrm_test_log (test_group,
test_id,
test_type,
test_desc,
test_level,
test_query,
test_owner,
test_creation,
expected_result,
result,
status,
remark,
time_start,
time_end,
run_id,
action)
values (r_etrm_test_cases.test_group,
r_etrm_test_cases.test_id,
r_etrm_test_cases.test_type,
r_etrm_test_cases.test_desc,
r_etrm_test_cases.test_level,
r_etrm_test_cases.test_query,
r_etrm_test_cases.test_owner,
r_etrm_test_cases.test_creation,
r_etrm_test_cases.expected_result,
v_result,
v_cresult,
v_remark,
v_tstart,
v_tend,
v_runid,
'INSERT');
EXCEPTION when others
then raise;
end;
end;
commit;
end loop;
end run_test_cases;Edited by: BluShadow on 29-Jul-2011 13:39
added {noformat}{noformat} tags. Please read {message:id=9360002} to learn to do this yourself.It could be that the insert into etrm_test_log is raising another invalid number exception - completely unrelated to the first. You should have a full error stack which will point to the line number that is raising the exception.
Check the types of the variables against each column you are inserting.
Also with reference to the Merge that BluShadow mentioned, you've not really done anything about it. The very least you should do if you're not going to follow that advice is to get rid of the WHEN OTHERS and replace it with WHEN DUP_VAL_ON_INDEX. That is more precise than WHEN OTHERS...
/* Formatted on 01/08/2011 10:21:26 (QP5 v5.163.1008.3004) */
CREATE OR REPLACE PROCEDURE run_test_cases
AS
CURSOR c_etrm_test_cases
IS
SELECT test_group,
test_id,
test_type,
test_desc,
test_level,
test_query,
test_owner,
test_creation,
expected_result
FROM etrm_test_cases;
v_result NUMBER (10);
v_tstart TIMESTAMP (0);
v_tend TIMESTAMP (0);
v_cresult CHAR (4);
v_remark VARCHAR2 (2000);
v_runid NUMBER (3);
BEGIN
--check for active run_id
SELECT a.run
INTO v_runid
FROM zainet_dev_mig.zn_tec_infra_run a
WHERE a.active = 'Y';
FOR r_etrm_test_cases IN c_etrm_test_cases
LOOP
--start timestamp
SELECT CURRENT_TIMESTAMP (0) INTO v_tstart FROM DUAL;
--execute the query - test case
BEGIN
EXECUTE IMMEDIATE TO_CHAR (r_etrm_test_cases.test_query)
INTO v_result;
EXCEPTION
WHEN INVALID_NUMBER
THEN
INSERT INTO zainet_dev_mig.etrm_test_log (test_group,
test_id,
test_type,
test_desc,
test_level,
test_query,
test_owner,
test_creation,
expected_result,
result,
status,
remark,
time_start,
time_end,
run_id,
action)
VALUES (r_etrm_test_cases.test_group,
r_etrm_test_cases.test_id,
r_etrm_test_cases.test_type,
r_etrm_test_cases.test_desc,
r_etrm_test_cases.test_level,
r_etrm_test_cases.test_query,
r_etrm_test_cases.test_owner,
r_etrm_test_cases.test_creation,
r_etrm_test_cases.expected_result,
'ERROR: INVALID NUMBER',
'ERROR: INVALID NUMBER',
'CHECK QUERY - ERROR: INVALID NUMBER',
NULL,
NULL,
v_runid,
'ERROR: INVALID NUMBER');
END; --was the result as expected?
IF v_result = r_etrm_test_cases.expected_result
THEN
v_cresult := 'PASS';
v_remark := NULL;
ELSE
v_cresult := 'FAIL';
v_remark :=
'Expected '
|| TO_CHAR (r_etrm_test_cases.expected_result)
|| ', got '
|| TO_CHAR (v_result);
END IF;
--end timestamp
SELECT CURRENT_TIMESTAMP (0) INTO v_tend FROM DUAL;
BEGIN
INSERT INTO zainet_dev_mig.etrm_test_log (test_group,
test_id,
test_type,
test_desc,
test_level,
test_query,
test_owner,
test_creation,
expected_result,
result,
status,
remark,
time_start,
time_end,
run_id,
action)
VALUES (r_etrm_test_cases.test_group,
r_etrm_test_cases.test_id,
r_etrm_test_cases.test_type,
r_etrm_test_cases.test_desc,
r_etrm_test_cases.test_level,
r_etrm_test_cases.test_query,
r_etrm_test_cases.test_owner,
r_etrm_test_cases.test_creation,
r_etrm_test_cases.expected_result,
v_result,
v_cresult,
v_remark,
v_tstart,
v_tend,
v_runid,
'INSERT');
EXCEPTION
WHEN DUP_VAL_ON_INDEX
THEN
UPDATE zainet_dev_mig.etrm_test_log
SET zainet_dev_mig.etrm_test_log.result = v_result,
zainet_dev_mig.etrm_test_log.time_start = v_tstart,
zainet_dev_mig.etrm_test_log.time_end = v_tend,
zainet_dev_mig.etrm_test_log.status = v_cresult,
zainet_dev_mig.etrm_test_log.run_id = v_runid,
zainet_dev_mig.etrm_test_log.action = 'UPDATE'
WHERE zainet_dev_mig.etrm_test_log.test_id =
r_etrm_test_cases.test_id;
END;
COMMIT;
END LOOP;
END run_test_cases;HTH
David -
Hi all,
my need is to run procedure with one input parameter (date), for example
exec ZOO.PKG_Z60over.prepare(date '2012-01-27')1) this procedure accepts only 1 date, but I need period, for example
exec ZOO.PKG_Z60over.prepare(date '2012-01-27');
exec ZOO.PKG_Z60over.prepare(date '2012-01-28');
exec ZOO.PKG_Z60over.prepare(date '2012-01-29');2) my dates are stored in table calendar1, I'd like to select dates from table instead of typing
3) how do I run it without "exec" ?
Thanks ahead.marco wrote:
Hi all,
my need is to run procedure with one input parameter (date), for example
exec ZOO.PKG_Z60over.prepare(date '2012-01-27')1) this procedure accepts only 1 date, but I need period, for example
exec ZOO.PKG_Z60over.prepare(date '2012-01-27');
exec ZOO.PKG_Z60over.prepare(date '2012-01-28');
exec ZOO.PKG_Z60over.prepare(date '2012-01-29');2) my dates are stored in table calendar1, I'd like to select dates from table instead of typing
3) how do I run it without "exec" ?
Thanks ahead.You can write a PL/SQL block like this where you will query the table calender and loop through it and call the procedure for each row.
begin
for i in (select <date_column> from calender1)
loop
ZOO.PKG_Z60over.prepare(i.<date_column>);
end loop;
end;
/ -
Buffer limit running procedure
I am having an issue with buffer limits when running procedures. If I set the output limit to unlimited in the Dbms Output tab, I can then open a worksheet and write a piece of sql to run the procedure and the output is spooled to the tab.
The problem is when I have the procedure open and choose the run option in that window (not the run script option from a worksheet) the limit (default: 20000) appears to come back as the output no longer spools to the Dbms Output tab, it now spools to a log file in the Messages tab.
Is there a way to increase the output limit on these logs so I can get debug behaviour along with an unlimited output spool? I can always run these procedures from a standalone script but it would be really nice to have the option to run it from the edit procedure window.
Thanks,
DanielThis works, but I have to put this in to the run window myself, I was hoping for a setting that would stick. I will mark this helpful for now as it now allows me to do what I needed to do. I will upgrade it to correct if I don't get a better solution within a few days.
Thanks,
Daniel -
Creating wrapper procedures for Long running procedures
In SQL server, we can create a wrapper procedure to call long running procedure. Wrapper procedure calls long running procedure and returns to its calling application and give message "your request has been received and being processed. result will sent to your email-id." So user need not wait for complete execution for his request. From long running stored procedure we can send email to user stating all execution result he wants.
Is there any way to implement it in Oracle9i? Or any other technique to call such long running procedures asynchronously through wrapper procedure sothat user need not to wait and also avoid "request time out" error.This question would be better off posed in the Oracle Data Provider for .NET forum.
Christian -
Hi all,
how do I run procedure as another user?Just connect as that 'another user' and run the procedure?
If that isn't what you're looking for then explain in more details (database version, etc) please.
See:
{message:id=9360002}
edit
In addition to the other mentioned options:
You might want to check out CURRENT_SCHEMA.
"The CURRENT_SCHEMA parameter changes the current schema of the session to the specified schema. Subsequent unqualified references to schema objects during the session will resolve to objects in the specified schema. The setting persists for the duration of the session or until you issue another ALTER SESSION SET CURRENT_SCHEMA statement.
This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name."
http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_2013.htm#SQLRF53050
Edited by: Hoek on Mar 4, 2013 1:44 PM -
hi,
i need to drop unused stored procedures from our Oracle9i database.
How do I check and confirm that the stored procedures are no longer used by the application?
Our application is using jsp, servlet and ejb. Some stored procedures might also be called from other stored procedures, triggers and PRO*C programs.
best regards,
dayangYou are snookered in the absence of adequate documentation.
Some stored procedures might also be called from other stored procedures, triggers and PRO*C programsThat's the easy bit - you can find which database objects use other database objects using the USER/ALL/DBA_DEPENDENCIES views. But programs outside the database? No chance.
If you want to make yourself unpopular yoy could invalidate every single stored procedure and see who screams but that's not user friendly - besides some packages might only be used once a quarter, once a year even - financial routines are the obvious example.
If you have logging in place you might try switching it on, but I suspect you don't have that.
In short, if you don't know who's using a package you are better off leaving it in your schema. Just make a note for yourself to properly document your next system.
Cheers, APC -
Planning in planning run procedure doubt
Hi All,
I am new to APO i have a doubt for planning in planning run procedure.
I was going through the SCM250 PP/DS and i found this in the book for planning in planning run procedure
"You use this setting, for example, if you do not want to trigger production from the
ATP check in the CTP scenario for this product"
I lost in this.
Can some one please elaborate the meaning for above it would be highly appreciable?
Thanks
ShaiilShaiil,
In APO PP, there is bit of Master Data called "Planning Procedure". Planning Procedure can influence when planning is done. You can trigger a heuristic to be executed automatically, based on defined events. One of the events that can trigger an automatic heuristic is an ATP check Planning Procedures can be assigned to a Product in the Product Master.
Planning Procedure
http://help.sap.com/saphelp_scm70/helpdata/EN/64/dca63be2bc331be10000000a114084/frameset.htm
In APO, there is a specialized type of availability check (ATP) which is called Capable To Promise (CTP). In CTP, it is common to assign a Planning Procedure that immediately covers dependent requirements. This means that upon ATP, the system will generally automatically create a planned order, schedule it, and generate dependent demand.
Capable To Promise
http://help.sap.com/saphelp_scm70/helpdata/EN/4c/56297de7c33a0de10000000a42189c/frameset.htm
These types of automatic planning are totally separate from a planning run. It is possible to run a product line with only automatic planning, only planning run planning, or various combinations of both types of planning.
If you wish to learn about APO, you should first search through online help before posting a question.
Best Regards,
DB49 -
Automatic trigger to run procedure
I have created a procedure which I would like to be run automatically after some updates in another table. I know easiest way for automatic run of a procedure is by creating a job, though I assume by creating a trigger the same should be possible, correct? please advise? THANKS!!
CREATE OR REPLACE TRIGGER trigger_run_procedure
AFTER UPDATE ON zainet_dev_mig.zn_tec_infra_run
FOR each ROW
BEGIN
IF (:NEW.active = 'Y' and :NEW.TS_end is not null ) THEN
call run_test_cases ()
END IF;
END;
following error occurs :
13:29:37 ORA-24344: success with compilation error
13:29:37 4/9 PLS-00103: Encountered the symbol "RUN_TEST_CASES" when expecting one of the following:
13:29:37 := . ( @ % ;
13:29:37 The symbol ":=" was substituted for "RUN_TEST_CASES" to continue.
13:29:37 7/8 PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
13:29:37 begin case declare end exception exit for goto if loop mod
13:29:37 null pragma raise return select update while with
13:29:37 <an identifier> <a double-quoted delimited-identifier>
13:29:37 <a bind variable> << close current delete fetch lock insert
13:29:37 open rollback savepoint set sql execute commit forall merge
13:29:37 pipe
Edited by: 845498 on 2-aug-2011 4:32Hi,
You can run procedure without CALL
CREATE OR REPLACE TRIGGER trigger_run_procedure
AFTER UPDATE ON zainet_dev_mig.zn_tec_infra_run
FOR each ROW
BEGIN
IF (:NEW.active = 'Y' and :NEW.TS_end is not null ) THEN
run_test_cases;
END IF;
END; -
Can we teminate running procedure dynamically
Hi
I am running procedure where it is taking 2 hrs. I have to teminate it if it takes more than 1 hour for execution.
How do I implement this.The Large Hammer Approach simply says, "kill it!". This is done via the SQL alter system kill session '<sid>,<serial>'.
There are two very basic problems with this approach. It needs DBA privs as the ALTER SYSTEM command is endowed with godlike powers and need a godlike user to wield the command. It is just plain wrong to allow an application (or end-users/developers) to wield this command indiscriminately.
Killing the process does not solve the problem. It addresses the symptom. It does not fix anything.
That process runs for a good reason, right? There is some business reason that it is addressing. Else why have the process in the first place.
Killing that process means that business need is not satisfied.
So to address the problem, you need to
a) identify the actual business need the process needs to satisfy
b) determine whether the current process does it effectively/efficiently/optimally
c) re-write/re-design it if needed
d) identify bottleneck/performance issues with the process
e) resolve these
Obviously, not as easy as wielding The Large Hammer. But using a hammer to drive in screws makes an ugly mess.. and you risk serious injury to a thumb or finger or three..
It comes down to using the right tool for the job. Killing the process does not sound like the right tool. -
Hi,
Why I can't drop partiton from procedure? How can I do it?
SQL> alter table ama add partition p1 values ('1')
2 /
Table altered.
SQL>
SQL> create procedure partition_drop (partition_name varchar) is
2 begin
3 execute immediate 'alter table ama drop partition p'||partition_name||')';
4 end;
5 /
Procedure created.
SQL>
SQL> call partition_drop('1')
2 /
call partition_drop('1')
ERROR at line 1:
ORA-14048: a partition maintenance operation may not be combined with other operations
ORA-06512: at "AMA.PARTITION_DROP", line 3
SQL>
SQL> alter table ama drop partition p1
2 /
Table altered.Hi,
I have tried this and its working..
Create Table Part_Test(a number(2), b varchar2(30))
Partition by range (a)
(Partition part1 values less than (10) tablespace users,
Partition part2 values less than (20) tablespace users ,
Partition part3 values less than (30))
Begin
Execute Immediate 'Alter table part_test add partition part5 values less than (MAXVALUE)';
Execute Immediate 'Alter Table part_test drop partition part1';
end;
Thanks.... -
Drop the stored procedure having null schema
Hello All,
I have 2 SPs with same name but different schema id , one 1(default) and other is 20 but when i check in sys.schemas it give no record for schema_id 20.
i would like to drop the SP which has schema_id 20, i dont know the schema name for id 20 so not able to drop it.
Please help me out to remove\drop the SP which has null schema.What version of SQL Server and service pack are your running? I've never seen this but you might try first try restarting SQL to rule cache corruption. If the problem persists, below are some steps you can try.
Run the query below to get the schema name from the stored procedure CREATE statement:
SELECT m.definition
FROM sys.procedures AS p
JOIN sys.sql_modules AS m ON
m.object_id = p.object_id
WHERE OBJECT_SCHEMA_NAME(object_id) IS NULL;
Query sys.schemas to identify gaps in schema_id values less than 20. Create schemas with dummy names until schema_id 19 is assigned. Then create a schema with the name retrieved from the proc schema and verify it has been assigned schema_id
20. Finally, try to drop the proc using the schema-qualified name.
Is there anything unusual that might help explain what led to this problem. Maybe a transfer of objects from one schema to another that went awry?
Dan Guzman, SQL Server MVP, http://www.dbdelta.com
Maybe you are looking for
-
How can I transfer songs from a speakercraft jukebox to itunes
I recently purchased Apple TV and had Savant systems installed in my home. I have a Spekercraft jukebox with over 700 cd's loaded and want to transfer these to iTunes. What is the best way to accomplish this. I would be willing to pay a service to
-
Itune errors after update will not reinstall
it keeps saying "failed to start because MSVCR80.dll was not found reinstalling may fix" ... I tired and it says same thing what now ..i have 30 gig of music backed up to a seagate portible hard drive,,,,, do i just scrap this laptop
-
How to reflect the use of a custom cert in an unattended setup of FIM R2 SP1 Portal & Service?
Hi, When doing an unattended installation of FIM Portal & Service there is a parameter that indicates the certificate subject name to generate: 'CERTIFICATE_NAME'. But, the GUI-based setup shows a choice: Select a certificate located in the local cer
-
Missing features in Safari Windows
I was intrigued by the 1.6 performance increase over firefox, but unfortunately have been disappointed by missing features I have grown to love in firefox. Here are the things I wish Safari supported: 1) google suggestions in the google search box 2)
-
How do I check to see if we are using SOAP and how do I check to see if Mini Shall is on or off?