Exchange 2013 DAG with single site and 2 multi-role servers with error "MapiExceptionIllegalCrossServerConnection"

Hi,
I've got a lab with a domain controller and an Hyper-v with on it two multi-role exchange 2013 CU7 servers on W2K12 R2 OS, configured in DAG semplified (but the problem is the same also if I use the classical DAG configuration), a witness server, and a L7
load balancer for the exchange servers.
When I made the test to disable the OWA application pool where I've got the active mailbox database of the user, the balancer in correct manner redirect the session to the other exchange multi-role server, but the client in  his OWA session is no more
able to send new mail with the error "Error your request can't be completed rigt now. Please try again later."
The only strange log that I see on the server in the MAPI client access directory where there is the following error message:
2015-01-21T08:00:45.132Z,956,1,/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=1247f28558d24d4db872ab127b3e5810-Healt,,Microsoft.Exchange.RpcClientAccess.Monitoring.dll,15.0.0.0,Cached,,,,MapiHttp,Client=Microsoft.Exchange.RpcClientAccess.Monitoring,R:4ab7b6c8-54ee-4be3-aa9d-f8c856c4c47c:2,C:MAPIAAAAAOC4+7OCoZOjkqeKuoumlKSEtYO5ibyGs4bc/879z/vD9sX1zP28AwAAAAAAAA==|S:0-mGmHRQ==,OwnerLogon,0x6BB
(rpc::Exception),00:00:00.0310000,"Logon: Owner, /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=1247f28558d24d4db872ab127b3e5810-Healt in database  last mounted on Exch2.lab.net",RpcEndPoint: [ServerTooBusyException]
Client is being backed off -> [ClientBackoffException] Mailbox was moved to a different mailbox server. A client needs to retry. -> [IllegalCrossServerConnectionException] Cannot open mailbox /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=1247f28558d24d4db872ab127b3e5810-Healt.
-> [MapiExceptionIllegalCrossServerConnection] Monitoring mailbox [] with application ID [Client=MSExchangeRPC] is not allowed to make cross-server calls from [Exch1.lab.net] to [Exch2.lab.net] [diag::AAAOAAAA/wAAAAAAAAAAAgAAAAA=],,,[email protected],
The CAS try to access the mailbox on the other server, but without success.
Someone have idea how to solve?
Thanks

Hi Hinte, sorry for the answer delay.
I've run the command you suggest to check the HealthMailbox status, but seems that all are fine:
[PS] C:\Windows\system32>get-Mailbox -Monitoring | ft name, servername
Name                                                        ServerName
HealthMailbox7021deb6ae104dadbf52feedfa7fa68b               exch1
HealthMailboxb83c9040b32e4d1197f7f54f6709bb7f               exch1
HealthMailboxb1c32037890b43fbb2af2efe7c36ba00               exch1
HealthMailbox8d174269b494458daf9ade5099e22845               exch1
HealthMailboxaa7d10f02d2d4cc588243b291ead3e3a               exch1
HealthMailboxeb32c30a019f42968a7cbc49a6ac3e65               exch1
HealthMailboxc6ff1d36ba154c5db5411b44718edcbd               exch1
HealthMailbox75dc7caa7e8c4a3b812a01b607536d48               exch1
HealthMailbox16c86e512f454e7890b80c180ce19c00               exch1
HealthMailboxc6e447f7dba24d9b913f1dfcabe9f927               exch1
HealthMailbox40fa5a3f2abc4accae6286cd98abc90a               exch1
HealthMailbox2712b9544bad4e7b8b671be2cda8cfde               exch2
HealthMailboxe2559124da20499386bf8103dcb21e9b               exch2
HealthMailbox3264c6078dad45d4a78c56a3afe81df1               exch1
HealthMailboxacacc51eb8bc4717b295ddf0adccf77e               exch2
HealthMailbox64c4dd8cddac4c4e8bb7314010e797b1               exch1
HealthMailbox4a92bfa14fdd47fbb27c19513f6d2beb               exch2
HealthMailbox465d2a69de93430e84b4d699a88cb0c3               exch1
HealthMailbox97b578e57cd44204820fffa416b25633               exch2
HealthMailboxb411059771db4647bb775c665ec29440               exch1
HealthMailboxf981dde6f4134f839bf41eb0000434e4               exch2
HealthMailboxc33801c7c3b1474f8aa6065249bb4fca               exch1
HealthMailbox2282128ed8d14937998212edd15adf20               exch2
HealthMailboxe3d12b756cf545239b38be4607904ae1               exch2
[PS] C:\Windows\system32> 
Regarding the test sugested to diable instead the OWA App Pool only the OWA virtual directory, I've not found on IIS the possibility to stop the access to this virtual directory.
Also on exchnage Administration page there is no the possibility to switch off this virtual directory only (or I don't found where is this setting).
Regards

Similar Messages

  • Exchange 2013 2 Node Multi role Servers with DAG issues connecting OWA users

    Hi
    I am on a job at the moment whereby I have 2 exchange 2013 multi role servers. Both are CAS and Mailbox servers. I have 2 databases, 1 called MBXDB01 and the other MBXDB02. MBXDBX01 is on Server 1 and 02 on Server 2.
    I have created a DAG and included both databases. Active copy of MBXDB01 is on Server 1 and MBXDB02 on Server 2
    I have configured the external and internal URLS of all virtual directories on both servers to be the same publically accessible FQDN. I have assigned the trusted cert to IIS and all other services on both servers. I have modified internal split brain DNS
    to point the FQDN used to both Server 1 and Server 2 IP addresses with a TTL of 30 seconds. And also for autodiscover.
    All test exchange connectivity comes back green and good from external and from outlook Test-Autoconfiguration autodiscover information is displayed correctly.
    The problem I am having is that when a user access the FQDN from a web browser i.e owa.domain.com/owa they get the login screen. This could be from either server 1 or 2 depending on DNS round robin. In this example lets say the user is accessing OWA on SERVER
    1 and their mailbox lives on SERVER 2.
    In this scenario when they login they get a page :( OOps Something Went Wrong and the exception is this
    A problem occurred while you were trying to use your mailbox.
    X-OWA-Error: Microsoft.Exchange.Data.Storage.UserHasNoMailboxException
    X-OWA-Version: 15.0.847.32
    X-FEServer: SERVER1
    X-BEServer: SERVER2
    The URL provides a little more info
    /auth/errorfe.aspx?httpCode=500&msg=861904327&owaError=Microsoft.Exchange.Data.Storage.UserHasNoMailboxException&owaVer=15.0.847.32&be=SERVER2&ts=130398071193518373
    However, if the user accesses OWA via the private FQDN of SERVER 2 i.e https://SERVER2/owa they are able to access their mailbox.
    It is driving me nuts.
    Has anyone got any suggestions? I am tearing my hair out here
    Thanks
    One very frustrated field engineer :)

    Hi,
    To narrow down the cause, I recommend the following troubleshooting:
    1. Please double check the DNS entries about the host name used in the OWA URL.
    2. Add A record that the host name used in the OWA URL points to server 2 IP address  in a user local host file. Then try to login OWA again.
    3. Check your event log and find if there is any error about OWA.
    If you have any question, please feel free to let me know.
    Thanks,
    Angela Shi
    TechNet Community Support

  • Site Resilience and Multi Role Servers without Load Balancers

    I am designing an Exchange 2013 Site Resilient Scenario with two Multi Role Exchange Servers per Site. There are Two Sites. 
    This is a small organization, 400 users and all must be virtualized.  A single forest, Two Sites 50/50
    users each Site. There is  a third Site for Witness Server collocation. 
    Our goal is to have redundancy per individual Site and Site Resiliency.  Multi Role or Dedicated CAS it's my question. I don't have load balancer, budget is a key factor. If dedicated CAS was chosen, we would have eight exchange servers total.
    My dream design is precisely two multi Role Servers per Site, four total. One DAG stretched across both sites. One third site for witness folder collocation.
    Zero load balancers and my understanding is that ‘Single Global Namespace Support’ , Round Robin and one stretched DAG in Exchange 2013 will do the magic and it'll keep connected users even when local datacenter is down (Further manual DNS changes would
    be obviously necessary after the crash to avoid sporadic connectivity loss). 
    My question is:
    1. Will
    be all my goals accomplished deploying only four Exchange Multi Role servers (Two per Site) in these locations? Or having dedicated CAS would make a difference?
    2. Even I don't want load balancer (NLB or virtual-hardware load balancer).  Is this a must? 
    3. In this scenario I pretend to use nothing but Standard versions of Exchange 2013 and Standard versions of Windows 2012/R2. Is there any reason why having Enterprise Edition would improve or validate my design?
    Thanks for your help.
    This is the scenario 

    Ya Standard edition now does clustering.  The only difference with datacenter is the number of VMs you are licensed for under Hyper-V.
    As for load balancing/HA, we set up a generic cluster resource ip/dns name and use that to point exchange clients to.  Technically this is not a supported scenario from Microsoft, but we have been using it since 2010 and know of a ton of other people
    doing it as well.  It's kind of the unofficial poor man's HA.  No load balancing, but with our load (and yours) it doesn't matter that only one server at a time is handling CAS.  Works great and automatically fails over if you reboot the active
    node.  You can of course still split the active databases out across multiple nodes.

  • WRT160Nv2-Problem with Single Port forward to multiple servers with same internal port numbers.

    On my network I have 3 systems that I've set up as RDP hosts.  And need to get to all three of them externally.  So I'm trying to do the following single port forwarding.
    RDP 1   Forward 4000 to port 3389 for 192.168.1.11
    RDP 2   Forward 4001 to port 3389 for 192.168.1.12
    RDP 3   Forward 4002 to port 3389 for 192.168.1.14
    When I hit "Save Changes" I get the error "Port range already exists".  So it's good that it won't let me overlap ports generally, but at the same time, I'm trying to send them to different IP address.  There should be no overlap in this case.  Please advise
    I'm trying this on the WRT160Nv2 with firmware 2.0.02, which I had just bought this weekend.

    kevj,
      Thanks for your suggestion.  I have now upgraded the firmware to 2.0.03 build 7.  But I am still seeing the error message
    As I mentioned previously, I'm trying to single port forward to multiple machines in the following way:
    Machine 1:   Forward 4000 to port 3389 for 192.168.1.11
    Machine 2:   Forward 4001 to port 3389 for 192.168.1.12
    Machine 3:   Forward 4002 to port 3389 for 192.168.1.14
    The error appears to be generated by the fact that 3389 is selected for multiple external port numbers, but the same internal port number.  The router I believe isn't taking into account that the similar internal port numbers aren't taking into account the different internal ip address I'm trying to send this to.
    This would be a standard sort of practice for running a live HTTP server on one machine, and a new beta HTTP server behind the router on a secondary machine on the same internal port, but different external port numbers for test purposes from the outside.
    Please advise
    Thank you.

  • Second Exchange 2013 server in remote site

    Just finished migrating from 2007 to 2013 and decommissioned 2007.  Exchange 2013 is running in site A with 350 mailboxes on it.  However, almost half of those users reside in site B so the plan is to introduce a second Exchange 2013 server to
    this site and migrating mailboxes to it.  There already exists a DC & GC in both sites.
    My question is, immediately after I introduce Exchange 2013 into site B with CAS & MBX role, client computers from that site will start to receive certificate errors.  Will updating the SCP on the new exchange server to point to the SCP on the exchange
    server in site A be enough to mitigate that problem?  What other precautions will I need to take?  Has anybody been down this road?

    Hi
    You can introduce the second exchange server in the remote site and also setup a DAG. If you are using the same name on your certificate like mail.domain.com then you can use the cert for your second server as well. You need to make sure you have autodiscover
    records setup correctly.
    Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Ask the Expert: Single-Site and Multisite FlexPod Infrastructure

    With Haseeb Niazi and Chris O'Brien 
    Welcome to the Cisco Support Community Ask the Expert conversation. This is an opportunity to learn and ask questions about Single-Site and Multisite FlexPod Infrastructure with experts Haseeb Niazi and Chris O'Brien.
    This is a continuation of the live webcast.
    FlexPod is a predesigned and prevalidated base data center configuration built on Cisco Unified Computing System, Cisco Nexus data center switches, NetApp FAS storage components, and a number of software infrastructure options supporting a range of IT initiatives. FlexPod is the result of deep technology collaboration between Cisco and NetApp, leading to the creation of an integrated, tested, and validated data center platform that has been thoroughly documented in a best practices design guide. In many cases, the availability of Cisco Validated Design guides has reduced the time to deployment of mission-critical applications by 30 percent.
    The FlexPod portfolio includes a number of validated design options that can be deployed in a single site to support both physical and virtual workloads or across metro sites for supporting high availability and disaster avoidance. This session covers various design options available to customers and partners, including the latest MetroCluster FlexPod design to support a VMware Metro Storage Cluster (vMSC) configuration.
    Haseeb Niazi is a technical marketing engineer in the Data Center Group specializing in security and data center technologies. His areas of expertise also include VPN and security, the Cisco Nexus product line, and FlexPod. Prior to joining the Data Center Group, he worked as a technical leader in the Solution Development Unit and as a solutions architect in Advanced Services. Haseeb holds a master of science degree in computer engineering from the University of Southern California. He’s CCIE certified (number 7848) and has 14 years of industry experience.   
    Chris O'Brien is a technical marketing manager with Cisco’s Computing Systems Product Group.  He is currently focused on developing infrastructure best practices and solutions that are designed, tested, and documented to facilitate and improve customer deployments. Previously, O'Brien was an application developer and has worked in the IT industry for more than 20 years.
    Remember to use the rating system to let Haseeb and Chris know if you have received an adequate response. 
    Because of the volume expected during this event, Haseeb and Chris might not be able to answer every question. Remember that you can continue the conversation in the Data Center community, subcommunity Unified Computing shortly after the event. This event lasts through September 27, 2013. Visit this forum often to view responses to your questions and the questions of other Cisco Support Community members.
    Webcast related links:
    Single-Site and Multisite FlexPod Infrastructure - Slides from live webcast
    Single-Site and Multisite FlexPod Infrastructure: FAQ from live webcast
    Single-Site and Multisite FlexPod Infrastructure - Video from live webcast

    I would suggest you read this white paper which details the pros and cons of direct connect storage. 
    http://www.cisco.com/en/US/partner/prod/collateral/ps10265/ps10276/whitepaper_c11-702584.html   This paper captures all the major design points for Ethernet and FC  protocols.
    I would only add that in FlexPod we are trying to create a highly  available solution and "flexible" solution; Nexus switching helps us  deliver on both with vPC and unified ports.
    NPV equats  to end-host mode which allows the system to present all of the servers  as N ports to the external fabric.  In this mode, the vHBAs are pinned  to the egress interfaces of the fabric interconnects.  This pinning  removes the potential of loops in the SAN fabric.  Host based multipathing of the  vHBAs account for potential uplink failures.  The NPV mode (end-host  mode) simplifies the attachment of UCS into the SAN fabric and that is  why it is in NPV mode by default.
    So for your last question, I will have to put my  Product Manager hat on so bear with me.   First off there is no drawback  to enabling the NPIV feature (none that I am aware of) the Nexus 5000  platform simply offers you a choice to design and support multiple FC  initiators (N-Ports) per F-Port via NPIV.  This allows for the  integration of the FI end-host mode described above.  I  imagine being a  unfied access layer switch, the Nexus team enabled standard Fibre  Channel switching capability and features first.  The implementatin of  NPIV is a customer choice based on their specific access layer  requirements.
    /Chris

  • Configuration Exchange 2013 DAG on two Server Data center 2012 with Hyper -V roles

    Dears,
    I try to planning and installation two hosts ( Data center 2012 servers) then install Hyper-V role on both this server, then create VM on each Data center server to be install Exchange 2013 on them.
    After that I want to configure DAG between Exchanges servers, so what are the prerequisite to do that ?
    Note: I use external IBM storage that will be located all VMs and DAG
    Many thanks 

    Hi Moon,
    In addition to Gulab's suggestion, I would like to clarify the following things:
    1. Yes, we can use Standard or Datacenter version of the Windows Server 2012 operating system to configure Exchange 2013 DAG.
    2. Each member of the DAG should be running the same operating system.
    3. The DAG with an even number of members should have a witness server. A witness server is a server outside a DAG that's used to achieve and maintain quorum when the DAG has an even number of members.
    What's more, here are some helpful articles for your reference.
    Planning for High Availability and Site Resilience
    http://technet.microsoft.com/en-us/library/dd638104(v=exchg.150).aspx#HR
    High Availability and Site Resilience
    http://technet.microsoft.com/en-us/library/dd638137(v=exchg.150).aspx
    Hope it helps.
    If there are any problems, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • Migration Exchange 2010 to Exchange 2013 in a different site

    Hi all, I have
    an Exchange 2010 with these characteristics
    Site A
    - 2 Servers DAG for mailboxes
    - 2 Servers Client Access and
    Hub Transport in Microsoft
    NLB
    - 2 Domain Controllers Windows
    Server 2008 R2
    I want to upgrade to Exchange 2013 but in another
    Site, Site B. When the migration is complete,
    the mail system will only be in Site
    B.
    The connection between Site A and Site
    B is a reliable connection.
    Is there any problem to upgrade Exchange 2013
    to another Site, other than Site
    A?
    regards
    Microsoft Certified IT Professional Server Administrator

    Hi all, I have
    an Exchange 2010 with these characteristics
    Site A
    - 2 Servers DAG for mailboxes
    - 2 Servers Client Access and
    Hub Transport in Microsoft
    NLB
    - 2 Domain Controllers Windows
    Server 2008 R2
    I want to upgrade to Exchange 2013 but in another
    Site, Site B. When the migration is complete,
    the mail system will only be in Site
    B.
    The connection between Site A and Site
    B is a reliable connection.
    Is there any problem to upgrade Exchange 2013
    to another Site, other than Site
    A?
    regards
    Microsoft Certified IT Professional Server Administrator
    It is like any other Migration (Same Forest) You just need to make sure that AD is been replicated from Site A (Exchange 2010) to Site B (Exchange 2013).
    No Network or replication issue between the sites. Having more than 1 DC on Site B would be good idea.
    Once you have all these set, rest of the things are same.
    Extend the AD Schema.
    Deploy the Exchange Server 2013 CU6
    Create the Cert request for 2013.
    Install Cert on Exchange 2013.
    Configure the Virtual Directories for Exchange 2013.
    Test the Coexistence between 2010 and 2013.
    Perform the Cutover from 2010 to 2013.
    Test the Cutover and start the Test migration phase.
    Once the test phase is fine, start the full fledge migration.
    Move Mailbox and Public Folder Database.
    Cheers,
    Cheers,
    Gulab Prasad
    Technology Consultant
    Blog:
    http://www.exchangeranger.com    Twitter:
      LinkedIn:
       Check out CodeTwo’s tools for Exchange admins
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Exchange 2013 DAG / client access

    Hello
    I'm in the planning of a new Exchange 2013 infrastructure. The infrastructure will be located in a datacenter and should host about 1000 mailboxes. I have read many whitepapers and tutorials, but some things are still unclear to me.
    - Microsoft suggests multi-role servers for this amount of users because client access is no more than a reverse proxy in EX2013. Is this correct? I've read that one users with 200 mails/day needs 8.5 MCycles with only DB and 10.63 MCycles with DB and CAS
    on the same server. So I plan to start with 2 multi-role servers in a DAG. What's your oppinion on this?
    - Client connections: I assume the clients connect to the cluster IP of the DAG. How do they get directed to the server on which their database is online? Does each server need to have the cluster IP and a public IP to which the clients connect?
    - SMTP: As I understand the documentation, mails are sent from the server which the user is active on. (Which makes sense for high availability.) What is best practice regarding the protocol logs? Do the support employees need to search in the files on 2
    servers?
    Thank you very much for your input!

    Hi
    I would use the firewall for load balancing unless there is a technical reason why this is not possible.  NLB is not recommended as it is not service aware - you cannot configure a probe to test OWA is working for example - so if you already have something
    better that would be my choice.
    In the choice between IIS ARR and NLB or CAS and NLB I would go for IIS ARR as this reduces you license costs, but neither of these is better than the appliance/firewall option.
    I've never used NLB for load balancing other than on TMGs so I cannot say what the performance is like behind a firewall, in theory your assumption would be correct.
    The load balancer doesn't make this decision it just spreads the load between the active servers, the CAS role connects the use session to the correct mailbox server:
    http://blogs.technet.com/b/exchange/archive/2013/01/25/exchange-2013-client-access-server-role.aspx
    Steve

  • I am using my Ipad on a remote craftshow site and am having problems with battery lasting 8 hrs. Can I use a 12v rv battery to recharge it or atleast maintain the charg over longer periods of time? I have a dc adapter. thanks

    I am using my Ipad on a remote craftshow site and am having problems with battery lasting 8 hrs. Can I use a 12v rv battery to recharge it or at least maintain the charge over longer periods of time? I have a dc adapter. thanks

    You should be able to use the battery if you get a car type charger which recharges mobile devices.
    The full size iPads use a 10-12W charger, whereas the mini uses a 5W charger. Many car chargers only supply 5W. But at 5W, the car charger should give you some extra time on your iPad. It would be best to use a 10-12W car charger.
     Cheers, Tom

  • How to do data migration between single node and multi node HANA systems ?

    Data migration between single node and multi node HANA systems ?
    What are limitations ?
    What should be the best practices ?

    Data migration between single node and multi node HANA systems ?
    What are limitations ?
    What should be the best practices ?

  • ı have 2 account one gamecenter with single emaill and password.it is like a identical twins of different.how can ı make it single?

    ı have 2 account one gamecenter with single emaill and password.it is like a identical twins of different.how can ı make it single?

    Are you referring to 2 iTunes accounts/Apple ID's? If so you can't, all purchases are tied to each Apple ID so if you need to say reload an app or update, it would be with that account. 

  • Sharing Folders with single users and Teams?

    Will there be an option to share folders with single users and teams.  Something like DropBox in the near future?

    Yes - the ability to share folders will be coming in a future release.  Stay tuned!
    thanks,
    Todd

  • I have a creative cloud membership.  If I don't want to build a site in Muse, can I build a business Catalyst site and have hosted free with my creative cloud membership?

    I have a creative cloud membership.  If I don't want to build a site in Muse, can I build a business Catalyst site and have hosted free with my creative cloud membership?

    Yes you can! It is a Basic level site but you can build it without Muse. I think you may need to create the site originally with Dreamweaver or Muse (meaning creating the site with Business Catalyst not building the site) but once that is done you can use any software to create the code for the site and upload it via SFTP. Hope that makes sense.

  • PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list

    Hi,
    I have a requirement to send a table data through mail,
    so am using execute statement after opening the connection and am using the following PLSQL code, which am failing to execute successfully.
    My code goes like this.
        0            10            20           30           40            50
    1  CREATE OR REPLACE PROCEDURE SEND_TABLE_DATA( FROMAD IN VARCHAR2,
    2   TOAD IN VARCHAR2,
    3   SUBJECT IN VARCHAR2,
    4   MESSAGE IN VARCHAR2,
    5   DOCID IN VARCHAR2,
    6   DOCDT IN DATE,
    7   PRODOAID IN NUMBER )
    8   AS
    9   BATCHNO  VARCHAR2(32767);
    10  PCSBOX  NUMBER;
    11  AMOUNT  NUMBER;
    12  SMTPHOST VARCHAR2(255) := 'XXX.XXX.X.XXX' ;
    13  A UTL_SMTP.CONNECTION ;
    14  BEGIN
    15  A :=UTL_SMTP.OPEN_CONNECTION(SMTPHOST,25);
    16  UTL_SMTP.HELO(A,SMTPHOST);
    17  UTL_SMTP.MAIL(A,FROMAD);
    18  UTL_SMTP.RCPT(A,TOAD);
    19  UTL_SMTP.OPEN_DATA(A);
    20  UTL_SMTP.WRITE_DATA(A, CHR(13) ||CHR(13) || CHR(13) );
    21  UTL_SMTP.WRITE_DATA (A,'Date: '|| TO_CHAR(SYSDATE,'DD/MM/YYYY HH24:MI:SS') || CHR(13) );
    22  UTL_SMTP.WRITE_DATA(A,'From: '||FROMAD|| CHR(13) );
    23  UTL_SMTP.WRITE_DATA(A, 'To: '||TOAD|| CHR(13) );
    24  UTL_SMTP.WRITE_DATA(A, 'Subject: '|| SUBJECT || CHR(13) );
    25  UTL_SMTP.WRITE_DATA(A,MESSAGE||DOCID||' Documented on '||DOCDT||CHR(13) );
    26  UTL_SMTP.WRITE_DATA(A,CHR(13) || CHR(13) || CHR(13) );
    27  UTL_SMTP.WRITE_DATA(A,'This is for your information'||CHR(13) );
    28  UTL_SMTP.WRITE_DATA (A,' BATCHNO '|| ' -- '||' PCSBOX '||' -- '||' AMOUNT '||CHR(13) );
    29  EXECUTE IMMEDIATE
    30         'SELECT
    31       A.BATCHNO,B.PCSBOX,B.AMOUNT
    32        FROM
    33      SCHEMA1.TABLEX A,SCHEMA2.TABLEY B
    34        WHERE
    35       A.BATCHID=B.BATCHNO AND B.PRODOAID='|| PRODOAID
    36     BULK COLLECT INTO BATCHNO,PCSBOX,AMOUNT;
    37  FOR indx IN 1..BATCHNO.COUNT
    38   LOOP
    39    UTL_SMTP.WRITE_DATA (A,BATCHNO(indx)|| ' -- '||PCSBOX(indx)||' -- '||AMOUNT(indx)||CHR(13) );
    40   END LOOP;
    41  UTL_SMTP.WRITE_DATA( A,CHR(13) || CHR(13) || CHR(13) );
    42  UTL_SMTP.CLOSE_DATA(A);
    43  UTL_SMTP.QUIT(A);
    44  EXCEPTION
    45  WHEN OTHERS THEN
    46  UTL_SMTP.QUIT(A);
    47  RAISE;
    48  END;
    49  /
    SELECT * FROM USER_ERRORS
    NAME                       TYPE             SEQUENCE    LINE         POSITION        TEXT                                                                                                             ATTRIBUTE                 MESSAGE_NUMBER
    SEND_TABLE_DATA
    PROCEDURE
    3
    37
    1
    PL/SQL: Statement ignored
    ERROR
    0
    SEND_TABLE_DATA
    PROCEDURE
    2
    37
    24
    PLS-00487: Invalid reference to variable 'BATCHNO'
    ERROR
    487
    SEND_TABLE_DATA
    PROCEDURE
    1
    36
    25
    PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list
    ERROR
    497
    Thanks In Advance
    Regards
    Pradeep.

    > 29  EXECUTE IMMEDIATE
    > 30         'SELECT
    > 31       A.BATCHNO,B.PCSBOX,B.AMOUNT
    > 32        FROM
    > 33      SCHEMA1.TABLEX A,SCHEMA2.TABLEY B
    > 34        WHERE
    > 35       A.BATCHID=B.BATCHNO AND B.PRODOAID='|| PRODOAID
    > 36     BULK COLLECT INTO BATCHNO,PCSBOX,AMOUNT;
    The variables BATCHNO, PCSBOX and AMOUNT are defined as scalar variables. Check there definition
    > 9   BATCHNO  VARCHAR2(32767);
    > 10  PCSBOX  NUMBER;
    > 11  AMOUNT  NUMBER;
    You cannot use BULK COLLECT on scalar variables. The variables must be defined as a COLLECTION TYPE in order to perform bulk collect.

Maybe you are looking for