Custom Assembly(Analysis services stored procedure) is showing exception "Function does not exist"
Hi All,
I have added custom assembly to analysis services and trying to call the function in the MDX with the below format
AssemblyName.NameSpace.Class.FunctionName(Dimensions)
I dont know exactly where am I doing wrong, please let me know if anyone has come cross this issue.
Thanks,
ATRSAMS
Below is the script I have used to create assembly, if any one have used this script and have found root cause, please let me know. Also let me know if you need more detailsnamespace SSAS_StoredProcedure_Sort
classMDXStoredProc
privateclassTupleValue : System.IComparable
private Microsoft.AnalysisServices.AdomdServer.Tuple _Tuple;
internal Microsoft.AnalysisServices.AdomdServer.Tuple Tuple
get { return _Tuple; }
privateset { _Tuple = value; }
privatedecimal _Value;
public TupleValue(Microsoft.AnalysisServices.AdomdServer.Tuple t, decimal v)
_Tuple = t;
_Value = v;
publicint CompareTo(object obj)
if (obj isTupleValue)
TupleValue tv = (TupleValue)obj;
return tv._Value.CompareTo(_Value);
thrownew System.ArgumentException("object is not a TupleValue");
publicSet Order(Set InputSet, Expression SortExpression)
List<TupleValue> TupleValues = newList<TupleValue>();
int i = 0;
foreach (Microsoft.AnalysisServices.AdomdServer.Tuple t in InputSet.Tuples)
TupleValues.Add(newTupleValue(t, (decimal)SortExpression.Calculate(t)));
i++;
int cTuples = i;
TupleValues.Sort();
SetBuilder sb = newSetBuilder();
for (i = 0; i < cTuples; i++)
sb.Add(TupleValues[i].Tuple);
return sb.ToSet();
Similar Messages
-
i have created my web-dynpro application in development. and sent to quality . whenever i will execute my dynpro in quality i got one message
ERROR: ICF service node "/sap/bc/webdynpro/sap/zqm_cto_arr_general1" does not exist (see SAP Note 1109215) (termination: ERROR_MESSAGE_STATE)
whenever i saw sicf transaction my web-dynpro is not seen . my dynpro application name is more then 15 character. what i will do . please give me valuable suggestion.....Hi Ashok,
for your requirement the application is not exist in particular place. It means, the webdynpro application is saved at different package or different location.
Please change the webdynpro component name and save it in particular request in package, then transport it to quality ..(development server )
then go to SICF t.code .. sap->bc->webdynpro->sap->find out your application and activate the service of your webdynpro application.
Now test it ... this solution might helpful to you .
Regards,
Naveen M -
ERROR SHOWS 'VARIANT CASHDE DOES NOT EXIST' WHILE GIVING PRINT in tcod FBCJ
DEAR ALL,
MY FI CONSULTANT WHILE PRESSING PRINT BUTTON IN FBCJ TCODE FOR CASH JOURNAL AN ERROR MESSAGE SHOWS 'VARIANT CASHDE DOES NOT EXIST '. AS AN ABAPER I TRIED A LOT AND DEBUG THE STD. PROGRAM BUT I AM UNABLE TO SOLVE THE ISSUE. SO I NEED UR HELP .PLEASE SUGGEST ME TO SOLVE THE ISSUE.
IT IS VERY URGENT.
REGARDS
BANAJAThanks
-
Stored Procedure Inside SSIS Successful but does not Perform INSERT - First time since Pkg Created
All - We have a Stored Proc that Runs inside a SSIS package and INSERTS in a table and it was developed a Year Ago - After almost one year this Stored Procedure runs and DOES NOT INSERT - and when I pull the procedure out and Manually runs it -
it runs totally fine.
Did anyone face anything like this before ?
It does create around 10 temp tables before running the INSERT and it INSERTS around 2.5 Million rows. And its a Wide table with 180 ColumnsWhen you execute the Stored Procedure directly in SSMS (SQL Server Management Studio), it execute under the login that you open SSMS, it was be a Window login or SQL Server one.
So from SSIS packages, you have to ways :
1. When you execute the package from SSIS, it execute under the service that SSIS run.
2. When you scudule the package in SQL Agent, the package execute under the account service of SSIS, or another one (you can specify) by impersonation.
Ok, for the solution, i prefere change the impersonate before call procedure, exactly change the current login to another that have the priviliges to execute and insert the Data in the table like :
1. Edit the SP.
2. before the T-SQL type :
EXECUTE AS USER = 'yourLogin';3. retryTo understand the impersonation :http://msdn.microsoft.com/fr-fr/library/ms181362.aspx -
List View webpart from subsite to Top site shows random error "List Does not exist"
Hi All,
We have a list in subsite and we are creating a view for that list which we are showing in one of the top site home page. We have taken care of changing the web and list guid of list view webpart when we added on top site. Its working fine but some time
shows error "list does not exist" but when we refresh the error goes. Is it known issue or if there is any workaround for this? because we cannot go live with this random error.
Rohit Pasrijatry these links:
http://mroffice365.com/2012/01/sharepoint-display-a-list-or-library-from-subsite-to-the-top-level-site/
http://sharepoint.stackexchange.com/questions/37140/display-list-or-library-on-another-site-as-webpart -
How to work on Data Analysis using Stored procedures
How to work on Data Analysis using Stored procedures any suggestions
Carefully? Precisely? Tomorrow? Your question has no context so it means little to an outside reader. Perhaps you should start with some basic research into the data mining features of sql server:
data mining homepage -
Invoke stored procedure cause strange exception
Hi, I'm using JDev 11.1.2, the use case is: add a new row to the VO iterator filtered by some view criteria and call a stored procedure before commit.
The application runs fine without calling the stored procedure, however, following exception will occur if it's called.
The stored procedure will do some update to a remote DB2 via DB link. Though the exception stack trace shows that the SP has error, but if I run it separately in some SQL tool, it is ok.
The "BO_SP" problem seems not to be caused by the 'new row state'.
Does any one have any tips for this problem? Thanks!
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Savepoint": SQL Statement "BO_SP".
at oracle.jbo.server.DBTransactionImpl.setSavepoint(DBTransactionImpl.java:3184)
at oracle.jbo.server.DBTransactionImpl.saveTmpPostState(DBTransactionImpl.java:1791)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2065)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1415)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at oracle.adf.controller.internal.util.ELInterfaceImpl.invokeMethod(ELInterfaceImpl.java:173)
at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:163)
at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1035)
at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:926)
at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:824)
at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:554)
at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:158)
at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:115)
at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:84)
at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:50)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.sql.SQLException: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]ILLEGAL SYMBOL <END-OF-STATEMENT>; VALID SYMBOLS ARE ON UNIQUE. {42000,NativeErr = -104}[Oracle][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT. *N {HY000,NativeErr = -518}
ORA-02063: preceding 2 lines from TGBPSU
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
at oracle.jbo.server.OracleSQLBuilderImpl.setSavepoint(OracleSQLBuilderImpl.java:1548)
at oracle.jbo.server.DBTransactionImpl.setSavepoint(DBTransactionImpl.java:3172)
... 83 more
Edited by: codeplay on Oct 17, 2011 5:17 PMLook like the calling of the other DB is the root of your problem:
Caused by: java.sql.SQLException: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:[Oracle][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]ILLEGAL SYMBOL <END-OF-STATEMENT>; VALID SYMBOLS ARE ON UNIQUE. {42000,NativeErr = -104}[Oracle][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT. *N {HY000,NativeErr = -518}
ORA-02063: preceding 2 lines from TGBPSU
>
Test your app with -Djbo.debugoutoup=console as a java option, this will generate lots of output but you may see the actual sql passed to the db.
Where and how do you call the SP?
Timo -
Can a Stored Procedure be called from a Rule (not using Scripted JDBC Adap)
Hello smart people,
Question: Can a stored procedure be called from a Rule without using the Scripted JDBC Resource Adapter?
What's Desired: The project has very strong sql developers and average at best Java developers. We have been successful at implementing the scripted JDBC Resource Adapter which makes use of Java Bean shells. The custom Java Bean shell contains code that calls a stored procedure. We are cool with that process.
However we would like to be able to set up a Rule that calls a Stored Procedure without jumping thru the Java Bean Shell layer. The Stored Procedures we will be developing will not access the tables in the Waveset database. Instead the Stored Procedures will be accessing custom tables in a custom database. The custom DBase will be housed on the same dBase server as the Waveset database.
Environment: Identity Manager 7.1. Oracle 10i, and Unix OS.
It seems to me that this task is possible, but the posts in this forum make it sound like perhaps it is not.
Do any of you smart people agree that it should be possible or better yet has anyone implemented such an approach?
Thanks.We did this by putting all of the JDBC calls into a Java class, then instantiated that class and called the methods from within a rule. An example of a rule we used is this:
<Rule authType='UserMembersRule' name='List UserType'>
<block>
<defvar name='adapter'>
<new class='com.waveset.adapter.ScriptedJdbcResourceAdapter'/>
</defvar>
<invoke name='setResource'>
<ref>adapter</ref>
<invoke name='getObject' class='com.waveset.ui.FormUtil'>
<ref>context</ref>
<s>Resource</s>
<s>Banner</s>
</invoke>
</invoke>
<defvar name='jdbcHelper'>
<new class='edu.bates.JDBCHelper'>
<invoke name='getConnection'>
<ref>adapter</ref>
</invoke>
</new>
</defvar>
<defvar name='userList'>
<new class='java.util.ArrayList'/>
</defvar>
<invoke name='addQueryToList'>
<ref>jdbcHelper</ref>
<s>SQL QUERY HERE</s>
<ref>userList</ref>
</invoke>
<ref>userList</ref>
</block>
<MemberObjectGroups>
<ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
</MemberObjectGroups>
</Rule> -
On OSX 10.6.8 Mac Mail sent items do not show the Bcc field. Adjusting settings in mail/prefs/viewing/custom/bcc has no affect on Mail, ie Bcc still does not appear on sent items. Yet another example of Mac caring not a jot about the performance of versions of OS and software running on on older hardware. Anyone got a fix by any chance? Oh and fyi I need to see the Bcc in sent items to confirm sent email is attaching to Salesforece - when I see the Bcc I know I can delete it as a copy will be in SForce. Big thanks W.
On OSX 10.6.8 Mac Mail sent items do not show the Bcc field. Adjusting settings in mail/prefs/viewing/custom/bcc has no affect on Mail, ie Bcc still does not appear on sent items. Yet another example of Mac caring not a jot about the performance of versions of OS and software running on on older hardware. Anyone got a fix by any chance? Oh and fyi I need to see the Bcc in sent items to confirm sent email is attaching to Salesforece - when I see the Bcc I know I can delete it as a copy will be in SForce. Big thanks W.
-
Error - remote stored procedure includes in a function
Hi,
I have a stored procedure, it runs properly
ecos.GetCustTier@BSCSDEV in PL/SQL
But after included into function F_GETCUSTTIER, it comes error.
SQL> select f_getcusttier(585510,'20020808') from dual
ORA-06571: Function F_GETCUSTTIER does not guarantee not to update database
[Function F_GETCUSTTIER]
create or replace FUNCTION f_getcusttier(
Begin
ecos.GetCustTier@BSCSDEV(i_customer_id, i_at_date, o_seqno, o_custcode, o_tier_id, o_tier_des, o_join_date, o_join_reason,
o_renewal_date, o_next_review_date, o_last_review_amt_no, o_exit_date, o_exit_reason,
o_input_by, o_input_date, o_update_by, o_update_date, o_expiry_date, o_next_job_review_date,
o_status_id, o_return_code);
RETURN o_tier_id;
I also try to create a package for this function
CREATE OR REPLACE PACKAGE abc AS
FUNCTION f_getcusttier(i_customer_id number, i_at_date varchar2) RETURN NUMBER;
PRAGMA RESTRICT_REFERENCES(f_getcusttier, WNDS);
END abc;
CREATE OR REPLACE PACKAGE BODY bwan AS
FUNCTION f_getcusttier(
i_customer_id in number,
i_at_date in varchar2
Begin
ecos.GetCustTier@BSCSDEV(i_customer_id, i_at_date, o_seqno, o_custcode, o_tier_id, o_tier_des, o_join_date, o_join_reason,
o_renewal_date, o_next_review_date, o_last_review_amt_no, o_exit_date, o_exit_reason,
o_input_by, o_input_date, o_update_by, o_update_date, o_expiry_date, o_next_job_review_date,
o_status_id, o_return_code);
RETURN o_tier_id;
But with Warning: Package Body created with compilation errors.
2/1 PLS-00452: Subprogram 'F_GETCUSTTIER' violates its associated
pragma
How can I fixed it? Can function pack with remote stored procedure?
DB version: 8.0.4.4.0
I know that this problem is resolved in Release 8.1, is it no solution for release 8.0.4.4.0?First of all, please do not post three separate threads for the one problem. It simply clutters up the forum for the rest of us.
Prior to 8i you need to explicitly guarantee that your function does not write to the database. You do this with the RESTRICT_REFERENCES pragma:
CREATE PACKAGE yr_package AS -- package specification
FUNCTION whatever
(pn IN NUMBER) RETURN NUMBER;
PRAGMA RESTRICT_REFERENCES (whatever, WNDS);
END yr_package;The following link goes to a page of helpful stuff assembeled by some of use regulars:Re: How to attach a java bean in forms6i
It includes jumps to the Oracle online documentation. You may find the Application Developer's Guide - Fundamentals an instructive read.
Regards, APC -
Can a SQL Server stored procedure call an SAP function module?
Can a SQL Server stored procedure call an SAP function module.? The stored procedure will be called via a trigger when data records are added to a Z table.
You have two options:
- the other software can use the RFC SDK and call directly in the system
- the other software can use a database connect
Markus -
Using SQL Server 2012 SP1
I have a user that is submitting a procedure that uses sp_send_dbmail. I have also noticed that they have the following code in their procedure
DECLARE @rc INT
IF NOT EXISTS (SELECT * FROM msdb.sys.service_queues
WHERE name = N'ExternalMailQueue' AND is_receive_enabled = 1)
EXEC @rc = msdb.dbo.sysmail_start_sp
The user submits the procedure and she gets the email but she also gets the following error message:
Msg 15151, Level 16, State 1, Procedure sysmail_start_sp, Line 8
Cannot alter the queue 'ExternalMailQueue', because it does not exist or you do not have permission.
Mail (Id: 2402) queued.
(1 row(s) affected)
I have granted execute to sp_send_dbmail and sysmail_start_sp. I have also granted select to service_queues.
Does anyone have any solutions for the above error message?
lcerniThe contents of sysmail_start_sp is this:
CREATE PROCEDURE sysmail_start_sp
AS
SET NOCOUNT ON
DECLARE @rc INT
DECLARE @localmessage nvarchar(255)
ALTER QUEUE ExternalMailQueue WITH STATUS = ON
SELECT @rc = @@ERROR
IF(@rc = 0)
BEGIN
ALTER QUEUE ExternalMailQueue WITH ACTIVATION (STATUS = ON);
SET @localmessage = FORMATMESSAGE(14639, SUSER_SNAME())
exec msdb.dbo.sysmail_logmailevent_sp @event_type=1, @description=@localmessage
END
RETURN @rc
The user get the error, because she does not have any permission on the queue in question. To be able to alter the queue, the following applies according to Books Online:
Permission for altering a queue defaults to the owner of the queue, members of the db_ddladmin or db_owner fixed database roles, and members of the sysadmin fixed server role.
Note that is would be db_ddladmin or db_owner in msdb. Now, supposedly the queue is already active, and in that case I think that it is sufficient that the user has VIEW DEFINITION on the view. This would permit her to see the row in sys.service_queues,
why there would be no need to call sysmail_start_sp.
Altertanively, change the check to:
DECLARE @isenabled bit
SELECT @isenabled = (SELECT is_receive_enabled FROM msdb.sys.service_queues
WHERE name = N'ExternalMailQueue')
IF @isenabled = 0
EXEC @rc = msdb.dbo.sysmail_start_sp
The idea here is that, if the user has no permission to read the information in the DMV, @isenabled will be NULL, and you just pray and hope that the queue is up and running.
I suspect that the reason this worked for you on SQL 2005 is that on that instance someone at some point in made all the required configurations for it to work, but all that is forgotten now. That happens to me too.
If you really want the user to be able to start the queue, I have some better ideas than adding her to a role, but I skip the details for now.
Erland Sommarskog, SQL Server MVP, [email protected] -
DAC - Custom Workflow Task - Parameter file does not exist
Hi expert,
I have some issues running custom task in DAC with Siebel OLTP to DW. Please see log below. Anyone can help me in this regard?
Note: Siebel Custom Table to Data Warehouse Custom table - Created new workflow in Informatica for custom table
ANOMALY INFO::: Error while executing : INFORMATICA TASK:DU_SDE_SBL_78_Adaptor:SDE_TCDimension:(Source : FULL Target : FULL)
MESSAGE:::
Irrecoverable Error
Request to start workflow : 'SDE_TCDimension' has completed with error code 17
Error Message : Parameter file does not exist.
Connected to Integration Service: [Arcis_Dev_Integration_Service].
ERROR: unable to open local paramfile [XX/obi/Informatica/PowerCenter8.6.1/server/infa_sh ared\SEBL_78.DataWarehouse.DU_SDE_SBL_78_Adaptor.SDE_TCDimension.txt].
Disconnecting from Integration Service
=====================================
STD OUTPUT
=====================================
Informatica(r) PMCMD, version [8.6.1], build [183.1217], Windows 32-bit
Copyright (c) Informatica Corporation 1994 - 2008
All Rights Reserved.
Invoked at Thu Sep 22 13:34:26 2011
Connected to Integration Service: [AD_Service].
ERROR: unable to open local paramfile [XX/obi/Informatica/PowerCenter8.6.1/server/infa_shared\SEBL_78.DataWarehouse.DU_SDE_SBL_78_Adaptor.SDE_TCDimension.txt].
Disconnecting from Integration Service
Edited by: Jing Jang on Sep 22, 2011 11:58 PMHi thanks for replying.
I Assembled the subject area, generated parameters and I built the execution plan, everything is success. For other task parameter file is generating.
DAC log shows as you mentioned.
pmcmd startworkflow -sv Arcis_Dev_Integration_Service -d ARCISDEV_crmobidev -u Administrator -p **** -f DU_SDE_SBL_78_Adaptor -lpf /XXX/obi/Informatica/PowerCenter8.6.1/server/infa_shared\SEBL_78.DataWarehouse.DU_SDE_SBL_78_Adaptor.SDE_TCDimension.txt SDE_TCDimension
Error Message:
ANOMALY INFO::: Error while executing : INFORMATICA TASK:DU_SDE_SBL_78_Adaptor:SDE_TCDimension:(Source : FULL Target : FULL)
MESSAGE:::
Irrecoverable Error
Request to start workflow : 'SDE_TCDimension' has completed with error code 17
Error Message : Parameter file does not exist.
Command Used: pmcmd startworkflow -sv Arcis_Dev_Integration_Service -d ARCISDEV_crmobidev -u Administrator -p **** -f DU_SDE_SBL_78_Adaptor -lpf /XXX/obi/Informatica/PowerCenter8.6.1/server/infa_shared\SEBL_78.DataWarehouse.DU_SDE_SBL_78_Adaptor.SDE_TCDimension.txt SDE_TCDimension**
Workflow Message:
Since we gave the InformaticaParameterFileLocation as /XXX/obi/Informatica/PowerCenter8.6.1/server/infa_shared , it is showing exactly. But I don't know why the "\" slash is coming.
DAC server is on AIX and I'm running DAC client from another windows machine, I have Informatica Client installed on my machine.
Right now I'm checking with Unit Testing, do I need to run full execution to get that parameter file generated?
Appreciate your help. -
we are using VS 2013. i have created new build definition and run that created build its getting failed and showing error message as "The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly
reference?)" and "The type or namespace name 'WinComboBox, UITestControl, WinTitleBar.....etc' could not be found (are you missing a using directive or an assembly reference?)". in the error log is showing the error number are "error CS0234
& error CS0246".
Actually i have created build for automation execution from MTM lab environment. i have to assign the build to the test plan. once the build is passed , i will assign to the test plan and run with automation options.
if i build the solution its getting successfully build. but when i run the created build definition it show the error message's.
Could you guide me how to resolve the above error's ?
Thanks in Advance...Hello Divakar Ponnada,
I have checked the error CS0234 from here:
http://msdn.microsoft.com/en-us/library/0e92xd7b.aspx
It means your project cannot find the proper reference to your type "Visual Studio" from the namespace Microsoft.
May I ask this question, does your build definition means something like the following blog described?
http://www.asp.net/web-forms/overview/deployment/configuring-team-foundation-server-for-web-deployment/creating-a-build-definition-that-supports-deployment
"A build definition is the mechanism that controls how and when builds occur for team projects in TFS. "
If that is the problem, may I ask whether your build agent is in the same machine where you build your application?
The build agent will first search for the reference from its local GAC and if it cannot find it, the error like you said will reports. Please manually build your project from your build agent machine to see the result, or install Visual Studio to your build
agent machine. In that way I think your problem may fixed.
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Database startup showing ORA-00942: table or view does not exist in trace
Hi Friends,
SunOS 5.10 Generic_137112-06 i86pc i386 i86pc , 64 Bit
Oracle 10.2.0.1.0
While I am doing a startup, getting following error.
SQL> startup;
ORACLE instance started.
Total System Global Area 3221225472 bytes
Fixed Size 2122544 bytes
Variable Size 410819792 bytes
Database Buffers 2801795072 bytes
Redo Buffers 6488064 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forcedThe alert log shows the following
Errors in file /applns/oracle/admin/CTSD1/udump/ctsd1_ora_11486.trc:
ORA-00942: table or view does not exist
Error 942 happened during db open, shutting down database
USER: terminating instance due to error 942
Instance terminated by USER, pid = 11486
ORA-1092 signalled during: ALTER DATABASE OPEN...A look at the trace file shows this
/applns/oracle/admin/CTSD1/udump/ctsd1_ora_11486.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /applns/oracle
System name: SunOS
Node name: N890
Release: 5.10
Version: Generic_137112-06
Machine: i86pc
Instance name: CTSD1
Redo thread mounted by this instance: 1
Oracle process number: 23
Unix process pid: 11486, image: oracle@N890 (TNS V1-V3)
*** SERVICE NAME:() 2011-02-16 19:24:50.188
*** SESSION ID:(325.3) 2011-02-16 19:24:50.188
Successfully allocated 3 recovery slaves
Using 367 overflow buffers per recovery slave
Thread 1 checkpoint: logseq 45929, block 2, scn 310788795>cache-low rba: logseq 45929, block 3
>on-disk rba: logseq 45929, block 52, scn 310788832
>start recovery at logseq 45929, block 3, scn 0
----- Redo read statistics for thread 1 -----
Read rate (ASYNC): 24Kb in 0.31s => 0.08 Mb/sec
Total physical reads: 4096Kb
Longest record: 0Kb, moves: 0/61 (0%)
Longest LWN: 16Kb, moves: 0/3 (0%), moved: 0Mb
Last redo scn: 0x0000.128642df (310788831)
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 4/4 = 1.0
Max compares per lookup = 1
Avg compares per lookup = 117/121 = 1.0
*** 2011-02-16 19:24:50.515
KCRA: start recovery claims for 4 data blocks
*** 2011-02-16 19:24:50.515
KCRA: blocks processed = 4/4, claimed = 4, eliminated = 0
*** 2011-02-16 19:24:50.516
Recovery of Online Redo Log: Thread 1 Group 1 Seq 45929 Reading mem 0
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 1
Average hash chain = 4/4 = 1.0
Max compares per lookup = 1
Avg compares per lookup = 121/121 = 1.0
ORA-00942: table or view does not existI have searched MOS and Google, but didn;'t get any relevant results.
Also flushed my shared_pool as mentioned in (http://www.tanelpoder.com/files/oracle_rowcache.pdf) after mount and started , still no luck
Any help is appreciated
Thanks
SSNHi,
Thanks.
Tried log mining, but still couldn't find the culprit. I think now, I have to drop and create this db.Still wondering what might have happened.
select group#,status from v$log;
GROUP# STATUS
1 INACTIVE
3 INACTIVE
2 CURRENT
SQL> select group#,MEMBER from v$logfile where group#=2;
GROUP#
MEMBER
2
/applns/oracle/oradata/CTSD1/redo02.log
SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo02.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
PL/SQL procedure successfully completed.
SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
PL/SQL procedure successfully completed.
SQL> SELECT COUNT (*) FROM v$logmnr_contents WHERE operation = 'DDL';
COUNT(*)
0
SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
PL/SQL procedure successfully completed.
SQL> select group#,MEMBER from v$logfile where group#=1;
GROUP#
MEMBER
1
/applns/oracle/oradata/CTSD1/redo01.log
1
/applns/oracle/oradata/CTSD1/redolog001.log
SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo01.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
PL/SQL procedure successfully completed.
SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
PL/SQL procedure successfully completed.
SQL> SELECT COUNT (*) FROM v$logmnr_contents WHERE operation = 'DDL';
COUNT(*)
0
SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
PL/SQL procedure successfully completed.
SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redolog001.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
PL/SQL procedure successfully completed.
SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
PL/SQL procedure successfully completed.
SQL> SELECT COUNT (*) FROM v$logmnr_contents WHERE operation = 'DDL';
COUNT(*)
0
SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
PL/SQL procedure successfully completed.
SQL> select group#,MEMBER from v$logfile where group#=3
GROUP#
MEMBER
3
/applns/oracle/oradata/CTSD1/redo03.log
SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo03.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
PL/SQL procedure successfully completed.
SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
PL/SQL procedure successfully completed.
SQL> SELECT COUNT (*) FROM v$logmnr_contents WHERE operation = 'DDL';
COUNT(*)
0
SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
PL/SQL procedure successfully completed.SSN
Maybe you are looking for
-
Uncaught Throwable in processSockets
when i used weblogic6.0 with sp1 for linux, i found an Exception like this: ####<Apr 27, 2001 12:34:30 PM EDT> <Error> <Posix Performance Pack> <webserver> <myserver> <ExecuteThread: '12' for queue: 'default' <> <> <000000> <Uncaught Throwable in pro
-
Help on accessing 2900 console port
I dug up an old 2900 and forgot how to link my pc to the console port to initiate an ip address, etc. Does anyone remember?
-
Cal Average..Urgent.Pls help
Hi Experts I have an Requirement Mat | Arp |May| june |July |aug |Sep |Oct |nov |Dec |Jan |Feb |Mar |Tot| Avg 300 195 494 309 435 793 212 411 398 247 210 379 4783 365.2 Here Total/12 : we will get AVg My R
-
CFexecute, cfx_consolecommand dos/bat file error
Good day all. i have a really confussing problem... Let me break it down I have written an application that requires barcodes. My Printer is a PPLB printer (not really important). So i create a file on the server (This is about all that works fine)..
-
Timing appearance of PPT slideshow elements after importing to Captivate
I know that in Captivate I can import PPT slides along with the animations (bullet points appearing one at a time, etc.), and that if these are timed in PPT, the timing can be preserved on the Captivate timeline after importing... However, do you hav