Run Specific Package through BPF
Hi all,
Am trying to run a Copy package through BPF but it gives me following error:
"Package does not exist or you do not have authority to run the package".
I can run the package directly from DM so its not an Authorization issue.
Here is the following seeting:
Interface: Data Manger
Tasks: Run Specific Package
PACKAGE : Copy
FILE: /CPMB/COPY
TEAM: Company
GROUP: Data Management
Under Owner property is my full qualified username.
I am not able to figure out what am I missing here.
Please help.
Diksha.
Hi Diksha,
More two good clues:
Run Package from BPF
Run spefici package from BPF
Please let me know if these help.
Regards,
Vin
Similar Messages
-
Hello,
I'have created a DM package in the ADMINTEAM folder. I would like to execute it from a BPF, however when I run it the BPF fails because it can't find the file as it looks for it in the Company data manager folder.
This is how I set up the BPF
Package: ImportActual
File: System/ImportActual.dtsx
Team: Adminteam
it should be looking in
Appname/Team Files/ADMINTEAM/DataManager/PackageFiles/System/
but what the BPF does is to search in the following folder:
Appname/DataManager/PackageFiles/System/
Is this a bug or am I doing something wrong?
Thanks
EHi,
This is the usual way the BPC tries to get the package from. When you create the DTSX file, store it in the server
application\DataManager\PackageFiles
The above location is where the DTSX files should be stored.
Then you create the DM package and store it in the company.
This will resolve your issue -
BPF: Run Specific Package vs Run Specific Package for PackageExecution
Simple question:what is the difference?
I used Run Specific Package in the BPF setup, but the package does not launch upon testing
When I use Run Specific Package for PackageExecution it works...Hi Nilanjan,
Can you through some more details or the difference between Run Specific Package & Run Specific Package for PackageExecution.
Thanks in advance.
Raghu B.S. -
Hi,
We were trying to setup a BPF in BPC 7.5 to run a data manager package. In one of the steps, we set the interface to DATA MANAGER and the task to RUN SPECIFIC PACKAGE but we were unsure of what parameter values to use for FILE?
I tried using the process chain name, logic file name, and the package name...each time the BPF step is clicked on, it just says "package file does not exist".
Does any one have a suggestion?
Regards,
NikunjHi,
Try the following steps:
Goto BPC Excel :
Manage Data> Maintain data Management>Manage Packages(organize list)
Select requried package --> right click select Modify Package
Note down Process Chain, Package name and Group from Modify Package window.
1) Maintain Action detail parameters as follows :
PACKAGE : <Package name>
FILE : <Process chain>
TEAM : <Team>
GROUP : <Group>
Eg:
PACKAGE : Copy
FILE : /CPMB/COPY
TEAM : Company
GROUP : Data Management
2) save the changes and close it
3) create a new instance for the changing
4) active the new instance
5) run the BPF again to find the result
hope it helps..
regards,
Raju -
How to Run SSIS Package through SQL AGENT Job
I am good with SSIS, I created a package which will load the excel files to SQL SERVER tables. To Implement this I wrote the C# code to extract the first sheet name only, and then
package will load the data present the first sheet only. The package working fine when i run this through BIDS. But the same package throwing error at C# code step when i am running this package through SQL AGENT JOB. When i searched for this, i have seen
many posts saying that, this is happening becoz of using Microsoft.interop.excel references inside the c# code. Please help me with this. Is there any alternate way in c# to extract the first sheet name(not based on ascending order) of an excel file with out
using interop. Or
How to configure SQL AGENT job to run suceessfully when using interop inside the code.
My UAT server is of 64 bit. And i have to run this in the same server.
I tried creating "Desktop" folder in "C:\Windows\System32\config\systemprofile\"
Error:Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ST_ecfa668f250a45e18c95639c9ffd64d4.csproj.ScriptMain.Main()
--- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr,
Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at
System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags
invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture) at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript() End Error Error: 2015-02-27 11:24:00.23 Code: 0x00000001
Source: User Mail Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error
occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString
connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword,
SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owning...
The package execution fa... The step failed
using System;
using System.Data;
using System.Diagnostics;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
using System.Data.OleDb;
using Microsoft.Office.Interop;
using System.Runtime.InteropServices;
namespace ST_ecfa668f250a45e18c95639c9ffd64d4.csproj
[System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
#region VSTA generated code
enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
#endregion
public void Main()
{ /*Passing the file path via User::File_Name Variable*/
string FileName = Dts.Variables["User::File_Name"].Value.ToString();
Microsoft.Office.Interop.Excel.Application xlApp = null;
Microsoft.Office.Interop.Excel.Workbook excelBook = null;
try
xlApp = new Microsoft.Office.Interop.Excel.Application();
excelBook = xlApp.Workbooks.Open(FileName, Type.Missing,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
string[] excelSheets = new string[excelBook.Worksheets.Count];
int i = 0;
foreach (Microsoft.Office.Interop.Excel.Worksheet wSheet in excelBook.Worksheets)
excelSheets[i] = wSheet.Name;
i++;
Dts.Variables["User::WorkSheetName"].Value = excelSheets[0] + "$";
catch (Exception ex)
excelBook.Close(false, FileName, null);
Marshal.ReleaseComObject(excelBook);
string error = ex.Message;
finally
excelBook.Close(false, FileName, null);
Marshal.ReleaseComObject(excelBook);
Dts.TaskResult = (int)ScriptResults.Success;I installed office in my machine...but this doesn't solved my problem...
Finally i figured out the solution for this and it is working now, Here is the solution...!
Create the folder with name "Desktop" inside the below mentioned path
C:\Windows\SysWOW64\config\systemprofile\
But i really don't understand the logic behind this. Can someone explain it pls.... -
Unable to Run SSIS Package Through SQL Agent Job
Hi,
I recently upgraded SQL server 2008 R2 to SQL Server 2012. I also upgraded all the packages on the server. The package runs fine from BIDS. However when I try to run the package through the SQL Agent Job it fails with the error below:
Executed as user: A. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 11:43:04 PM Could not load package "\FolderA\Package.dtsx"
because of error 0xC00160AE. Description: Connecting to the Integration Services service on the computer "S2345WE" failed with the following error: "Access is denied." By default, only administrators have access to the
Integration Services service. On Windows Vista and later, the process must be running with administrative privileges in order to connect to the Integration Services service. See the help topic for information on how to configure access to the service. Source:
Started: 11:43:04 PM Finished: 11:43:04 PM Elapsed: 0.016 seconds. The package could not be loaded.
Using Windows Authentication I am able to login to Integration services through SSMS. In the SQL Agent job I am using package store to execute the package. I have admin permission on the server. The integration services currently uses my credentials while
running.I am not sure why I am getting this error.
Please advice..
Thanks,
EVA05Hi ,
similar thread - http://social.technet.microsoft.com/Forums/en-US/sqlintegrationservices/thread/25e22c7e-bae0-42e4-b86d-2db7a4af519d
Try this link -
http://msdn.microsoft.com/en-us/library/dd440760%28v=sql.100%29.aspx
sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful. -
Not able to access DM Packages through BPF
Hi Friends
I have created a Team name BPF and i have assigned the user. That user has following task for his task profile.
The Task Profile is neither a SYSTEM, PRIMARY OR SECONDARY ADMIN TYPE.
And the task that are being assinged are
EXECUTE
BPF EXECUTION
SUBMIT DATA
MANAGE BPF
The BPF has been given access to the BPFTEAM and also to the user discreetly.
All other steps, like Input SChedule, Report of the BPF are working.
But when i am clicking the Data Manager step, it is saying that
"THE PACKAGE DOES NOT EXIST OR YOU DO NOT HAVE THE AUTHORITY TO RUN THE PACKAGE"
But after clicking OK to the above message, i can open the package through the Run Data Manager option form the action pane and then run the package
I have given the Data Manage Package access right to the BPF Team throuh EDATA>MANAGE TEAM USER ACCESS.
Please let me know how to go ahead with it.
Thanks & Regards
VIv
Edited by: Vivek_s90 on May 10, 2010 9:05 AMHi Vivek,
You please verify what Nilanjan said, apart from you also please verify your Business Process Flow Step 3, i.e., "Define Steps" .
In that you please verify the "Interface" and the "Task". There you check have you selected the correct / required things.
I hope this may help you.
Raghu B.S. -
Running DTS package through JSP application
Hi
I am working on a web application using JSP. I need to run a dts package(SQL Server 2000 ) on each clicking of a button and also pop up a donload window for the file generated by this dts.
The dts package is saved in "C:\Classification" folder on server and the file generated by this dts is also saved in this location.
I tried a lot to get some help on this regard but could not get any . So any kind of suggestion or code or any stuffs may help me a lot.
Thank uhello,
you just want to serve a file from a servlet??
set the good mime type of the response
then write your file binary to the output stream of the response
//in your servlet
response.setContentType("<mime type of dts >");
OutputStram out=response.getOutputStream();
InputStream in = new FileInputStream("C:\\Classification\\<yourfile>");
IOUtils.copy(in, out); //you'll find this one in the commons-io package, on the apache website
in.close();
out.close();for the "pop up" thing... it's a client side (html/javascript) matter -
Error running a Copy Package from BPF (BPC7.5)
Hi all,
I'm on BPC75 NW SP09, and Iu2019m trying to run the standard u201CCopyu201D package through BPF but it gives me following error message: IMMEDIATE RUN: Error occurred while trying to run the package on the server Data not found in table (UJD_PACKAGES2). It works fine when I run manually/directly in Data Manager.
Here my BPF settings: Interface: Data Manager; Task: RUN SPECIFIC PACKAGE; PACKAGE: Copy; FILE: /CPMB/COPY; TEAM: Company; GROUP: Data Management
I have searched other related threads to validate my configuration and I have also checked the table UJD_PACKAGES2 but it seems to be okay. The only thing that I noticed is that it does not have the TEAM populated in this table.
Any idea on how to resolve this issue? Your comments/suggestions are very much appreciated.
Thanks,
Heverton
Edited by: Heverton Oliveira on Jan 13, 2012 9:24 PMHi all,
I'm on BPC75 NW SP09, and Iu2019m trying to run the standard u201CCopyu201D package through BPF but it gives me following error message: IMMEDIATE RUN: Error occurred while trying to run the package on the server Data not found in table (UJD_PACKAGES2). It works fine when I run manually/directly in Data Manager.
Here my BPF settings: Interface: Data Manager; Task: RUN SPECIFIC PACKAGE; PACKAGE: Copy; FILE: /CPMB/COPY; TEAM: Company; GROUP: Data Management
I have searched other related threads to validate my configuration and I have also checked the table UJD_PACKAGES2 but it seems to be okay. The only thing that I noticed is that it does not have the TEAM populated in this table.
Any idea on how to resolve this issue? Your comments/suggestions are very much appreciated.
Thanks,
Heverton
Edited by: Heverton Oliveira on Jan 13, 2012 9:24 PM -
Memory error when executing package through SQL Server Agent.
Hi!!
I have a problem with a package (SSIS) when run on SQL Server Agent.
The job is configured
with the proxy and the account has the
required privileges. Runs perfectly
if the job runs manually, but if I let it
run on schedule I get a memory error.
Also if I run the
package through DTExec.exe or VS2008,
everything runs smoothly.
I am using SQL2008R2.
If someone has something similar happened
and have found how to fix it please i need
to know how.
Thank you.This is most likely your issue:
http://support.microsoft.com/kb/824422 -
How to run an SQL package through Java jdbc
I am porting a VB application to Java and have run across this problem..
I am attempting to run a package using this SQL:
strSQLStmt = "{CALL PKG.PKGGetData({resultset 500,Date,Serial,ID})}";It worked in VB but now in Java I get this error:
Non supported SQL92 token at position: 34: resultset
java.sql.SQLException: Non supported SQL92 token at position: 34: resultset
Does JDBC not support this type of SQL or is there a different method to run it?
Thanks,
~JohnThe problem is that
"{CALL PKG.PKGGetData({resultset
500,Date,Serial,ID})}";is not SQL by any stretch of the imagination. I don't
know VB, but it sort of looks like the result set (or
the SQL) was created earlier, and this line either
executes the SQL or extracts data from the result
set.
In any case, if you don't recognize that the above
line isn't SQL, then you need to read up on SQL &
JDBC. To give a partial answer to your question, JDBC
supports result sets quite nicely.It must be by some means... There are no prior calls to the DB in the VB app and this "SQL" code is what is callign the stored package and function which returns a cursor. This is all the "sql" there is, so obviousy Oracle can understand it and my problem is on the Java side because JDBC doesnt like it. I have attempted using Callable Statement like such...
strSQLStmt = "? = {CALL bPKG.BPKGGetData(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
CallableStatement stmt = dbBows.getConn().prepareCall(strSQLStmt); //dbBows is a connection class i have created. I ensure you it is making a standard JDBC conn to the DB. getConn() just returns the connection object.
stmt.registerOutParameter(1, OracleTypes.CURSOR);
stmt.setString(2, "resultset 500");
stmt.setString(3, "Serial");
stmt.setString(4, "Date");
stmt.setString(5, "Agent");
// ... this is done for all the inputs to the function
//Execute
stmt.execute();Every time it gets to the "stmt.execute()" line it fails with a null pointer exception. Again, i have tested the connection, the stmt, and the sql String and they are all valid and NOT null.
Any ideas would be appreciated.
Thanks,
John -
Executing SSIS packages through SQL Server Jobs.
Hi,
I have an SSIS package which generates xml and text files and ftps it to an ftp site. When i run the package from BIDS it works successfully but when i run it from a job it fails. My SSIS package connects to DB server A and though i'm creating a job on DB
server A but my folder structure and the package resides in server B from where i'm connecting to DB server A through Management Studio. I'm using File system in SQL server Agent Job to call the package. When i execute the job i get following error:
Executed as user: I\A. ...er Execute Package Utility Version 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 5:08:05 PM Error: 2011-06-21 17:08:05.11
Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted. End Error Error: 2011-06-21 17:08:05.11 Description:
Failed to open package file "E:\P\H\R\Tools\R\R\R.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the
result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has . The step failed.
Could you please tell me where am i going wrong?
Thanks,
Deepti
DeeptiHi Christa Kurschat,
I'm running the job under proxy account. And that account has sysadmin permissions.
I used following script to create proxy account and run my package under that account:
I. Create job executor account
Highlight Security->New Login, say to make login as devlogin, type your password, default database can be your target database.
Server roles: check �sysadmin�
User mapping: your target database
Msdb database: you make sure to include
SQLAgentUserRole, SQLAgentReaderRole, SQLAgentOperatorRole
Then click OK
II. Create SQL proxy account and associate proxy account with job executor account
Here is the code and run it the query window.
Use master
CREATE CREDENTIAL [MyCredential] WITH IDENTITY = 'yourdomain\myWindowAccount', secret = 'WindowLoginPassword'
Use msdb
Sp_add_proxy @proxy_name='MyProxy', @credential_name='MyCredential'
Sp_grant_login_to_proxy @login_name=' devlogin', @proxy_name='MyProxy'
Sp_grant_proxy_to_subsystem @proxy_name='MyProxy', @subsystem_name='SSIS'
III. Create SSIS package
In MS SQL Server Business Intelligence Development Studio, you use job executor account devlogin to create the SSIS package (DTS) and make sure you can execute this package
in SQL Server Business Intelligence Development Studio. Compile/build this package.
IV. Create the job, schedule the job and run the job
In SQL Server Management Studio, highlight SQL Server Agent -> Start. Highlight Job ->New Job�, name it , myJob.
Under Steps, New Step, name it, Step1,
Type: SQL Server Integration Service Package
Run as: myProxy
Package source: File System
Browse to select your package file xxx.dtsx
Click Ok
Schedule your job and enable it
I followed these steps.
Thanks,
Deepti
Deepti -
"VS_NEEDSNEWMETADATA" error while running a package created from C# code
I have gone through most of the answers for similar questions here however none has resolved the issue. We have created a package using C# code which stages data from a source table to destination (ChildPackage.dtsx).
Source Table : RowKey, Col1, Col2
Destination Table : RowKey, Col1, Col2, RowID, RunID (RowID is an identity column in destination table and RunID is a derived column whose value is set using a variable)
This package runs fine when we execute it directly however, we run these packages from a master package (MasterPackage.dtsx). When we are trying to run the package (ChildPackage) from a MasterPackage we get an error:
[SSIS.Pipeline] Error: "Oledb Destination" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
We have tried setting DelayValidation to true for the ChildPackage and even tried setting the values for "ValidateExternalMetadata" for the source and destination component as "False" for the data flow task
of the ChildPackage.
There is no case difference between column names in source and destination and it runs fine when we run the ChildPackage directly.
The only additional task that the Master package performs is to generate and set a variable that is used as RunID value by the child package.
If we hardcode the RunID in the ChildPackage and run it directly, it runs fine.
The MasterPackage.dtsx is not created from code and has a step to run ChildPackage.dtsx. We generate the ChildPackage.dtsx from code and replace in original solution.
Any help would be appreciated.
Gaurav AgarwalWhere then this RunID is consumed?
Arthur My Blog
The RunID is set by the MasterPackage in a parameter, this parameter is used as value of derived column in the data transformation task of the ChildPackage.
As mentioned ChildPackage has a RunID column.
Gaurav Agarwal -
I need help to run this package and i got some error
create or replace
PACKAGE BODY SUBS_INS_API_sun
AS
PROCEDURE SUBSCRIBER_INS_sun
(SOURCE_SYS_ID IN VARCHAR2,
TRACKING_ID IN VARCHAR2,
ACCOUNT_NO IN VARCHAR2,
prepaidActDevDetails_tab IN prepaidactdvcdetailsobj_sun,
ERROR_CODE OUT VARCHAR2)
IS
Input_Parameter_Is_Null EXCEPTION;
pragma exception_init(Input_Parameter_Is_Null,-2000);
prepaidAccountDetails prepaidActDevDetails_tab:= prepaidActDevDetails_tab(NULL,NULL,NULL,NULL,NULL);
STATUS VARCHAR2(1):='1';
cust_no VARCHAR(10);
m_mac_id VARCHAR2(20);
subscriber_master_Rec subscriber_master%ROWTYPE :=NULL;
flg NUMBER(1);
BEGIN
IF(Source_Sys_Id IS NULL OR Tracking_Id IS NULL OR ACCOUNT_NO IS NULL OR prepaidAccountDetails.LAST=0) THEN
RAISE Input_Parameter_Is_Null;
END IF;
BEGIN
select cm_cust_no into cust_no from customer_master where cm_cust_id=ACCOUNT_NO and cm_status in('A','P','0');
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
STATUS:='0';
END;
BEGIN
FOR i IN prepaidAccountDetails.FIRST .. (prepaidAccountDetails.LAST) LOOP
prepaidAccountDetails1:=prepaidActDevDetails_tab(i);
prepaidAccountDetails1.Status_of_device:='1';
IF (prepaidAccountDetails.Account_id is NULL OR prepaidAccountDetails.Mac_Id is NULL or prepaidAccountDetails.LOB_value is NULL) THEN
RAISE Input_Parameter_Is_Null;
END IF;
IF(prepaidAccountDetails.LOB_value = 'VDO') THEN
IF(prepaidAccountDetails.Channel_Line_Up is NULL) THEN
Error_code :='SI002';
DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
STATUS:=0;
prepaidAccountDetails.Status_of_device:='0';
END IF;
END IF;
begin
select 1 into flg from subscriber_master where pm_phone_no=prepaidAccountDetails.Mac_Id and pm_status in('P','0','A','B');
EXCEPTION
WHEN NO_DATA_FOUND THEN
flg:=0;
END;
if(flg=1) then
DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
STATUS:=0;
prepaidAccountDetails.Status_of_device:='0';
END IF;
begin
select md_mac_id into m_mac_id from mac_details where md_mac_id=prepaidAccountDetails.Mac_Id and md_start_date<=sysdate
and md_status='A';
EXCEPTION when OTHERS then
Error_code :='SI004';
DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
STATUS:=0;
prepaidAccountDetails.Status_of_device:='0';
end;
if(STATUS= 1 and prepaidAccountDetails.Status_of_device='1') then
SELECT PM_SUBS_ACT_NO_SEQ.nextval
INTO subscriber_master_rec.PM_SUBS_ACT_NO
FROM dual;
subscriber_master_Rec.pm_phone_no :=prepaidAccountDetails.Mac_Id;
subscriber_master_Rec.pm_open_date :=sysdate;
subscriber_master_rec.pm_status :='P';
subscriber_master_rec.PM_CUST_LVL_YN:='S';
subscriber_master_rec.PM_EQUP_CODE:=prepaidAccountDetails.LOB_value;
subscriber_master_rec.PM_HOME_AREA:='HOM';
subscriber_master_rec.PM_USG_CODE:='USG';
subscriber_master_rec.PM_NO_TYPE:='S';
subscriber_master_rec.PM_TCG_CODE:='DEF';
subscriber_master_rec.PM_APLN_DATE:=sysdate;
subscriber_master_rec.PM_USER2:=prepaidAccountDetails.LOB_value;
subscriber_master_rec.PM_USER3:=prepaidAccountDetails.Channel_Line_Up;
subscriber_master_rec.pm_cust_no:=cust_no;
INSERT INTO subscriber_master VALUES subscriber_master_rec;
END IF;
END LOOP;
END;
END SUBSCRIBER_INS_sun;
END SUBS_INS_API_sun;
and
i got this error
Package Body PREPAID_TESTNEW.SUBS_INS_API@PREPAID_TESTNEW
Error(73,4): PL/SQL: Statement ignored
Error(73,99): PLS-00302: component 'LAST' must be declared
Error(87,6): PL/SQL: Statement ignored
Error(87,37): PLS-00302: component 'FIRST' must be declared
please help to run this package if anyone knowsnow i corrected my package. It working fine. But, how to run this package via procedure. my procedure check below. I give all the details about my package check below.
---pkg specification
create or replace
PACKAGE SUBS_INS_API_SS
IS
PROCEDURE SUBSCRIBER_INS_SS
(SOURCE_SYS_ID IN VARCHAR2,
TRACKING_ID IN VARCHAR2,
ACCOUNT_NO IN VARCHAR2,
prepaidActDevDetails_tab IN prepaidActDeviceDetails_tabobj,
ERROR_CODE OUT VARCHAR2);
END SUBS_INS_API_SS;
-----pkg body
create or replace
PACKAGE BODY SUBS_INS_API_SS
AS
PROCEDURE log_error (ip_code IN VARCHAR2,
ip_message IN VARCHAR2,
ip_description IN VARCHAR2)
IS
BEGIN
INSERT INTO ERR_LOG (IEL_REF_ID,
IEL_DATE,
IEL_CODE,
IEL_MSG,
IEL_DESC)
VALUES (IVRS_ERR_LOG_SEQ.NEXTVAL,
SYSDATE,
ip_code,
ip_message,
ip_description);
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
END log_error;
PROCEDURE INSERT_WS_LOG (SOURCE_SYS_ID IN VARCHAR2,
STATUS IN VARCHAR2,
TRACKING_ID IN VARCHAR2,
ACCOUNT_ID IN VARCHAR2,
MAC_ID IN VARCHAR2)
IS
ws_log_rec WS_LOG%ROWTYPE := NULL;
BEGIN
SELECT WS_LOG#REC#ID.NEXTVAL INTO ws_log_rec.rec#id FROM DUAL;
ws_log_rec.VER#ID := 1;
ws_log_rec.CRE#TS := SYSDATE;
ws_log_rec.wl_source := SOURCE_SYS_ID;
ws_log_rec.wl_status := Status;
ws_log_rec.wl_tracking_id := tracking_id;
ws_log_rec.wl_account_id := account_id;
ws_log_rec.wl_mac_id := mac_id;
INSERT INTO ws_log
VALUES ws_log_rec;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
END INSERT_WS_LOG;
PROCEDURE REPLICO_DEV_INFO( Acc_id IN VARCHAR2, Mc_Id IN VARCHAR2,channel IN VARCHAR2,
LOB_VAL IN VARCHAR2, outlet1 IN VARCHAR2, kit_cod IN VARCHAR2,
serial_No IN VARCHAR2, shipperr IN VARCHAR2, estm_recived_date IN date)
IS
Replico_device_info_det_Rec Replico_device_info_det%ROWTYPE := NULL;
REC_ID NUMBER;
BEGIN
SELECT REPLICO_DEVICE_INFO_DET#RECID.nextval INTO REC_ID FROM dual;
Replico_device_info_det_Rec.REC#ID := REC_ID;
Replico_device_info_det_Rec.ACCOUNT_ID := Acc_id;
Replico_device_info_det_Rec.MAC_ID := Mc_Id;
Replico_device_info_det_Rec.CHANNEL_LINE_UP := channel;
Replico_device_info_det_Rec.LOB_VALUE := LOB_VAL;
Replico_device_info_det_Rec.OUTLET := outlet1;
Replico_device_info_det_Rec.KIT_CODE := kit_cod;
Replico_device_info_det_Rec.SERIAL_NUMBER := serial_No;
Replico_device_info_det_Rec.SHIPPER := shipperr;
Replico_device_info_det_Rec.ESTIMATED_RECIVED_DATE := estm_recived_date;
INSERT INTO replico_device_info_det
VALUES Replico_device_info_det_Rec;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
END REPLICO_DEV_INFO;
PROCEDURE SUBSCRIBER_INS_SS (
SOURCE_SYS_ID IN VARCHAR2,
TRACKING_ID IN VARCHAR2,
ACCOUNT_NO IN VARCHAR2,
prepaidActDevDetails_tab IN prepaidActDeviceDetails_tabobj,
ERROR_CODE OUT VARCHAR2)
IS
Input_Parameter_Is_Null EXCEPTION;
PRAGMA EXCEPTION_INIT (Input_Parameter_Is_Null, -2000);
prepaidAccountDetails prepaid_act_dvc_details_obj
:= prepaid_act_dvc_details_obj (NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
STATUS VARCHAR2 (1) := '1';
cust_no VARCHAR (10);
m_mac_id VARCHAR2 (20);
channel_lineup VARCHAR2 (25);
LOB_VALUE VARCHAR2 (25);
subscriber_master_Rec subscriber_master%ROWTYPE := NULL;
Replico_device_info_det_Rec Replico_device_info_det%ROWTYPE := NULL;
flg NUMBER (1);
plan_code VARCHAR2(10);
subs_aact_no NUMBER(20);
m_plan_code1 payment_transaction_history.TH_PLAN_CODE%type;
m_payment_mode1 payment_transaction_history.TH_PAYMENT_MODE%type;
pm_phone_no_cur subscriber_master.pm_phone_no%type;
pm_status_cur subscriber_master.pm_status%type;
pm_user2_cur subscriber_master.pm_user2%type;
pm_user9_cur subscriber_master.pm_user9%type;
pm_cust_no_cur subscriber_master.pm_cust_no%type;
pm_cust_1 subscriber_master.pm_cust_no%type;
cm_i customer_master.cm_status%type;
CURSOR subs_rec is select pm_cust_no, pm_phone_no, pm_status, pm_user2, pm_user9 from subscriber_master
where pm_cust_no = cust_no and pm_status= 'S';
BEGIN
IF ( Source_Sys_Id IS NULL
OR Tracking_Id IS NULL
OR ACCOUNT_NO IS NULL
OR prepaidActDevDetails_tab.LAST = 0)
THEN
RAISE Input_Parameter_Is_Null;
END IF;
BEGIN
SELECT cm_cust_no
INTO cust_no
FROM customer_master
WHERE cm_cust_id = ACCOUNT_NO AND cm_status IN ('A', 'P', '0');
EXCEPTION
WHEN NO_DATA_FOUND
THEN
ERROR_CODE := 'SI001';
log_error ('SI001',
SQLERRM,
'No Customer exist with Active or Pre Actiavted');
INSERT_WS_LOG (Source_Sys_Id,
'F',
Tracking_Id,
Account_No,
prepaidAccountDetails.Mac_Id);
STATUS := '0';
END;
BEGIN
FOR i IN prepaidActDevDetails_tab.FIRST ..
(prepaidActDevDetails_tab.LAST)
LOOP
prepaidAccountDetails := prepaidActDevDetails_tab (i);
prepaidAccountDetails.Status_of_device := '1';
IF ( prepaidAccountDetails.Account_id IS NULL
OR prepaidAccountDetails.Mac_Id IS NULL
OR prepaidAccountDetails.LOB_value IS NULL)
THEN
RAISE Input_Parameter_Is_Null;
END IF;
IF (prepaidAccountDetails.LOB_value = 'VIDEO')
THEN
/* Commented as channel lineup is not coming from the input request */
/*IF(prepaidAccountDetails.Channel_Line_Up is NULL) THEN
Error_code :='SI002';
log_error ('SI002', SQLERRM, 'Channel line up is mandatory for Video');
INSERT_WS_LOG(Source_Sys_Id,'F',Tracking_Id,Account_No,prepaidAccountDetails.Mac_Id);
STATUS:=0;
prepaidAccountDetails.Status_of_device:='0';
END IF;*/
SELECT EC_CHANNEL_LINEUP
INTO channel_lineup
FROM ELIGIBLE_CUSTOMER
WHERE EC_CUSTOMER_NO = cust_no;
END IF;
BEGIN
SELECT 1
INTO flg
FROM subscriber_master
WHERE pm_phone_no = prepaidAccountDetails.Mac_Id
AND pm_status IN ('P', '0', 'A', 'B');
EXCEPTION
WHEN NO_DATA_FOUND
THEN
flg := 0;
END;
IF (flg = 1)
THEN
ERROR_CODE := 'SI003';
log_error ('SI003',
SQLERRM,
'Customer Already Exist with given Mac Id');
INSERT_WS_LOG (Source_Sys_Id,
'F',
Tracking_Id,
Account_No,
prepaidAccountDetails.Mac_Id);
STATUS := 0;
prepaidAccountDetails.Status_of_device := '0';
END IF;
BEGIN
SELECT md_mac_id
INTO m_mac_id
FROM mac_details
WHERE md_mac_id = prepaidAccountDetails.Mac_Id
AND md_start_date <= SYSDATE
AND md_status = 'A';
EXCEPTION
WHEN OTHERS
THEN
ERROR_CODE := 'SI004';
log_error ('SI004', SQLERRM, 'Invalid Mac Id');
INSERT_WS_LOG (Source_Sys_Id,
'F',
Tracking_Id,
Account_No,
prepaidAccountDetails.Mac_Id);
STATUS := 0;
prepaidAccountDetails.Status_of_device := '0';
END;
select pm_cust_no into pm_cust_1 from subscriber_master where pm_cust_no = cust_no;
IF (STATUS = 1 AND prepaidAccountDetails.Status_of_device = '1')
THEN
SELECT DECODE (prepaidAccountDetails.LOB_value,
'HSD', 'HSD',
'VIDEO', 'VDO')
INTO LOB_VALUE
FROM DUAL;
OPEN subs_rec;
LOOP
FETCH subs_rec into pm_cust_no_cur, pm_phone_no_cur, pm_status_cur, pm_user2_cur, pm_user9_cur;
IF subs_rec%FOUND THEN
IF
( pm_cust_1 = pm_cust_no_cur and pm_user2_cur= LOB_VALUE and pm_user9_cur = prepaidAccountDetails.outlet and pm_status_cur = 'S')
THEN
update subscriber_master set pm_phone_no = prepaidAccountDetails.Mac_Id, pm_status = 'P', pm_name = prepaidAccountDetails.Mac_Id
where pm_cust_no = pm_cust_no_cur and pm_user9 = prepaidAccountDetails.outlet;
select cm_status into cm_i from customer_master where cm_cust_no = pm_cust_no_cur;
IF( cm_i = '0')
THEN
update customer_master set cm_status = 'P' where cm_cust_no = pm_cust_no_cur;
END IF;
REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
ELSIF
( pm_cust_1 = pm_cust_no_cur and pm_user2_cur= LOB_VALUE and pm_user9_cur = null and pm_status_cur = 'S')
THEN
update subscriber_master set pm_phone_no = prepaidAccountDetails.Mac_Id, pm_status = 'P', pm_name = prepaidAccountDetails.Mac_Id, pm_user9 = prepaidAccountDetails.outlet
where pm_cust_no = pm_cust_no_cur and pm_user9 = NULL;
update customer_master set cm_status = 'P' where cm_cust_no = pm_cust_no_cur;
REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
END IF;
ELSIF subs_rec%NOTFOUND THEN
SELECT PM_SUBS_ACT_NO_SEQ.NEXTVAL
INTO subs_aact_no
FROM DUAL;
subscriber_master_rec.PM_SUBS_ACT_NO := subs_aact_no;
subscriber_master_Rec.pm_phone_no :=
prepaidAccountDetails.Mac_Id;
subscriber_master_Rec.pm_open_date := SYSDATE;
subscriber_master_rec.pm_status := 'P';
subscriber_master_rec.PM_CUST_LVL_YN := 'S';
subscriber_master_rec.PM_EQUP_CODE := LOB_VALUE;
subscriber_master_rec.PM_HOME_AREA := 'HOM';
subscriber_master_rec.PM_USG_CODE := 'USG';
subscriber_master_rec.PM_NO_TYPE := 'S';
subscriber_master_rec.PM_TCG_CODE := 'DEF';
subscriber_master_rec.PM_APLN_DATE := SYSDATE;
subscriber_master_Rec.PM_NAME := prepaidAccountDetails.Mac_Id;
subscriber_master_Rec.PM_STAFF_id := '16';
subscriber_master_rec.PM_USER2 := LOB_VALUE;
subscriber_master_rec.PM_USER3 := channel_lineup;
subscriber_master_rec.pm_cust_no := cust_no;
subscriber_master_rec.PM_USER8 := 'Y';
INSERT INTO subscriber_master
VALUES subscriber_master_rec;
REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
END IF;
END LOOP;
CLOSE subs_rec;
SELECT TH_PLAN_CODE,TH_PAYMENT_MODE
INTO m_plan_code1,m_payment_mode1
FROM PAYMENT_TRANSACTION_HISTORY
WHERE TH_CUSTOMER_NO = cust_no
AND TH_LOB = LOB_VALUE
AND TH_SUBSCRIBER_NO IS NULL;
IF(LOB_VALUE = 'HSD') THEN
IF(m_plan_code1 = 'SIKI') THEN
plan_code := 'SIKI';
ELSE
plan_code := 'KIT';
END IF;
ELSE
IF(m_plan_code1 = 'SIKT') THEN
plan_code := 'SIKT';
ELSE
plan_code := 'TV';
END IF;
END IF;
UPDATE PAYMENT_TRANSACTION_HISTORY SET TH_SUBSCRIBER_NO = subs_aact_no, th_writeback_status = 'Y' WHERE TH_CUSTOMER_NO = cust_no AND TH_PLAN_CODE = plan_code;
COMMIT;
END IF;
END LOOP;
END;
END SUBSCRIBER_INS_SS;
END SUBS_INS_API_SS;
--- type object
create or replace
TYPE prepaid_act_dvc_details_obj--prepaidAccountDeviceDetailsObj
AS OBJECT ( Account_id VARCHAR2 ( 25 )
, Mac_Id VARCHAR2 ( 25 )
, Channel_Line_Up VARCHAR2 ( 25 )
, LOB_value VARCHAR2 ( 25 )
, Status_of_device VARCHAR2 ( 25 )
, outlet VARCHAR2(25)
, kit_code VARCHAR2(25)
, serial_Number VARCHAR2(25)
, shipper VARCHAR2(25)
, estimated_recived_date date )
type---
create or replace
TYPE prepaidActDeviceDetails_tabobj as table of prepaid_act_dvc_details_obj
---- i need to run this package via separate procedure. but i don't know how to pass the variable. because the passing argument contain object tab variable. please help me.. give me suggestion or procedure to run this pkg. -
Hi Team,
I am running a sql server job which is loading data to a sharepoint document library.File is an excel format and is getting loaded
when executed through SSDT solution .But when i am using an SQL Agent job to pick up the file it doesnt get the path and agent job fails with the error "Failed to acquire connection".I have deployed the SSIS Package through SQL Server 2012 deployment
methodologies.
I am not able to trace the error of loading data from a sharepoint library.library. Sql agent jobs works fine when i give local path.The
account which is running the sql agent job is the same who has access to document library.I also tried to run the job through proxy account. I am using a xml configuraion to store my credentials.I am able to palce the same file to a network drive in the same
server through sql server agent job. The only problem is when I am trying to load the file to a sharepoint folder.
Thanks,
Arsa..Is that the WebDAV method that you are suggesting here to map the n/w drive?
Its kind of webdav but you will be using windows nw drive to store data
yes, I am able to create the file to D: , but didn't check with the C:.
Try with c:, as c: require special permisssions
If this helped you resolve your issue, please mark it Answered
Maybe you are looking for
-
Low memory warning on my iPad (3rd gen)
I'm receiving a low memory warning on my iPad (3rd generation), but I can't find the RAM info anywhere under the Settings. I always close my apps using the Home button, so nothing should be open except the app I'm using. How can I see the RAM avail
-
Hard drive Locked, Unable to reinstall
I am trying to re-install Lion after making the ghastly mistake of messing with my HD permissions, completely messing up all my Sytem/library/extension/...Kext files, not that I understand what they are. I did this because I continued to run into per
-
Using Audacity software?
Anyone know how to rip audio using Audacity if there's no "wave mix" selection from the input source on new versions of the software for Mac?
-
Entry view posting key not defaulting to General ledger view
Hello guys, I did a downpayment to my vendors account with assignment to asset under construction and noticed that the posting key of the bank accounts line did not default to the GL view.So instead of a credit to the bank i have a debit to the bank
-
Domain name within iweb & hosting
*I recently purchased a domain name for a site that I will be working on.* *There are two things that I would like to do:* *1. Host the web site on my mac which is running OS X 10.5.6* *2. Use iWeb '09 to develop the site* *I would like to know how t