"GRANT CREATE PROCEDURE TO " not working

 
 Hi Team,
              I am using SQL Server 2012 Developer Edition.Recently got request to grant permission to  "Create Stored Procedure" to a developer.When I execute this query "GRANT CREATE PROCEDURE TO [DEVELOPER];"
It is not working again when the developer try to create a stored procedure Following error is displayed.I give the developer dbowner,ddladmin privileges also to test but the same below error is display.Can anybody guide me regarding this as it is high priority
Msg 262, Level 14, State 18, Procedure test, Line 1
CREATE PROCEDURE permission denied in database 'BASHA'.
 

              Following are the output for both the select queries.
1) BASHA  DATABASE 0CONNECT GRANT    
2) db_ddladmin
Membership in db_ddladmin should be sufficient. Below is a script that
demonstrates two ways to grant a user rights to create procedures. You can
use this script for your troubleshooting.
Also, please post the output from "SELECT @@version".
CREATE USER nisse WITHOUT LOGIN
EXEC sp_addrolemember db_ddladmin, nisse
go
CREATE USER kajsa WITHOUT LOGIN
GRANT CREATE PROCEDURE TO kajsa
GRANT ALTER ON SCHEMA::dbo TO kajsa
go
EXECUTE AS USER = 'nisse'
SELECT * FROM fn_my_permissions (NULL, 'DATABASE');
go
CREATE PROCEDURE bludder AS PRINT 1
go
REVERT
go
EXECUTE AS USER = 'kajsa'
SELECT * FROM fn_my_permissions (NULL, 'DATABASE');
go
CREATE PROCEDURE blidder AS PRINT 1
go
REVERT
go
SELECT p.name, db_name(), dp.class_desc, dp.major_id, dp.permission_name,
dp.state_desc
FROM sys.database_permissions dp
JOIN sys.database_principals p ON p.principal_id = dp.grantee_principal_id
WHERE p.name IN ('nisse', 'kajsa')
SELECT m.name, r.name
FROM sys.database_principals m
JOIN sys.database_role_members rm ON m.principal_id =
rm.member_principal_id
JOIN sys.database_principals r ON r.principal_id = rm.role_principal_id
WHERE m.name IN ('nisse', 'kajsa')
go
DROP USER nisse
DROP USER kajsa
DROP PROCEDURE bludder, blidder
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Granting privilege through role not working for PL/SQL

    Version: 11.2.0.2
    In our shop, we don't grant privileges directly to a user, we grant it to a role and grant that role to the intended grantee.
    Granting privileges through a role seems to be fine with SQL Engine. But it doesn't work from PL/SQL engine.
    In the below example GLS_DEV user is granted SELECT access on SCOTT.pets table through a role called tstrole. GLS_DEV can select this table from SQL. But PL/SQL Engine doesn't seem to know this.
    Reproducing the issue:
    SQL> show user
    USER is "SCOTT"
    SQL> select * from pets;
    NAME
    PLUTO
    SQL> conn / as sysdba
    Connected.
    SQL> create user GLS_DEV identified by test1234 default tablespace TSTDATA;
    User created.
    SQL> alter user GLS_DEV quota 25m on TSTDATA;
    User altered.
    SQL> grant create session, resource to GLS_DEV;
    Grant succeeded.
    --- Granting SELECT privilege on scott.pets to tstrole and then grant this role to GLS_DEV.
    SQL> conn / as sysdba
    Connected.
    SQL>
    SQL> create role tstrole;
    Role created.
    SQL> grant select on scott.pets to tstrole;
    Grant succeeded.
    SQL> grant tstrole to GLS_DEV;
    Grant succeeded.
    SQL> conn GLS_DEV/test1234
    Connected.
    SQL>
    SQL> select * From scott.pets;
    NAME
    PLUTO
    ---- All fine till here. From SQL engine , GLS_DEV user can SELECT scott.pets table.
    --- Now , I am going to create a PL/SQL object in GLS_DEV which tries to refer scott.pets
    SQL> show user
    USER is "GLS_DEV"
    create or replace procedure my_proc
    is
    myvariable varchar2(35);
    begin
         select name into myvariable from scott.pets ;
         dbms_output.put_line(myvariable);
    end my_proc;
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE MY_PROC:
    LINE/COL ERROR
    6/2      PL/SQL: SQL Statement ignored
    6/41     PL/SQL: ORA-01031: insufficient privileges
    SQL>
    SQL> 6
      6*    select name into myvariable from scott.pets ;
    --- PL/SQL Engine doesn't seem to know that GLS_DEV has select privilege on scott.pets indirectly granted through a role
    --- Fix
    --- Instead of granting privilege through a role, I am granting the SELECT privilege on scott.pets to GLS_DEV directly.
    --- The error goes away, I can compile and execute the procedure !!
    SQL> conn / as sysdba
    Connected.
    SQL>
    SQL> grant select on scott.pets to GLS_DEV;
    Grant succeeded.
    SQL> conn GLS_DEV/test1234
    Connected.
    SQL>
    SQL> create or replace procedure my_proc
    is
    myvariable varchar2(35);
    begin
            select name into myvariable from scott.pets ;
            dbms_output.put_line(myvariable);
    end my_proc;  2    3    4    5    6    7    8    9   10
    11  /
    Procedure created.
    SQL> set serveroutput on
    SQL> exec my_proc;
    PLUTO
    PL/SQL procedure successfully completed.Has anyone encountered the same issue ?

    You really should start your own new thread for this question instead of resurrecting an old one, but to answer your question.
    There are two things going on here. First, there are a number of aler session commands that can be used by any user regardless of what privileges they are granted. Although I do not have the entire list at hand, things like nls_date_format and current_schema are available to all users, sort of like the grants to public in the data dictionary.
    Second, when you use execute immediate, the PL/SQL engine never really sees the statement, as far as the compiler is concerned it is just a string. It is only when the string is passed to the sql engine that permissions are checked, and there roles are not enabled.
    SQL> create role t_role;
    Role created.
    SQL> grant select on ops$oracle.t to t_role;
    Grant succeeded.
    SQL> create user a identified by a default tablespace users;
    User created.
    SQL> grant create session, create procedure to a;
    Grant succeeded.
    SQL> grant t_role to a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> select * from ops$oracle.t;
            ID DESCR
             1 One
             1 Un
    SQL> create function f (p_descr in varchar2) return number as
      2     l_num number;
      3  begin
      4     select id into l_num
      5     from ops$oracle.t
      6     where descr = p_descr;
      7     return l_num;
      8  end;
      9  /
    Warning: Function created with compilation errors.
    SQL> show error
    Errors for FUNCTION F:
    LINE/COL ERROR
    4/4      PL/SQL: SQL Statement ignored
    5/20     PL/SQL: ORA-00942: table or view does not exist
    SQL> create or replace function f (p_descr in varchar2) return number as
      2     l_num number;
      3  begin
      4     execute immediate 'select id from ops$oracle.t where descr = :b1'
      5                       into l_num using p_descr;
      6     return l_num;
      7  end;
      8  /
    Function created.
    SQL> select f('One') from dual;
    select f('One') from dual
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "A.F", line 4John

  • The link to a user defined oracle stored procedure does not work

    This is based on the HowTo Download a file
    http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html
    I have given a link to a procedure as follows, which will download the file (as given in the HowTo):
    #OWNER#.download_my_file?p_file=#ID#.
    However, this does not work. It tries to open a page rather than executing the procedure. It displays the page not found message

    that page not found message is a generic one. you'd want to check your apache logs for more info on what really happened. my guess is that you missed step 5 of that how-to, "grant execute on download_my_file to public"
    hope this helps,
    raj

  • Sorting for the procedure is not working

    can you help why the sorting is not working here.I am running the below procedure to sort asc and desc and when I do sort in descending order by a different column it gives me a different rows sorted in desc order. what i
    want the proecdure to do it to sort the recordset in asc and desc order without changing the selected rows
    SQL>  exec trnsportitems.gettrnsportitems(1,10,'itemnumber desc', :n, :c);
    PL/SQL procedure successfully completed.
    SQL> print c;
    ITEMNUMBER              R IDESCR                                   IDESCRL                                                      IUNI IS I ITEM
    2011.601/00002          1 TUNNEL CONSTRUCTION LAYOUT STAKING       TUNNEL CONSTRUCTION LAYOUT STAKING                           LS   0
    2011.601/00003          2 CONSTRUCTION SURVEYING                   CONSTRUCTION SURVEYING                                       LS   05 N 2011601/00003
    2011.601/00010          3 VIBRATION MONITORING                     VIBRATION MONITORING                                         LS   05 N 2011601/00010
    2011.601/00020          4 REVISED BRIDGE PLANS                     REVISED BRIDGE PLANS                                         LS   05 N 2011601/00020
    2011.601/00040          5 DESIGN                                   DESIGN                                                       LS   05 N 2011601/00040
    2011.601/00050          6 DESIGN AND CONSTRUCT                     DESIGN AND CONSTRUCT                                         LS   05 N 2011601/00050
    2011.601/08010          7 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08010
    2011.601/08011          8 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08011
    2011.601/08012          9 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601/08012
    2011.601/08013         10 SUPPLEMENTAL DESCRIPTION                 SUPPLEMENTAL DESCRIPTION                                     LS   05 N 2011601
    10 rows selected.
    SQL>
    SQL>  exec trnsportitems.gettrnsportitems(1,10,'idescr DESC', :n, :c);
    PL/SQL procedure successfully completed.
    SQL> print c;
    ITEMNUMBER              R IDESCR                                   IDESCRL                                                      IUNI IS I ITEM
    2563.613/00040          1 YELLOW TUBE DELINEATORS                  YELLOW TUBE DELINEATORS                                      UDAY 05 N 2563613/00040
    2563.602/00100          2 YELLOW TUBE DELINEATOR                   YELLOW TUBE DELINEATOR                                       EACH 05 N 2563602/00100
    2565.602/00940          3 YELLOW LED INDICATION                    YELLOW LED INDICATION                                        EACH 05 N 2565602/00940
    2502.602/00040          4 YARD DRAIN                               YARD DRAIN                                                   EACH 05 N 2502602/00040
    2411.601/00030          5 WYE STRUCTURE                            WYE STRUCTURE                                                LS   05 N 2411601/00030
    2557.603/00041          6 WOVEN WIRE FENCE                         WOVEN WIRE FENCE                                             L F  05 N 2557603/00041
    2557.603/00043          7 WOVEN WIRE                               WOVEN WIRE                                                   L F  05 N 2557603/00043
    2563.613/00615          8 WORK ZONE SPEED LIMIT SIGN               WORK ZONE SPEED LIMIT SIGN                                   UDAY 05 N 2563613/00
    2563.613/00610          9 WORK ZONE SPEED LIMIT                    WORK ZONE SPEED LIMIT                                        UDAY 05 N 2563613/00610
    2557.603/00035         10 WOODEN FENCE                             WOODEN FENCE                                                 L F  05 N 2557603/00035
    10 rows selected.

    Hi,
    user13258760 wrote:
    can you help why the sorting is not working here.I am running the below procedure to sort asc and desc and when I do sort in descending order by a different column it gives me a different rows sorted in desc order. what i
    want the proecdure to do it to sort the recordset in asc and desc order without changing the selected rowsAs it is written now, the argument insortexp has nothing to do with the order of the rows. It is used only in computing column r, and column r is used only in the WHERE clause.
    Are you really saying you don't want a WHERE clause at all in the main query: that you always want the cursor to contain all rows from itemlist that meet the 3 hard-coded conditions:
    ...                     WHERE item  '2999509/00001'     -- Did you mean != here?
                              AND iobselet = 'N'
                              AND ispecyr = '05'?
    If so, change the main query WHERE clause:
    WHERE r BETWEEN instartrowindex AND inendrowindexinto an ORDER BY clause:
    ORDER BY  rBy the way, you might want to make insortexp case-insensitive.
    In your example, you're calling the procedure with all small letters in insortexp:
    user13258760 wrote:
    SQL> exec trnsportitems.gettrnsportitems(1,10,'itemnumber desc', :n, :c);but the output is coming in ASC ending order:
    ...                           ORDER BY
                                     DECODE (insortexp, 'itemnumber ASC', item) ASC,
                                     DECODE (insortexp, 'itemnumber DESC', item) DESC,     -- capital 'DESC' won't match small 'desc'
                                     DECODE (insortexp, 'idescr ASC', idescr) ASC,
                                     DECODE (insortexp, 'idescr DESC', idescr) DESC,
                                     DECODE (insortexp, 'idescrl ASC', idescrl) ASC,
                                     DECODE (insortexp, 'idescrl DESC', idescrl) DESC,
                                     DECODE (insortexp, 'iunits ASC', iunits) ASC,
                                     DECODE (insortexp, 'iunits DESC', iunits) DESC,
                                     DECODE (insortexp, 'ispecyr ASC', ispecyr) ASC,
                                     DECODE (insortexp, 'ispecyr DESC', ispecyr) DESc,
                                   SUBSTR (item, 1, 4) || '.' || SUBSTR (item, 5)          -- This is the only non-NULL ORDER BY expression     Why not declare a local variable:
    sortexp      VARCHAR2 (20) := LOWER (insortexp);and use that variable instead of the raw argument in the query:
    ...                              DECODE (sortexp, 'itemnumber asc',  item) ASC,
                                     DECODE (sortexp, 'itemnumber desc', item) DESC, ...Also, this site doesn't like to display the <> operator, even inside \ tags.  When posting here, always use the other inequality operator, !=
    Edited by: Frank Kulash on Jun 15, 2010 3:25 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • PDF created on MAC not working on windows 7

    PDF created in Indesign CS6 on MAC is not working properly in Indesign CC on windows 7. I'm using PDF2ID to convert pdf. I'm sending pictures to show how it looks like in InDesign after convertion and in the Adobe Reader. And convertions took so long or crashes my InDesign... What can I do to fix it?

    Were you expecting a perfect conversion? If so, that’s not going to happen.
    If you’re having issues you think need to be addressed contact Recosoft.

  • Full screen mode PDF created on Mac not working on PC?

    I've created a PDF presentation on a Mac in Adobe Acrobat 8 Professional with about 80 pages. I've set it to open in full screen mode when viewed, which works fine on Mac when tested. When opened on a PC however, in my clients corporate environment, it does not work? Has anyone else come across this problem or have any suggestions to remedy it? Could it be something to do with the system it is being opened on blocking full screen mode?

    Check this out in Acrobat help type : Full Screen Mode
    look at the following topics:
    Defining initial View as Full Screen Mode
    Defining initial View
    It appears Fullscreen mode is based on OS Specifications So you need to reopen on a PC version of Acrobat  and set it again.
    Looks like they could have both settings in both programs that is a Line that says set full screen mode for Mac PC Unix Linux set for all.

  • 'Create New Contact' not working in Phone app

    I want to Create New Contact after a call from a new number (selecting the "circled i" button next to the "unknown" phone number in the Recents tab) but while I was entering data in the Contact app, I was interrupted, the iPhone went to sleep and my extensive Contact entry was lost because no data is saved until the Done button is manually selected which closes the record.
    When I go back to the Phone app and select the "circled i" button next to the "unknown" phone number in the Recents tab, both the "Create New Contact" and the "Add to Existing Contact" buttons to take me to the Contact app do not work...i.e. nothing happens when I press them, even after putting the iPhone to sleep. After several tries, I let it sleep for 10 minutes and now these buttons linking to the Contact app from the Phone app again work as usual.
    So we have two unacceptable defects in the iPhone basic Apple apps here:
    1- interruptions while entering a new Contact app record causes the new record to be lost because it isn't automatically saved when the iPhone goes to sleep or an incoming call, etc, but only when the user manually selects the Done button in the Contact app record, which closes the record and one must then select the Edit button to resume data entry (repeat often to simply save as you enter in case there is an unexpected interruption...how dumb is that?. This is just poor iOS implementation that doesn't consider common usage situations that cause data loss, and it could be data that isn't easily retrieved. If Apple doesn't know how to implement auto save at frequent intervals, or upon certain events like sleep or incoming call, then they should at least put a Save button next to the Done button so we can manually save without the stupid Done and Edit button pushing, repeat, repeat, repeat.
    2- A bug in the Phone app that causes the link buttons to the Contact app to stop functioning in at least the situation I describe above. This is unacceptable in a mature iOS basic usage app.

    bump

  • Shared Components Images Create Image does not work

    I am using oracle XE on Windows XP.
    Uploading an image for an application does not work.
    Home>Application Builder>Application 105>Shared Components>Images>Create Image
    It goes wrong when I try to upload the image:
    - Iexplorer gives an error 404 after pressing the Upload button.
    - Firefox just gives an empty page.
    When I try to refresh the resulting page (do another post) I get the following error:
    Expecting p_company or wwv_flow_company cookie to contain security group id of application owner.
    Error ERR-7621 Could not determine workspace for application (:) on application accept.

    Hi Dietmar,
    After setting the language to English (USA) [en-us] it works for +- 50 % of the uploads.
    Below is my tracefile.
    Dump file e:\oraclexe\app\oracle\admin\xe\bdump\xe_s001_2340.trc
    Wed Nov 23 19:03:17 2005
    ORACLE V10.2.0.1.0 - Beta vsnsta=1
    vsnsql=14 vsnxtr=3
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
    Windows XP Version V5.1 Service Pack 2
    CPU : 2 - type 586
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:267M/1014M, Ph+PgF:1431M/2444M, VA:1578M/2047M
    Instance name: xe
    Redo thread mounted by this instance: 1
    Oracle process number: 15
    Windows thread id: 2340, image: ORACLE.EXE (S001)
    ------ cut ------
    *** 2005-11-23 19:50:44.718
    *** ACTION NAME:() 2005-11-23 19:50:44.718
    *** MODULE NAME:() 2005-11-23 19:50:44.718
    *** CLIENT ID:() 2005-11-23 19:50:44.718
    *** SESSION ID:(26.18) 2005-11-23 19:50:44.718
    Embedded PL/SQL Gateway: /htmldb/wwv_flow.accept HTTP-404 ORA-01846: not a valid day of the week
    *** SESSION ID:(27.19) 2005-11-23 19:50:51.937
    Embedded PL/SQL Gateway: /htmldb/wwv_flow.accept HTTP-404 ORA-01846: not a valid day of the week
    *** 2005-11-23 19:50:59.078
    *** SERVICE NAME:(SYS$USERS) 2005-11-23 19:50:59.078
    *** SESSION ID:(27.21) 2005-11-23 19:50:59.078
    Embedded PL/SQL Gateway: Unknown attribute 3
    Embedded PL/SQL Gateway: Unknown attribute 3
    Strange error... there is nothing in my form that is related to dates...
    Kind regards,
    Pieter

  • New created Shortcuts does not working

    Hello,
    I tried to create a Shortcut for open Terminal in Finder so I turned it on in System preferences -> Keyboard.......
    But I does not working ! I tried reboot system, delete com.apple.symbolichotkey.plist from user/Library/Preferences folder and still nothing.
    I have any services in finder too.
    Please, help.

    Are you using the default "Launch Terminal" service (or one of the others), or did you create your own?
    If your own, how did you make the service?

  • XML create script is not working in Photoshop.

    Hi All
    Below i have mentioned script is not working. Kindly check and advice. Please do this needful
    #target photoshop;
    var createDefaultXML, createPresetChild, defaultXML, initDDL, presetFile, presetNamesArray, readXML, resPath, win, windowResource, writeXML, xmlData,
      __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
    windowResource = "dialog {  \
        orientation: 'column', \
        alignChildren: ['fill', 'top'],  \
        size:[410, 210], \
        text: 'DropDownList Demo - www.davidebarranca.com',  \
        margins:15, \
        controlsPanel: Panel { \
            orientation: 'column', \
            alignChildren:'right', \
            margins:15, \
            text: 'Controls', \
            controlsGroup: Group {  \
                orientation: 'row', \
                alignChildren:'center', \
                st: StaticText { text: 'Amount:' }, \
                mySlider: Slider { minvalue:0, maxvalue:500, value:300, size:[220,20] }, \
                myText: EditText { text:'300', characters:5, justify:'left'} \
        presetsPanel: Panel { \
            orientation: 'row', \
            alignChildren: 'center', \
            text: 'Presets', \
            margins: 14, \
            presetList: DropDownList {preferredSize: [163,20] }, \
            saveNewPreset: Button { text: 'New', preferredSize: [44,24]}, \
            deletePreset: Button { text: 'Remove', preferredSize: [60,24]}, \
            resetPresets: Button { text: 'Reset', preferredSize: [50,24]} \
        buttonsGroup: Group{\
            alignChildren: 'bottom',\
            cancelButton: Button { text: 'Cancel', properties:{name:'cancel'},size: [60,24], alignment:['right', 'center'] }, \
            applyButton: Button { text: 'Apply', properties:{name:'apply'}, size: [100,24], alignment:['right', 'center'] }, \
    win = new Window(windowResource);
    xmlData = null;
    presetNamesArray = [];
    resPath = File($.fileName).parent;
    presetFile = new File("" + resPath + "/presets.xml");
    defaultXML = <presets>
            <preset default="true">
                <name>select...</name>
                <value></value>
            </preset>
            <preset default="true">
                <name>Default value</name>
                <value>100</value>
            </preset>
            <preset default="true">
                <name>Low value</name>
                <value>10</value>
            </preset>
            <preset default="true">
                <name>High value</name>
                <value>400</value>
            </preset>
        </presets>;
    writeXML = function(xml, file) {
      if (file == null) {
        file = presetFile;
      try {
        file.open("w");
        file.write(xml);
        file.close();
      } catch (e) {
        alert("" + e.message + "\nThere are problems writing the XML file!");
      return true;
    readXML = function(file) {
      var content;
      if (file == null) {
        file = presetFile;
      try {
        file.open('r');
        content = file.read();
        file.close();
        return new XML(content);
      } catch (e) {
        alert("" + e.message + "\nThere are problems reading the XML file!");
      return true;
    createDefaultXML = function() {
      if (!presetFile.exists) {
        writeXML(defaultXML);
        void 0;
      } else {
        presetFile.remove();
        createDefaultXML();
      return true;
    createPresetChild = function(name, value) {
      var child;
      return child = <preset default="false">
                    <name>{name}</name>
                    <value>{value}</value>
                </preset>;
    initDDL = function() {
      var i, nameListLength;
      if (!presetFile.exists) {
        createDefaultXML();
        initDDL();
      xmlData = readXML();
      if (win.presetsPanel.presetList.items.length !== 0) {
        win.presetsPanel.presetList.removeAll();
      nameListLength = xmlData.preset.name.length();
      presetNamesArray.length = 0;
      i = 0;
      while (i < nameListLength) {
        presetNamesArray.push(xmlData.preset.name[i].toString());
        win.presetsPanel.presetList.add("item", xmlData.preset.name[i]);
        i++;
      win.presetsPanel.presetList.selection = win.presetsPanel.presetList.items[0];
      return true;
    win.controlsPanel.controlsGroup.myText.onChange = function() {
      return this.parent.mySlider.value = Number(this.text);
    win.controlsPanel.controlsGroup.mySlider.onChange = function() {
      return this.parent.myText.text = Math.ceil(this.value);
    win.presetsPanel.presetList.onChange = function() {
      if (this.selection !== null && this.selection.index !== 0) {
        win.controlsPanel.controlsGroup.myText.text = xmlData.preset[this.selection.index].value;
        win.controlsPanel.controlsGroup.mySlider.value = Number(xmlData.preset[this.selection.index].value);
      return true;
    win.presetsPanel.resetPresets.onClick = function() {
      if (confirm("Warning\nAre you sure you want to reset the Preset list?", true)) {
        createDefaultXML();
        return initDDL();
    win.presetsPanel.saveNewPreset.onClick = function() {
      var child, presetName;
      presetName = prompt("Give your preset a name!\nYou'll find it in the preset list.", "User Preset", "Save new Preset");
      if (presetName == null) {
        return;
      if (__indexOf.call(presetNamesArray, presetName) >= 0) {
        alert("Duplicate name!\nPlease find another one.");
        win.presetsPanel.saveNewPreset.onClick.call();
      child = createPresetChild(presetName, win.controlsPanel.controlsGroup.myText.text);
      xmlData.appendChild(child);
      writeXML(xmlData);
      initDDL();
      return win.presetsPanel.presetList.selection = win.presetsPanel.presetList.items[win.presetsPanel.presetList.items.length - 1];
    win.presetsPanel.deletePreset.onClick = function() {
      if (xmlData.preset[win.presetsPanel.presetList.selection.index][email protected]() === "true") {
        alert("Can't delete \"" + xmlData.preset[win.presetsPanel.presetList.selection.index].name + "\"\nIt's part of the default set of Presets");
        return;
      if (confirm("Are you sure you want to delete \"" + xmlData.preset[win.presetsPanel.presetList.selection.index].name + "\" preset?\nYou can't undo this.")) {
        delete xmlData.preset[win.presetsPanel.presetList.selection.index];
      writeXML(xmlData);
      return initDDL();
    initDDL();
    win.show();

    You should use the scripting forum. I only hack at Photoshop scripting when I need to.  What I put together is usually made from code I find on the web and modify to do what I want to do. When it come down to it I really don't know javascript.  Your javascript knowledge is way beyond mine.  To tell the truth I don'e even understand the syntax of you first statment after target Photoshop.
    I have a programming background but most of mine was was in design, debugging, and developing programming development tools.  I retired back in 2002.   I never got into Object orientated programming though it was in full swing as was C programming along with java.  Microsoft had given up on its object orientate desktop OS2 system sidetracking IBM with it.
    I did not look closely at your code.  That something you should do. You know more then I do.....
    In the scripting forum you will get better help then I can give you.   Many of the better scriptwriter seem to have left there becase of  frustration with Adobe support. However there are some that still visit there regularly.
    You may want to look into Xtools there open source and the author still visits the forum from time to time. I have use some of his scripts but have never gotten into his library I'm retired I only play a little to keep some brain function. ps-scripts - Browse /xtools at SourceForge.net

  • Create Link does not work in a Search Result (SearchResultLayoutSet)

    Hello,
    we changed  in a search iView the "Layout Set for Search Results" to the standard ConsumerExplorer. Because we would like to allow people to "Create Links" from the documents which are shown in the search result. But the Create Link function is showing the following error:
    Item not found
    The item you are attempting to access is not available. Check that the name or link is correct. You might also check whether the associated repository is currently accessible.
    Does any can help and guide which part could responsible for that behaviour?
    Thanks in advance.
    David

    Hi,
    This happens to me now, however It still doesn't work even after the privileges are granted.
    I created a procedure to help create program using dbms_scheduler
    =======================================================
    PROCEDURE create_prg_create_running_dir
    IS
    BEGIN
    SYS.dbms_scheduler.create_program
    (program_name => 'PRG_CREATE_RUNDIR',
    program_type => 'EXECUTABLE',
    program_action => '/export/home/jobmgr/scripts/CREATE_JOB_RUNDIR/create_job_rundir.sh',
    number_of_arguments => 1,
    enabled => FALSE,
    comments => 'Program to create job running directory'
    SYS.dbms_scheduler.define_metadata_argument
    (program_name => 'PRG_CREATE_RUNDIR',
    metadata_attribute => 'JOB_NAME',
    argument_position => 1,
    argument_name => 'JOB_NAME'
    SYS.dbms_scheduler.ENABLE ('PRG_CREATE_RUNDIR');
    END create_prg_create_running_dir;
    ========================================================
    I tried calling it from sqlplus
    SQL> exec ops$jobmgr.job_scheduler.create_job_program('test_import','executable','/export/home/jobmgr/scripts/IMP_FIRS_DATA/imp_firs_data.sh',2)
    BEGIN ops$jobmgr.job_scheduler.create_job_program('test_import','executable','/export/home/jobmgr/scripts/IMP_FIRS_DATA/imp_firs_data.sh',2); END;
    ERROR at line 1:
    ORA-27486: insufficient privileges
    ORA-06512: at "SYS.DBMS_ISCHED", line 5
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 30
    ORA-06512: at "OPS$JOBMGR.JOB_SCHEDULER", line 61
    ORA-06512: at line 1
    If I create the program directly (calling DBMS_SCHEDULER directly), the program can be created.
    I have granted EXECUTE privilege on DBMS_SCHEDULER & DBMS_ISCHED to this user too.
    Hope anyone can help.
    Thanks

  • Executing Command within Pkg.procedure does not work-but command line does

    [Version 10.2.0.2
    [Scenario] Let's say my Username is Jack. My goal is to grant two roles to a user. From the command line, I have no problem.
    PROMPT-> Grant role1,role2 to TESTUSER
    However, when I create a package and procedure (owned by Jack); I receive an ORA-01919 error saying that role2 does not exist.
    There is no question the role exists and I am able to grant it to the TESTUSER on the command line as Jack.
    Any ideas what is going on?

    I can't post it as the database is on another system. However, I found my the fix. My Jack user had grant any role; therefore, I thought it should work both from command line and package.proc; however I granted role2 to Jack with admin privs and it works now both from the command line and the pkg.proc.
    Thanks for the response.

  • APEX_UTIL.EDIT_USER Procedure do not work correctly in APEX 4.0.2.00.07

    Hi,
    I created user in Apex system without privileges.
    Next I want to provision privileges using APEX_UTIL.EDIT_USER Procedure.
    But when I try to set p_developer_roles param to ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL in web interface of apex I see the next values: User is workspace administrator - yes; User is a developer - yes; other privilege attributes are NO! When I login I can access to Application Builder but not to SQL Workshop.
    In short if i try to provision any developers privileges changes not appearing in web interface, but also i can access to Application Builder if I have that privilege. When I provision SQL:MONITOR:DATA_LOADER privilege I also see:
    User is workspace administrator - no; User is a developer - yes; other privilege attributes are NO and I can't access to SQL Workshop!
    APEX_UTIL.CREATE_USER Procedure with same values for p_developer_privs param work fine...
    Help me to resolve this issue.

    Please, help

  • Private synonym created on  table not working in function

    hi,
    I have created a private synonym on a table.
    now i am trying to create a function below is the code of the same.
    FUNCTION party_name(p_cntr_id NUMBER)
    RETURN VARCHAR2 AS
    v_cust_name VARCHAR2(100);
    v_cust_no varchar2(100);
    BEGIN
    select occ.cust_no
    into v_cust_no
    from ops_cust_cntr occ
    where occ.ID = p_cntr_id;
    SELECT party_name
    INTO v_cust_name
    FROM hz_parties -- this is the table on which synonym is created .
    WHERE party_id = v_cust_no;
    RETURN (v_cust_name);
    EXCEPTION
    WHEN OTHERS THEN
    RETURN NULL;
    END party_name;
    it is giving the message
    SQL> sho errors;
    Errors for FUNCTION PARTY_TEST:
    LINE/COL ERROR
    12/1 PL/SQL: SQL Statement ignored
    14/6 PL/SQL: ORA-00942: table or view does not exist
    but when i run
    SELECT party_name
    FROM hz_parties;
    it is giving me the data.
    Please advice.
    Regards
    Sudhir.

    This has nothing to do with the synonym.
    Look at this:
    SQL> create table t1 (c1 number);
    Table created.
    SQL> create synonym test_tab for t1;
    Synonym created.
    SQL> create or replace procedure p1 as
      2    l_count pls_integer;
      3  begin
      4    select count(*)
      5    into   l_count
      6    from   test_tab;
      7    dbms_output.put_line(l_count || ' records found.');
      8  end;
      9  /
    Procedure created.
    SQL> exec p1
    0 records found.
    PL/SQL procedure successfully completed.
    SQL> I guess, you don't have the select privilege on this table.
    Remember: The privileg must be granted directly to the user who is the owner of the procedure/function/package. Privilege through a role are not valid inside the procedure/function/package.

  • Why Kill_session procedure is not working ?

    Hi All,
    I like to grant kill session permission to application user APP in dev environment. So i did the following steps but the procedure did kill the session while testing it.
    Step 1 :
    create or replace procedure kill_session
    p_sid NUMBER,
    p_serial# NUMBER
    ) AS
    m_sql VARCHAR2(1000);
    m_loginusername VARCHAR2(30);
    m_killusername VARCHAR2(30);
    m_schemaname varchar2(30);
    BEGIN
    SELECT a.USERNAME,a.SCHEMANAME INTO m_killusername,m_schemaname
    FROM v$session a
    WHERE a.sid = p_sid
    AND a.serial# = p_serial#;
    select user into m_loginusername from dual;
    IF m_loginusername = m_killusername AND m_schemaname NOT IN ('SYS','SYSTEM')
    THEN
    m_sql:='ALTER SYSTEM KILL SESSION '||''''||p_sid ||','||p_serial#||''''||' IMMEDIATE';
    EXECUTE IMMEDIATE m_sql;
    dbms_output.put_line('Session Killed.');
    ELSE
    dbms_output.put_line(' Login User Name ' || m_loginusername ||' User Session to Kill ' ||m_killusername);
    dbms_output.put_line('Cannot kill session of other users or Admin users');
    raise_application_error(-20101,'Cannot kill session of other users or Admin users or self');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error in Kill Session.'||SQLERRM(SQLCODE));
    END kill_session;
    Step 2 :
    grant execute on sys.kill_session to APP;
    grant select on v_$session to APP;
    Step 3 :
    To validate this kill session permission, as a dba i have created TEST user and created one session.Then i have tried to kill the sid of TEST user but the procedure didnt kill the session instead it gives output as PL/SQL executed successfully.
    By
    Mr.B

    903787 wrote:
    Hi All,
    I like to grant kill session permission to application user APP in dev environment. So i did the following steps but the procedure did kill the session while testing it.
    Step 1 :
    create or replace procedure kill_session
    p_sid NUMBER,
    p_serial# NUMBER
    ) AS
    m_sql VARCHAR2(1000);
    m_loginusername VARCHAR2(30);
    m_killusername VARCHAR2(30);
    m_schemaname varchar2(30);
    BEGIN
    SELECT a.USERNAME,a.SCHEMANAME INTO m_killusername,m_schemaname
    FROM v$session a
    WHERE a.sid = p_sid
    AND a.serial# = p_serial#;
    select user into m_loginusername from dual;
    IF m_loginusername = m_killusername AND m_schemaname NOT IN ('SYS','SYSTEM')
    THEN
    m_sql:='ALTER SYSTEM KILL SESSION '||''''||p_sid ||','||p_serial#||''''||' IMMEDIATE';
    EXECUTE IMMEDIATE m_sql;
    dbms_output.put_line('Session Killed.');
    ELSE
    dbms_output.put_line(' Login User Name ' || m_loginusername ||' User Session to Kill ' ||m_killusername);
    dbms_output.put_line('Cannot kill session of other users or Admin users');
    raise_application_error(-20101,'Cannot kill session of other users or Admin users or self');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error in Kill Session.'||SQLERRM(SQLCODE));
    END kill_session;
    Step 2 :
    grant execute on sys.kill_session to APP;
    grant select on v_$session to APP;
    Step 3 :
    To validate this kill session permission, as a dba i have created TEST user and created one session.Then i have tried to kill the sid of TEST user but the procedure didnt kill the session instead it gives output as PL/SQL executed successfully.
    By
    Mr.BYou should NOT be creating ANY new objects in the SYS schema.
    eliminate, delete & remove the whole EXCEPTION handler.

Maybe you are looking for

  • Exception in setting up message-driven bean container

    hello, I'm trying to deploy a single mdb and I'm getting an exception. I've tried closely following the way things are done with the mdb example in the samples AppServer7 directory. Am I missing something in one of my deployment descriptior files? Th

  • How to create a validation on number field.

    Hello Experts, My database table has a numeric column EMP_ID. I want to create a validation so that a user can only enter numeric value in this field on the Apex page. I have tried to create validation Item/Column specified is numeric for item P2_EMP

  • How can I clear session?

    Hi everyone, I have a little problem, I have a JSP tree. The tree displays structure of files and subdirectories in specified directory. When session is empty I call function loadData1() and make tree and put them into session. But any change in the

  • JDeveloper 11.1.1.6.0 : The JUnit Integration update cannot be installed

    hi Using JDeveloper 11.1.1.6.0 when trying to install "JUnit Integration 11.1.1.6.38.61.92" I got this message: "The JUnit Integration update cannot be installed because it has a required licence agreement that could not be read. Click Back to remove

  • CATS Timesheet creator and approver

    All, We have two main roles we are dealing with in CATS. We have a Time Sheet creator and than a Time Sheet Approver. Right now it is setup mainly through the P_ORGIN auth. obj. I won't allow the approvers to approve their own time sheets but itlll a