WRT54GL v1.1 as an AP - Cascading
I am trying to connect 2 WRT54GL v1.1 wireless routers together to extend coverage at another end of the home.
They are connected lan port 1 to lan port 1. The PC\Laptop are not seeing router #2.
==================
WRT54GL #1
Is connected to my Century Link DSL modem (which is bridged) the router is running DHCP pulling a dynamic IP.
Local IP 192.168.1.1
Subnet 255.255.255.0
DHCP - Enabled
192.168.1.100 - 192.168.1.110
MAC Address is cloned to that of my PC (as required it seems by my isp).
Advanced routing is set to gateway
SSID RTR 1
Channel 11
For setup purposes it is on WEP 128 (same key).
All other settings blank or default.
==================
The Layout,
This Primary router is connected by lan ports to my desktop and the WRT54G #2 (AP). I have a CAT 5 network cable
connected to LAN port 1 of both routers. DSL Modem and WRT54G #1 upstairs at one end of the house. WRT54G #2 at
the opposite end of the house on a shelf in a downstairs room near a wireless desktop and a wireless laptop.
==================
WRT54GL #2
Local IP 192.168.1.2
Subnet 255.255.255.0
DHCP - Disabled
MAC Address is off
Advanced routing is set to router
SSID RTR 1
Channel 1
For setup purposes it is on WEP 128 (same key).
All other settings blank or default.
I have the IP set to 192.168.1.2 tried .254 also.
Tried using a different SSID, same channel..
As far as I can tell Netstumbler on the desktop only seems to see Router #1 on channel 11, not router #2.
Thank you in advance for any assitance you can provide.
Sincerely
Config looks correct, try hard resetting the router #2 and power cycle again and reconfig. Make sure both routers are on the latest firmware.
Similar Messages
-
Two WRT54GL off HughesSatellite Modem: sudden problems!
Greetings, I have been running - very successfully - a dual router setup off a HughesNet satellite system (standard plan, no static address) to operate distinct wireless networks in my business. All thanks to the generous, patient, and irreplaceable assistance of Forum advisers here and elsewhere! The whole thing has worked EXTREMELY WELL for over one year! Basic (cascading/piggybank router connection) setup: HughesSatellite doing DHCP on 192.168.0.* subnet >> WANport ROUTER 1 LANPort >>> WANPort Router 2 Router1 (Stock WRT54GL Off HughesNetModem) is set as "AutoConfigDHCP" . Local LAN IP: 192.168.2.250. Delivers IP addresses to wireless users (Wireless Network No 1) on 192.168.2.10 to 192.168.2.50. WPA encryptionned. Router2 (Stock WRT54GL Off Router1) is set to "Static IP" and affixed 192.168.2.245 as WAN IP (i.e. on same subnet as Router1). Local LAN IP: 192.168.3.245. Delivers IP addresses to wireless users (Wireless Network No 2) on 192.168.3.10 to 192.168.3.50. WPA encryptionned. Excellent thing: fair amount of independence between the two networks. namely, traffic on Wireless Network 2 is "invisible" to Wireless Network 1 (that's what I needed!) SUDDENLY, 2 mornings ago (!): A. OK, Router2 (Off Router1 below) and corresponding Wireless Network 2 still works OK. Router blinking at all times, etc... B. BUT Router1 (Off HughesSat Modem to WAN port on the Router1) totally unpredictable and basically not delivering Wireless Network 1 traffic reliably, as follows: 1. I use NetStumbler (Win) and iStumbler (Mac) on my dual OS MacBookPro. I can sometimes SEE that Router 1 does seem to produce WiFi signal (especially if I am really close to the Router), with same strength as before according to xxStumbler. 2. BUT, PCs or MACs trying to connect to it usually DO NOT DETECT the signal, nor do they receive DHCP IPs from Router 1. In fact, they mostly NOT even detect the Wireless network 1 SSID (which is set at "Enable Broadcasting SSID" of course) among their perceived selection of available Wireless Networks. So, the WiFi signal is "there", but "not seen" or received (no IPs assignment). Meanwhile Router 1 does not do much "blinking". 3. EVEN if wireless PCs or MACs occasionally detect Wireless Network 1, they do not connect to it, or if they momentarily do, they quickly drop it. I'll leave it at that for now: i have tried to replace Router 1 with a fresh, brand new WRT54GL which I keep as a backup! To no avail. I have disconnected Router 2 from Router 1 (the one with the problematic Wireless Network 1). No improvement. Something new with HughesNet??? OR??? I hope this is all fairly clear! Thanks for reading this and perhaps any suggestion or help! - Roger T
Thanks a lot for your reply, forsaken. Also, what's your opinion on the following: I have tried to change channels re: router 1 and it seems that I have improved things by moving to another channel. Can Channel assignments be a top of the list concern re: wireless routers. We have a few other wireless operations nearby (as per iStumbler/Netstumbler). I wish I could sent you a screenprint of my Stumbler readings for you to guauge! I had my routers on Ch 1 and 11. I see a few other WiFi networks around at Ch 5 6 8. I just put my Router 1 on Ch 4 and things are considerably better... Go figure! - Roger T
-
Config WRT54GL on Tomato as AP
Running Tomato ver 1.28 on a WRT54GL and it's worked flawlessly as an AP (bridge) that then is wired to my pc. New house, new landlord and can't config this to wirelessly connect to a Linksys E1000.
Anyone know if the E1000 definitely will not play nice with a router set up this way? Know of an inexpensive AP model, any manufacturer?
I think it may be the version of Tomato. Version 1.28 will only allow AP mode to use WPA2 Personal, thus matching the E1000 settings. Landlord won't allow access or change his settings. I'm going mad trying to find a solution. Won't even tell you about a Netgear router I bought and another brand router on the way. Really just want my trusty Linksys/Tomato to work.
I'm preferring AP mode as that would be on the same subnet as the main (E1000) and seem to understand now how to release/renew in 2 of my OS's (XP and 7) but even after saving and connecting the routers LAN to LAN (and power cycle both) I get nothing.
Any assistance would be manna from heaven at this point. I have been w/o internet access for months except via wire when the landlord isn't here : )
Thank you,
MacSarah, I believe cascade is a term used by Linksys for hardwiring two routers together. Yes, I found that kb article as well.
I'm trying to use the WRT54 as a wireless AP slash 'Client'; on the same network segment, so I can wire my pc to it. The main is using 192.168.1.1 as usual. Some folks use the term wireless bridge but the term bridge also refers to a specific wireless "mode" that means you're connecting 2 networks and that both routers will use DHCP to route traffic. I don't need that.
This worked before but I can't config it to connect with the Linksys. Unfortunately, I can't access the Linksys to make changes or attempt while security is temporarily off. So w/o delving into the flavors of Windows and Linux I use, I'm wondering a) if anyone knows positively that the Linksys will have a problem. I see no reason why, but Linksys may state you need both routers to be their brand.
b) I believe I've tried settings that should work (in Tomato's GUI), I save and connect LAN port to LAN port, do a power cycle, but then when I disconnect and try the wireless 'AP' - the WRT54 - I get no connection. Security settings match and the main - the E1000 - is only about 30 feet away, same floor. Just some wood and drywall between them.
The way I'm using the routers is simple, using Tomato is a little off the beaten path (and Tomato has no central community on the web that I can find) but the settings are pretty simple. Many have done this with different combos of routers yet I cannot get these two to function, hence question a).
Again, any help would be extremely appreciated.
Thank you,
Mac -
I am trying to cascade my two WRT54GL routers, but can't get my second router to see internet.
My problem:
I want to have to separate wireless networks. One network from router 1 (main router, both wireless and wired IP "clients") and a pure wireless network from router 2. I want to be sure that the guy in 1st floor that shares my adsl connection, is using the wireless network from router 2, and dont have access to network from router 1.
I thought I could accomplish this following alt 2 on the link:
Cascading the linksys router to Another Linksys Router (WAN-LAN)http://www.extremepcmakeovers.com/tips/ho w-tos/cascade_linksys/
My setup is:
The main router IP. 10.104.211.197
specified as gateaway in router seup
DHCP server gives out IP adresser from 10.104.211.65 to 10.104.211.xx.
I have internet connection using network from main router. All the IP clients/ consumers connected to main router has internet connection.
So now I want to isolate the guy in first floor to another network. I have connected ethernet cable from my main router LAN to my second router WAN (internet side).Second router is specified as gateaway IP 10.104.211.70
DHPCP server and gives out IP adresses from 10.104.211.71 to 10.104.211.xx
Router IP adress is not taken by IP clients connected to main router, that means no IP conflict. But I can not get internet connection from second router.
I really appreciate if someone could help me with this.I did get some help using live chat with linksys support yesterday. I now have internet connection from both networks. It is working now without configuration in the advanced routing tab. On both routers default values are used there (gateway and no destination IP are given).
Here is my setup:
Router 1= main router
Router 2 have cable from router 1 port 3 to internet side of router.
Router 1 is configured as DHCP server with local ip adress of 10.104.211.197, and gives out IP adresses starting from 10.104.211.64
Router 2 is configured as a static IP with local IP adress of 10.104.210.70, and internet IP adress 10.104.211.50
gateaway and static DNS1 is defined as the local IP adress of router 1.
DNS2 is defined as 4.2.2.2
Router 2 gives out IP adresses from 10.104.210.71.
In the status tab
Router 1 has the IP adress, gateaways, DNS1 of 193.xxxxxxxxx
Router 2 has login type static, ip adress 10.104.211.50, default gateaway and DNS1 as local IP adress of router 1.
So using this configuration I now have two separated networks that both can see internet. However, I have lost the internet connection several times the last 30 hours. I suspect there is something in my setup that leads to a unstable router/routers. When I loose internet connection I go to the status tab on router 1 and sees that the IP adresses are not 193.xxx but "default" values like 10.0.0.138 etc...so I then have to release and reneaw DHCP before I am online again.
Does anyone have any clue if my setup gives poor stability??? -
Cascaded routers: no internet access when second router not use NAT
Cascaded routers: no internet access when second router not use NAT
Here is my setup:
[pre]
WAN
|
| 74.96.170.x (WAN IP) |
| Router1(Verizon FiOS Router) |
| Model: MI424WR-GEN2 (Rev F) |
| Firmware: 20.21.0.2 |
| Def router: 74.96.170.1 |
| 192.168.1.1 (Local IP) |
|
| 192.168.1.22 (WAN IP) |
| Router2(Linksys) |
| Model: WRT54GL v1.1 |
| Firmware: v4.30.16 |
| Def Router: 192.168.1.1 |
| 192.168.2.1 (Local IP) |
|
| Computer 192.168.2.160 |
| Def Router: 192.168.2.1 |
"q.route" 120L, 4441C written
[m.wang@m-wang-ltm2:/Users/m.wang/m/Network]
$ more q.route
Cascaded routers: no internet access when second router not use NAT
Here is my setup:
[pre]
WAN
|
| 74.96.170.x (WAN IP) |
| Router1(Verizon FiOS Router) |
| Model: MI424WR-GEN2 (Rev F) |
| Firmware: 20.21.0.2 |
| Def router: 74.96.170.1 |
| 192.168.1.1 (Local IP) |
|
| 192.168.1.22 (WAN IP) |
| Router2(Linksys) |
| Model: WRT54GL v1.1 |
| Firmware: v4.30.16 |
| Def Router: 192.168.1.1 |
| 192.168.2.1 (Local IP) |
|
| Computer 192.168.2.160 |
| Def Router: 192.168.2.1 |
| NO iptables, basic setup |
[/pre]
On computer, I have:
[pre]
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.2.1 0.0.0.0 UG 2 0 0 enp2s0
loopback localhost 255.0.0.0 UG 0 0 0 lo
192.168.2.0 * 255.255.255.0 U 0 0 0 enp2s0
[/pre]
On Router2, I have:
[pre]
Routing Table Entry List
Destination LAN IP | Subnet Mask | Gateway | Hop Count | Interface
192.168.2.0 255.255.255.0 0.0.0.0 1 LAN & Wireless
192.168.1.0 255.255.255.0 0.0.0.0 1 WAN (Internet)
0.0.0.0 0.0.0.0 192.168.1.1 1 WAN (Internet)
[/pre]
Router2's Operating Mode is Gateway. On Router1, I have:
[pre]
[Router1] Routing Table
Name Destination Gateway Netmask Metric Status
Network (Home/Office) 192.168.2.0 192.168.1.22 255.255.255.0 0 Applied
Network (Home/Office) 192.168.1.0 192.168.1.1 255.255.255.0 0 Applied
Routing Protocol: Internet Group Management Protocol (IGMP)
Default Gateway: 74.96.170.1
[/pre]
On computer, I can run tcptraceroute to yahoo.com OK:
[pre]
# tcptraceroute yahoo.com
Selected device enp2s0, address 192.168.2.160, port 46596 for outgoing packets
Tracing the path to yahoo.com (206.190.36.45) on TCP port 80 (http), 30 hops max
1 192.168.2.1 0.610 ms 0.729 ms 0.735 ms
2 192.168.1.1 1.843 ms 1.378 ms 1.363 ms
3 l100.washdc-vfttp-107.verizon-gni.net (96.241.146.1) 13.620 ms * *
... /* It reached the destination. */
[/pre]
I want to change Router2's Operating Mode from "Gateway" to "Router" because I
want to turn off NAT on Router2 so that I can access all computers attached to
Router2 by their individual IP instead of using port forwarding at Router2.
The problem is after the mode change from "Gateway" to "Router", and regardless
whether I disable RIP or enable RIP, and on what interfaces it is enabled, computer
192.168.2.160 does not have internet connection.
Observations:
[0] INTRAnet works as I can reach computer 192.168.2.160 from computer behind Router1
192.168.1.x and vice versa.
[1] ping and traceroute *work* on Router2 itself using the built-in dianostic tool.
[2] nslookup on computer 192.168.2.160 always works on new lookup. It uses
192.168.2.1 as the resolver.
[3] tcptraceroute stops after step 2:
[pre]
# tcptraceroute yahoo.com
Selected device enp2s0, address 192.168.2.160, port 45999 for outgoing packets
Tracing the path to yahoo.com (98.139.183.24) on TCP port 80 (http), 30 hops max
1 192.168.2.1 2.553 ms 0.534 ms 0.638 ms
2 192.168.1.1 1.342 ms 0.964 ms 0.867 ms
3 * * *
[/pre]
[4] tcpdump shows that computer 192.168.2.160 tries to reach out and nothing is returned:
[pre]
13:34:03.172828 IP 192.168.2.160.45999 > 98.139.183.24.http: Flags [S], seq 1122548929, win 0, length 0
13:34:06.175786 IP 192.168.2.160.45999 > 98.139.183.24.http: Flags [S], seq 1122548929, win 0, length 0
13:34:09.178804 IP 192.168.2.160.45999 > 98.139.183.24.http: Flags [S], seq 1122548929, win 0, length 0
[/pre]
This is not expected because NAT to internet should still be done by Router1, no? Computer
behind Router1 with IP 192.168.1.x has internet connection.
[5] It looks like I cannot change the Routing Table Entry on Router2. I do not think I need to change anything,
just an observation.
[6] If I use LAN to LAN connection, then both intranet and internet works. [The internet IP of Router2 can be
anything not in the same subnet of the Router1, and DHCP on the local side should be disabled to avoid conflict
with the the DHCP on Router1].I have a question. Unfortunately in order to ask my question, I have to have a lengthy description of my setup. Basically, I have a second Linksys router in "router" operating mode with NAT disabled connected to the Verizon router, and I have a computer which is in a different subnet (192.168.2.x) behind the Linksys router. This computer can communicate with computers behind Verizon router in subnet (192.168.1.x), but cannot reach internet. This is a simplified version of my question, full details are in the original post.
If I setup the Linksys router in "gateway" operating mode, which means with NAT enabled, then both intranet and internet works, but there is no easy way to setup port forwarding for 10 compueters in 192.168.2.x network to communicate with 10 computers in 192.168.1.x network.
If I setup the Linksys router in a LAN to LAN configuration with Verizon routers, but this way all computers are in the same subnet, I want them to be in different subnet for access control and things like that.
I hope this makes things a little clear.
Thanks. -
Extend Time Capsule network with WRT54GL?
I have set up a home network with Time Capsule as the primary router. I would like to use my WRT54GL to connect to the network via ethernet and extend it for wireless access at the opposite end of my house. Is this cascading? I connected the ethernet cable to one of the ethernet ports on the Time Capsule and the Internet port on the WRT54GL. I changed the Linksys router settings to disable the DHCP server, I named the network the same as the Time Capsule and duplicated security mode and password. I can connect with my laptop, and it initially connects with full internet access, but after about 10 seconds, I can see Airport searching for a network. It reconnects, but for about 45 seconds I have no internet access and then access returns and works fine. On my iPad, however, although it shows I am connected to the network, there is no signal indicator at the top of the screen, and all connectivity seems to be through 3G -- not the network. I assume there is a setting on the Linksys that needs changing, but I can't figure out what it is.
yes, it is cascading. but you need to do it right. when you connect the time capsule to the WRT54GL, you should put one end of the ethernet cable to the TC and the other end to a regular (numbered) port on the WRT54GL, not the Internet port. that is important. disabling the DHCP on the Linksys is correct, as you already have DHCP on the TC, but you'll need to set the WRT54GL to the same IP range as your TC. since your TC uses 10.0.1.1 as its default IP, you may set your WRT54GL to 10.0.1.99 (for example) so that it's on the same IP range. hope this helps.
-
Greetings Forum,
I have a small question regarding "roaming",
well rather a large question cause i have the following problem.
I have a rather large building in which one Linksys/Cisco WRT54GL wont cover the entire area.
Now i want to connect a second WRT54GL
The setup is as followed,
The first WRT54GL is placed the first community room where most of my clients eat, sit, hang out and stuff.
Yet the problem is that the one will only cover roughly about 3/5 of the building because of concrete walls.
The plan is to replace the first one to roughly 2/5 second community room left side of the building and the second one on the 4/5 third community room right side of the building getting the maximum coverage.
We have a patch panel with connections running through the building, with connections to the 2 rooms that i want to place the WRT54GL
Now,
My question is which settings would be best to use in both WRT54GL to achive "roaming" think about
SSID - same/different setup
Channel - same/different setup
WPA2 - same/different setup
and anything els you can think about that might be a problem like,
Would it be a problem using the patch panel that provides the internet to the WRT54GL and would they be able to communicate and so provide roaming for the laptops and mobile phones.
There are a few more things to keep in mind.
I can NOT setup the WRT54GL's to provide DHCP they will forward the DHCP given via the wired Patch panel.
dont say this isnt possible cause i have been doing it with the single WRT54GL for the past year so no problems there.
Well guys n girls,
I hope i have provided you enough information to help me get along and get this project up and running.
If there are any questions, suggestions, hints, tips and/or tricks, dont hasitate to reply i will be checkin up regulary and hope
you guys n girls can help me
Yours faithfully from holland,
Dwayne Jurcka IT Student
glitches why did it have to be glitchesI wont be connection the second to the first router
they will both be connected in a school like network where there are walloutlets which run to a main switch in the rooms where these will be placed
so cascading in not needed thanks for the link anyway keeping it for future refrence
Still i think what GV said is the best option going to the location it self soon to test the current setup (range and walloutlets) and then see what the best implementation will be.
Either way ill post my finding here and see if i can make a small How-To of it so for future refrence people can see this post and the tests
Greetings from Holland - - Djurcka
glitches why did it have to be glitches -
Get('XML') doesn't work, but get() does in javascript - CASCADING LOVs
I'm trying to get cascading LOVs working in Apex 3.1.0 in Oracle 11g. When I call get.get('XML') it returns null in firefox and empty string in IE6. If I change it to call get.get() then it returns the XML as a string into Javascript.
The Application process is getting called in both scenarios as i've put PL/SQL logging to disk in order to prove it. The XML being returned is very basic so i'm sure it's not a problem with formatting. I'm not getting any exceptions thrown in javascript either.
Is it possible to use get.get() and then convert the text into an XML object which is returned as per get.get('XML') which at least will allow me to get something working ?
thanks
<script language="JavaScript" type="text/javascript">
function getBusinessFieldJS(pThis, pSelect)
alert('getBusinessFieldJS');
try
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var get = new htmldb_Get(null, html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=GET_DATA_FIELDS_XML', 0);
/*get.add('F120_GETBUSINESSFIELD_ITEM',pThis.value);*/
gReturn = get.get('XML');
alert('gReturn=' + gReturn);
alert('gReturn.value=' + gReturn.value);
if (gReturn == null)
alert('gReturn is null');
if(gReturn && l_Select)
var l_Count = gReturn.getElementsByTagName("option").length;
alert('l_count='+l_Count);
l_Select.length = 0;
for(var i=0;i<l_Count;i++)
var l_Opt_Xml = gReturn.getElementsByTagName("option")+;+
+ appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),+
+ l_Opt_Xml.firstChild.nodeValue)+
+ }+
+ }+
+
get = null;+
+ }+
+ catch (e)+
+ {+
+ alert('Exception : ' + e);+
+
}+
+}+Hi,
I've been trying to replicate your problem here: [http://apex.oracle.com/pls/otn/f?p=37055:1]
My application process is:
BEGIN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p('Cache-Control: no-cache');
HTP.p('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn('<select>');
HTP.prn('<option value="-1">Please Select</option>');
HTP.prn('</select>');
END;(Just copied from your post and XML changed to xml, otherwise untouched)
And my page has a simple HTML region with the source of:
<div id="XMLOUTPUT" style="border:1px solid blue; width:200px; height:200px;"></div>
<div id="XMLOUTPUT2" style="border:1px solid blue; width:200px; height:200px;"></div>
<script type="text/javascript">
function getMyXML()
var l_Return = null;
var get = new htmldb_Get(null, html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=RETURN_XML', 0);
gReturn = get.get('XML');
var d = html_GetElement('XMLOUTPUT');
d.innerHTML = gReturn;
var d2 = html_GetElement('XMLOUTPUT2');
d2.innerHTML = get.get();
var s = gReturn.getElementsByTagName("select");
alert(s.length);
</script>
<a href="javascript:getMyXML();">Click</a>Click on Click at the bottom of the page. The first DIV gets the get.get('XML') object and the second one the get.get() and a popup message tells you how many "select" items are in the XML version.
As far as I can see, this works fine.
Andy -
How do I delete cascade with a PL/SQL procedure?
This script will create a PL/SQL procedure that deletes cascade. This is a post to contribute to the Oracle community. Take the code as is and test it before you use it in production. Make sure this is what you want.
Procedure Delete Cascade (prc_delete_cascade)
Description
=============
The principle is very simple. The procedure uses a table called TO_BE_DELETED to keep a list of records to be deleted. This
table keeps the table name and the rowid of those records that need to be deleted. The procedure also uses a function called
DELETE_BOTT_ROW which takes one record of the table and tries to delete it. If the deletion fails with a foreign key constraint
violation, the function parses the SQL error message (SQLERRM) to get the name of the constraint. With the name of the constraint,
the function finds the name of the child table, all the child records that have references to the parent table primary or unique key,
and the parent key primary or unique key column name. Once the child records of the failed delete are identified, the function takes their table name and rowids
and records them into the TO_BE_DELETED table by inserting records of their table name and their rowids. Al the records inserted also contain the level (which
is 1 for the original records, 2 for child records, 3 for granchild records, etc.) and the sequence number of the order in wich they
are recorded. This way, when the function picks up a record to be deleted, it takes the one with the highest level and the highest
inserted sequence, or the "bottom" record. Once all the child records of the failed delete are appended to the TO_BE_DELETED table, it calls itself
recursevely, and the function takes the record at the "bottom" of the table and tries to delete it. If it succeeds, it calls
itself recursevely to delete the next record. If it fails, it goes and finds the child records as described before and once they are
inserted into the TO_BE_DELETED table, it calls itself again recursevely to try to delete again the "bottom" record. All records
that are successfully deleted are flagged as deleted usig the flag_del column so they are not pickt up again. Once all the (parent,
child, grandchild, etc.) records are deleted, the procedure ends without commiting, giving the option to the user to commit or
rollback deletions. The table TO_BE_DELETED is, at the end of the procedure, a list of all the records that were deleted, including their table names
and the order in with they were deleted. The user then can review its content and decide to commit or rollback.
Restrictions
============
1. Single tables only. The procedure only takes one table name and a WHERE clause to identified the records to be deleted.
2. Single columns only. Ther procedure only works with single-column primary, unique and foreign key constraints.
3. Single schema only.
4. Unpredictable results with circular references.
drop table to_be_deleted purge;
create table to_be_deleted
(tname varchar2(30) -- table name
,rid rowid -- rowid
,lvl number -- level: 1=parent, 2=child, 3=grandchild, etc.
,seq_ins number -- sequence order of record inserted
,flg_del char -- flag deleted: Y=record deleted
,seq_del number -- global order of record deletion
set serveroutput on size 1000000
create or replace procedure prc_delete_cascade
(p_tname varchar2 -- table name
,p_where varchar2 -- where clause identifying records to be cascade deleted
is
dummy char;
v_sqlcode number;
v_sqlerrm varchar2(32767);
v_param_val integer := 0;
v_sql varchar2(4000);
v_ret_cde number;
e_bad_params exception;
v_iter number;
v_plvl number;
v_seq_del number;
v_max_iter number := 1000000000;
function delete_bott_row
return number
is
v_sql varchar2(4000);
v_ptname varchar2(30); -- parent table name
v_ppkname varchar2(30); -- parent primary key constraint name
v_ppkcname varchar2(30); -- parnet primary key column name
v_prowid rowid;
v_crowid rowid;
v_ctname varchar2(30); -- child table name
v_cfkname varchar2(30); -- child foreign key constraint name
v_cfkcname varchar2(30); -- child foreign key column name
v_ins number;
v_seq_ins number;
v_sqlerrm varchar2(4000);
v_sqlcode number;
e_const_viol exception;
pragma exception_init(e_const_viol, -2292);
e_max_iter_reached exception;
begin
v_iter := v_iter + 1;
if v_iter >= v_max_iter then
raise e_max_iter_reached;
end if;
dbms_output.put_line('- Iter '||to_char(v_iter));
dbms_output.put_line('----------');
dbms_output.put_line('- Starting function delete_bott_row');
v_sql := 'select tname, rid, lvl, seq_ins from (select * from to_be_deleted where flg_del = ''N'' order by lvl desc, seq_ins desc) where rownum=1';
-- dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql into v_ptname, v_prowid, v_plvl, v_seq_ins;
dbms_output.put_line('- Selected row: table name: '||v_ptname||', level: '||v_plvl||', seq: '||v_seq_ins);
v_sql := 'delete from '||v_ptname||' where rowid='''||v_prowid||'''';
dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql;
dbms_output.put_line('- Row deleted !!!');
v_ret_cde := 1;
v_seq_del := v_seq_del + 1;
dbms_output.put_line('- Mark the row deleted');
v_sql := 'update to_be_deleted set flg_del = ''Y'', seq_del = '||to_char(v_seq_del)||' where tname='''||v_ptname||''' and rid='''||v_prowid||'''';
-- dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql;
-- dbms_output.put_line('- Updated table to_be_deleted, row marked deleted');
-- dbms_output.put_line('- End of iter '||to_char(v_iter));
dbms_output.put_line('----------');
-- call function delete_bott_row recursively
v_ret_cde := delete_bott_row;
return 0;
exception
when no_data_found then
dbms_output.put_line('- Table to_be_deleted is empty, delete cascade has completed successfully.');
v_ret_cde := 0;
return 0;
when e_const_viol then
v_sqlcode := SQLCODE;
v_sqlerrm := SQLERRM;
v_ret_cde := v_sqlcode;
dbms_output.put_line('>Constraint Violation. Record has children');
-- dbms_output.put_line('Error code: '||to_char(v_sqlcode));
v_cfkname := substr(v_sqlerrm,instr(v_sqlerrm,'.')+1,instr(v_sqlerrm,')') - instr(v_sqlerrm,'.')-1);
dbms_output.put_line('>Child FK name: '||v_cfkname);
select table_name, column_name
into v_ctname, v_cfkcname
from user_cons_columns
where constraint_name=v_cfkname;
dbms_output.put_line('>Child table name: '||v_ctname||'. FK column name: '|| v_cfkcname);
select constraint_name, column_name
into v_ppkname, v_ppkcname
from user_cons_columns
where constraint_name = (select r_constraint_name
from user_constraints
where constraint_name=v_cfkname);
dbms_output.put_line('>Parent PK/UK name: '||v_ppkname||'. Parent PK/UK column: '||v_ppkcname);
v_sql := 'insert into to_be_deleted(tname, rid, lvl, seq_ins, flg_del) '||
'select '''||v_ctname||''', rowid, '||to_char(v_plvl+1)||', rownum, ''N'' '||
'from '||v_ctname||' '||
'where '||v_cfkcname||' =any (select '||v_ppkcname||' from '||v_ptname||' where rowid =any (select rid from to_be_deleted where tname = '''||v_ptname||'''))';
-- dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql;
select count(*)
into v_ins
from to_be_deleted
where lvl = v_plvl+1
and tname = v_ctname
and flg_del = 'N';
dbms_output.put_line('>Found '||to_char(v_ins)||' child records which were added to table to_be_deleted');
v_ret_cde := delete_bott_row;
return v_ret_cde;
when e_max_iter_reached then
dbms_output.put_line('Maximum iterations reached. Terminating procedure.');
raise;
when others then
raise;
end delete_bott_row;
begin
dbms_output.put_line('Beginning');
dbms_output.put_line('================================');
-- validate p_table
begin
select 'Y'
into dummy
from user_tables
where table_name=upper(p_tname);
exception
when no_data_found then
v_param_val := 1;
dbms_output.put_line('Table '||p_tname||' does not exist.');
raise e_bad_params;
end;
dbms_output.put_line('- Parameter p_tname validated');
-- validate p_where
begin
execute immediate 'select ''Y'' from '||p_tname||' where '||p_where INTO dummy;
exception
when no_data_found then -- where clause returns no records
dbms_output.put_line('Record(s) not found. Check your where clause parameter');
v_param_val := 2;
raise e_bad_params;
when too_many_rows then -- found multiple records means it is ok
null;
when others then -- any other records means where clause has something wrong.
dbms_output.put_line('Where clause is malformed');
v_param_val := 2;
raise e_bad_params;
end;
dbms_output.put_line('- Parameter p_where validated');
if v_param_val > 0 then raise e_bad_params; end if;
v_iter := 0;
v_plvl := 1;
v_seq_del := 0;
v_sql := 'insert into to_be_deleted(tname, rid, lvl, seq_ins, flg_del) select '''||upper(p_tname)||''', rowid, '||to_char(v_plvl)||', rownum, ''N'' from '||p_tname||' where '||p_where;
dbms_output.put_line('- Inserting initial record');
dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql;
dbms_output.put_line('- Record(s) inserted');
dbms_output.put_line('- Calling function delete_bott_row to delete last row of table to_be_deleted');
dbms_output.put_line('-----------------------------------');
v_ret_cde := delete_bott_row;
-- dbms_output.put_line('- Back from function delete_bott_row');
-- dbms_output.put_line('Return code: '||to_char(v_ret_cde));
dbms_output.put_line('- End of procedure');
exception
when e_bad_params then
dbms_output.put_line('Bad parameters, exiting.');
end;
show errors
spool prc_delete_cascade.log
-- Call to the procedure
exec prc_delete_cascade('xent','xent_id between 1669 and 1670')
select tname "Table Name", count(*) "Rows deleted"
from to_be_deleted
group by tname;
spool off
set lines 120
select *
from to_be_deleted
order by seq_del;
prompt Now commit or rollaback deletions.
-- commit;
-- rollback;Edited by: Rodolfo4 on Mar 23, 2011 10:45 AMInteresting.
I see a few areas where this could be useful. Elimiating specific test records from a Test DB for example.
Some comments:
<li>Since this is a recursive logic you must add a stop criteria. In this case I would add a max iteration variable. If that one is reached, raise an error message and let the procedure stop with that error.</li>
<li>The when others exception at the end should be removed completely</li>
<li>The when others exception in the middle should be replaced by a specific exception that handles the -2292 error</li>
<li>A list of tables where no record should be deleted could be usefull. If the logic would encounter such a table, it should also stop. This would be to prevent that data from some system critical tables could be deleted per accident.</li>
<li>The reference from the FK constraint to the PK constraint should include the table name and if possible the owner (as long as you use user_* views the owner is always the same. But we could extend this to the ALL_* views). I never met a system where different tables have the identical FK constraint names, however just make this fool proof.</li> -
Issue in EHP5 Talent Management (Team Goals) Cascade goals functionality
Hi Friends,
Issue in EHP5 Talent Management (Team Goals) Cascade goals functionality.
Under Team Object While try to cascade goals, it pop-Up Warning Msg u201CChoose Save to save the goal in the employee document. The goal can no longer be deleted, only set to obsoleteu201D.
If we click Ok to proceed further, I am getting error stating u201CYou have made no selection" and " No appraisal template defined ".
Same functionality is working fine in u201CPerformance Management (Predefined)u201D
With Regards
Seranjeeve KumarPlease set the parameter PROCESS "PMP" in the iview configuration.
ie
ROLE_ID=PA&PROCESS=PMP in application parameters
content provided by SAP ->
specialist ->
Talent management Specialist ->
iViews ->
COmpany goals etc
and you can confirm using this
CL_HAP_CASCADE_GOALS > meth0d GET_VALID_APPRAISAL_TEMPLATES
The parameter mentioned in the note 1457057, the one that you enter in
transaction SE80 is the default value. However, if you call application
with parameter PROCESS=PMP then the PMP process for cascading goals will
be used.
check note 1523527 -
Hello Everyone
I have two drop downs. Both are coming from look up fields from two lists. i want to set a default value(first list item) for the first drop down list box and then apply cascading based on the default value for the next drop down list box. I found one article(http://www.bizsupportonline.net/infopath2010/display-first-item-drop-down-list-box-infopath-2010.htm)
where in i can set a default value but i can't apply cascading based on that default value. Any suggestions would be highly appreciated.
Thanks
Ramanjulu Naidu NHey Ramanjulu,
Take a look at the below article which I believe will answer your question.
http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
Daniel Christian (MCTS) -
Weblogic 9.1, EJB 2.0, Oracle 9i: Cascade delete Error
Hi All,
I am facing an error with the cascade-delete facility in ejb2.0 with weblogic 9.1
Assume that I have the following relation:
<ejb-relation>
<ejb-relation-name>TeacherEJB-StudentEJB</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>teacher-has-student
</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>TeacherEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>teacher</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>student-has-teacher
</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>StudentEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>student</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type><cmr-field>
</ejb-relationship-role>
</ejb-relation>
Now when I have to delete one record from the DBSTUDENT table, what i do is the following:
StudentHomeLocal.remove(studentModel.getStudentId());
The above statement throws an SQLException staying it can't update TeacherID in DBSTUDENT (PK of DBTEACHER, FK in DBSTUDENT) with NULL.
The same code is working perfectly well in Weblogic 8.
I even tried deleting the local directly by the following statement:
StudentLocal.remove();
But this too doesn't work.
I also tried by removing the <cascade-delete/> attribute from the ejb-jar.xml file and updating the 'on-delete cascade' option in the database, but this too did not work.
There is another option of <db-cascade-delete> in weblogic-cmp-rdbms-jar.xml that I tried but this too did not work.
In short, I have tried the following cases but to no avail:
1. Mention cascade delete in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar and in the database.
2. Mention nothing in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar but 'on cascade delete' mentioned in the database.
3. Mention cascade delete in ejb-jar.xml and db-cascade-delete mentioned in weblogic-cmp-rdbms-jar.xml.jar and 'on cascade delete' in the database.
4. Remove all cascade delete from the ejb-jar.xml,the weblogic-cmp-rdbms-jar.xml and from the database.
Neither of the above work.
Kindly help ASAP.
Thanks in advance,
Sachidanand.Hi All,
I am facing an error with the cascade-delete facility in ejb2.0 with weblogic 9.1
Assume that I have the following relation:
<ejb-relation>
<ejb-relation-name>TeacherEJB-StudentEJB</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>teacher-has-student
</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>TeacherEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>teacher</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>student-has-teacher
</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>StudentEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>student</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type><cmr-field>
</ejb-relationship-role>
</ejb-relation>
Now when I have to delete one record from the DBSTUDENT table, what i do is the following:
StudentHomeLocal.remove(studentModel.getStudentId());
The above statement throws an SQLException staying it can't update TeacherID in DBSTUDENT (PK of DBTEACHER, FK in DBSTUDENT) with NULL.
The same code is working perfectly well in Weblogic 8.
I even tried deleting the local directly by the following statement:
StudentLocal.remove();
But this too doesn't work.
I also tried by removing the <cascade-delete/> attribute from the ejb-jar.xml file and updating the 'on-delete cascade' option in the database, but this too did not work.
There is another option of <db-cascade-delete> in weblogic-cmp-rdbms-jar.xml that I tried but this too did not work.
In short, I have tried the following cases but to no avail:
1. Mention cascade delete in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar and in the database.
2. Mention nothing in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar but 'on cascade delete' mentioned in the database.
3. Mention cascade delete in ejb-jar.xml and db-cascade-delete mentioned in weblogic-cmp-rdbms-jar.xml.jar and 'on cascade delete' in the database.
4. Remove all cascade delete from the ejb-jar.xml,the weblogic-cmp-rdbms-jar.xml and from the database.
Neither of the above work.
Kindly help ASAP.
Thanks in advance,
Sachidanand. -
Problem with "Row-specific or Cascading Lists in Table Layout"
Hello, friends!
I have read article "Row-specific or Cascading Lists in Table Layout" written by Steven Davelaar. I have maked several table layouts with this technique and it worked fine.
But now I have one problem, and this problem is very strange. One of VOs for which I use this table layouts throw exception after commit changes on first LOV attribute (Deptno). First time it was error
(oracle.jbo.ReadOnlyAttrException) JBO-27008: for atribute mgrList
at oracle.jbo.AttrValException.<init>(AttrValException.java:112)
at oracle.jbo.ReadOnlyAttrException.<init>(ReadOnlyAttrException.java:40)
at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:815)
at oracle.jbo.jbotester.JboTesterUtil.setData(JboTesterUtil.java:173)
Then I setted updateable property of MgrList attribute to always and now i have this error:
oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:java.util.List with value:[{}]
at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:721)
at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:85)
I don't know why, but all worked fine yestarday. And same code works fine for another VOs. And article Test application works fine too.
Help me, please.
Thank you.<table id="OsnovaniyaPrikazEnd" model="${jhsTableBindings.OsnovaniyaPrikazEnd_1B}" detailDisclosure="${uix.eventResult.detailData}" partialRenderMode="multiple" partialTargets="messageBox _uixState " proxied="true" alternateText="${nls.NO_ROWS_FOUND}" width="50%" rendered="${bindings.newGroup_end2Iterator.findMode!='true'}">
<tableFormat tableBanding="rowBanding"/>
<contents>
<formValue value="${uix.current.rowKeyStr}" name="rowKeyStr" id="${ui:concat('OsnovaniyaPrikazEnd:rowKeyStr:',uix.current.tableIndex)}"/>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'Id')}" text="Id" required="yes"/>
</columnHeader>
<contents>
<messageTextInput id="${ui:concat('OsnovaniyaPrikazEnd:Id:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.newGroup_end2Id)}" text="${uix.current.OsnovaniyaPrikazEndId}" name="Id" promptAndAccessKey="&Id" rows="1" maximumLength="1" columns="1">
<onSubmitValidater>
<decimal/>
</onSubmitValidater>
</messageTextInput>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdPrikaz')}" text="IdPrikaz"/>
</columnHeader>
<contents>
<messageTextInput id="${ui:concat('OsnovaniyaPrikazEnd:IdPrikaz:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.newGroup_end2IdPrikaz)}" text="${uix.current.OsnovaniyaPrikazEndIdPrikaz}" name="IdPrikaz" promptAndAccessKey="&IdPrikaz" rows="1" maximumLength="1" columns="1">
<onSubmitValidater>
<decimal/>
</onSubmitValidater>
</messageTextInput>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdOsnovanie')}" text="На основании"/>
</columnHeader>
<contents>
<messageChoice id="${ui:concat('OsnovaniyaPrikazEnd:IdOsnovanie:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.IdOsnovanie)}" name="IdOsnovanie" promptAndAccessKey="&IdOsnovanie" selectedValue="${uix.current.newGroup_end2IdOsnovanie}">
<contents childData="${jhsTableBindings.Osnovaniya_not_viewVO_1T.rangeSet}">
<option value="${uix.current.Id}" text="${uix.current.Text}"/>
</contents>
<primaryClientAction>
<firePartialAction event="whenListChanged" formSubmitted="true" unvalidated="true" targets="${ui:cond(uix.current.isNewRow,'OsnovaniyaPrikazEnd', 'OsnovaniyaPrikazEnd')}"/>
</primaryClientAction>
</messageChoice>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdMoves')}" text="IdMoves"/>
</columnHeader>
<contents>
<messageChoice rendered="${uix.current.ListLength>'1'}" id="${ui:concat('OsnovaniyaPrikazEnd:IdMoves:',uix.current.tableIndex)}"
model="${ui:cond(uix.current.isNewRow,null,uix.current.OsnovaniyaPrikazEndIdMoves)}" name="IdMoves" promptAndAccessKey="&IdMoves"
selectedValue="${uix.current.newGroup_end2IdMoves}">
<contents childData="${uix.current.MovesList.inputValue}">
<option value="${uix.current.Id}" text="${uix.current.Fam1}"/>
</contents>
</messageChoice>
</contents>
</column>
<column>
<columnFormat displayGrid="true" columnDataFormat="iconButtonFormat"/>
<columnHeader>
<text text="Удалить?"/>
</columnHeader>
<contents>
<checkBox name="deleteRow" value="ok"/>
</contents>
</column>
</contents>
</table>
Thank you. -
Cascading EA4500s and Guest Network access
Hi, I hope esomone can help me here. I've got two EA4500 routers connected via ethernet. The primary router has DHCP enabled and the secondary has it disabled. IP address of primary is 192.168.1.1 and the secondary is 192.168.1.2.
I have set up guest access on both routers however only the primary router allows users to connect. When out of range of the primary router but in range of the secondary router the network is visible but when you try to connect to it, it only gives limited or no connectivity message and can't connect to the internet.
Is it possible for the guest network access to follow the same pattern as the secure network, i.e. the same network throughout the house?
Regards
JonCascading two routers should have correct parameters set. For instance, the Ethernet port of the secondary router should be connected to the ethernet port of the primary one, and the DHCP should be disabled on the second router. The ip address you've set are correct for the both routers. This thing shoud be done if the connection is LAN to LAN.
By the way there are two types of cascading: Click here for info!
For the Guest Network:
Guest Network would only work if the the DHCP is enabled on your router. It means to say that on the type of setup you're doing which is LAN to LAN (DHCP disabled on the second router), Guest network would not work on the secondary router. If the connection is LAN to WAN, then both of the router should have Guest Network working. -
Can I use cascading parameters in a fetchXML report.
I'm trying to write a report For CRM Online in FetchXML. I want to use pre-filtering to force users to run the report from the Account form so the results are limited to one account because my database is quite large and if they use
the Advanced Find they are likely to break the report.
So dataset1 uses a query which includes a pre-filtering parameter,
'@CRM_account'
I was hoping to add Dataset2 which would use a cascading parameter,
'@CRM_Org' that gets its value from the 'accountid' attribute in the query used for Databset1. When I run the report however. I get an error 'a parameter expected by the report has not been supplied.' It seems the value for the 2nd param for
dataset2 , '@CRM_Org' is not getting a value passed to it. Does anybody know if what I am attempting is possible in FetchXML ?
regards Alan WardI couldn't understand what is the use of second parameter. Your work can be done with one parameter.
Create your fetch with a parameter in it (say dataset1). Now create a fetchXML (say dataset2) that fetches you account id.
For the parameter from dataset1, set default value as "Get values from Query" and pass "account id " from dataset2 to it. That's it your job is done.
Note: Remember to select Forms for related record types in
Display In area and Account in Related Record Types area.
Jugal Kishore Dandamudi.
Maybe you are looking for
-
What happens when the Apple Configurator Certs Expire?
So I was looking at some iPads I deployed sometime ago using Apple Configurator. Last summer I brough them all in (about 220 units,) wiped them, used configurator to install iOS 5.1, all supervised, and named according to the Teacher they were given
-
Hi, I am using EXIT_SAPLCOIH_009 which gets triggerred at the time of saving a work order in IW32. In this exit, I have coded to generate a popup box at the time of saving. If the user presse the cancel button, the control has to go to back to the wo
-
[SOLVED] VMPlayer error: 'The virtual machine is busy'
Hello, I encounter an error when I try to open my Windows XP virtual machine. VMPlayer say me that 'the virtual machine is busy', but there aren't others virtual machines that are already running. I try to find a fix on google, but it seams that usua
-
bonjour, je suis un nouvel utilisateur d'ipod et du système mac,bref je galère... je voudrais savoir comment je peux lire et si c'est possible de lire des films que j'ai déjà sur mon ordinateur
-
How to stop my iPod from restoring every time I want to put a song on it < Edited by Host >