Client tries to update dns record
Hi,
The DNS server log shows that a client tries to update a dns record. The update is denied, but the client tries several times, using different ports. Denied every time.
Is there a risk that this client or another client manage to update the dns record? What should I do to prevent this attacs?
The action taken by now is to stop the client in the firewall at ip level. But then there is another client using another ip so this isn't really the best way.
Regards,
Sindre
Sindre
There is no reason to worry about this.
It's probably a Windows 2000 or XP client doing this.
As far as I know the client can't update the OS X BIND DNS the way it's setup.
You can disable the DNS updating setting in the Windows client's TCP/IP DNS config setup.
Similar Messages
-
Active Directory client not dynamically updating DNS
Hi,
There has been some other issues mentioned on other threads regarding the Active Directory Plugin within Lion, it does appear to be flaky.
I just wanted to make sure that the issue I'm having is not down to a mis-config by myself.
We have several Macs running 10.7.1 and are bound into Active directory (Windows 2008 r2) however, it appears that the DNS records for these machines are not being dynamically created within AD. (All Zones are AD intergrated) All 10.6.x clients seem to work fine and records are created and updated dynamically as IPs change etc.
Is anybody else having this issue? If not, any ideas why this is happening?
Thanks in advance.Hi!
I'm having exactly the same problem and nobody seems to have an answer.
Regarding the reply you got, this has nothing to do with Lion Server. We're talking about Lion clients bound to an AD (Windows Server 2008 R2, in my case) not dynamically registering their DNS entries.
I also noticed that the DHCP entries for those clients are missing the "Name" property, which is already symptomatic of something going wrong.
Anyone? -
HTTPS, DNS and dynamically updating DNS records
Hello to you all, if you are able to help with a DNS problem that I'm having then please accept my thanks and appreciation in advance.
First some background information, I recently moved my server from my studio to my house where a new purpose built studio will soon be erected. At my old studio any requests for myurl.com came in via the IP (whether that be http, https, ftp etc) from the domain registrar and the router would send the request to the relevant port number whether that be 80 for http or 443 for https etc and all was well as this location had a fixed IP address. Unfortunately at my new location whilst I have a much faster connection I do not have a fixed IP. To get around this I have the following set up (not ideal for a business I know but perfectly OK for home hosting); I set up two psuedo nameservers at no-ip.com (ns1myurl.com and ns2myurl.com) which tracks the changes in my IP address and updates its records accordingly, my registrar then sends any requests to these 'nameservers' and no-ip then forwards it on to my server. So far so good.
The problem arises once the requests get to my server, whilst I have DNS set up, I can only recieve requests from a straight request to the server ie myurl.com will display the site without any problem, but if I then put a www in front of that or try to access the https part of my site (which is set up as a seperate site on the same server) then the server throws an error. I have tried to put an alias (CNAME) into the zone but it does not want to resolve the request. I have searched around but to no avail, I am totally new to DNS so am currently on a steep learning curve and fumbling around in the dark.
The first thing that I need to get working is the request to be resolved correctly and then (and this is where the real fun starts!) is to dynamically update the IP in the DNS records as the IP changes. I will probably have to get help in on this as I understand that this requires BIND of which I know nothing about, first though I'd like to get the pages to be served up correctly. Advice, hints, tips or links to tutorials all greatly appreciated. Full set up listed below.
Many thanks, David.
Xserve PPC G5 running 10.5.8 unlimited set up as standalone OD master
Xraid
APC UPS
CradlePoint MBR1200 Gateway router which acts as the DHCP
http://myurl.com and https://myurl.com set up as 2 seperate sites and located on the Xraid
Current DNS setup:
Primary Zone name: myurl.com with nameservers ns1myurl.no-ip.info and ns2myurl.no-ip.info and allow zone transfers in checked
Then
Name
Type
Value
myurl.com
Primary Zone
ns1myurl.no-ip.info
Machine
12.34.56.78 (external IP)
ns2myurl.no-ip.info
Machine
12.34.56.78 (external IP)
myurl.com.
Machine
12.34.56.78 (external IP)
www.myurl.com.
Alias
myurl.com.
With the reverse zone looking thus with allow zone transfers being checked
Name
Type
Value
56.34.12.in-addr.arpa.
Reverse Zone
12.34.56.78
Reverse mapping
myurl.com.Thanks for the reply Camelot, that part though I had already figured out. I now have this working, all I did was change the external IP to the internal one of the server with resolves with the .local machine name and all is working just fine (for now!). As long as I have primary zones set for each site and any alias or services set up on them then everything works well.. The real test will be when my ISP changes the IP, whilst my tests have proved successful the proof will be when they update the address.
Thanks anyway. David. -
New Windows Server 2012 unable connect to Netlogon Service or update DNS records
Hi everybody, all of my Windows Servers 2012 decided to collapse after innocuous group policy update that was meant to make user passwords more secure.
The AD and DNS seem to be functioning "normally", I am able to add new Windows7 and Windows Server 2008 machines to the domain, I can see them in listed in the AD and DNS record are update correctly, however, as soon as I try to join Windows Server
2012 it breaks.
The event log is littered on the new server with:
The system failed to register host (A or AAAA) resource records (RRs) for network adapter
with settings:
Adapter Name : {DB7F73CE-E011-4F3C-BEBC-2CE7A871DF51}
Host Name : CHEETAH
Primary Domain Suffix : somedomain.com
DNS server list :
192.168.0.5
Sent update to server : <?>
IP Address(es) :
192.168.0.15
The reason the system could not register these RRs was because the update request it sent to the DNS server timed out. The most likely cause of this is that the DNS server authoritative for the name it was attempting to register or update is not running
at this time.
You can manually retry DNS registration of the network adapter and its settings by typing 'ipconfig /registerdns' at the command prompt. If problems still persist, contact your DNS server or network systems administrator.
and
Name resolution for the name _ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.somedomain.com. timed out after none of the configured DNS servers responded.
When I try to ping the primary DC (WS2003) it fails, the Secondary DC (WS2012) responds.
The >nltest /sc_query:somedomain.com on Windows Servers 2012 returns:
Flags: 0
Trusted DC Name
Trusted DC Connection Status Status = 1311 0x51f ERROR_NO_LOGON_SERVERS
The command completed successfully
yet it works on all other machines.
I tried removing 2012 servers from the domain and rejoining - without success. The cookie crumbled when I added two new installations of Windows Server 2012 & 2008 and 2008 worked fine but 2012 showed same symptoms.
There is one peculiar thing that I had noticed on all Windows 2012 machines, it constantly showing "Workplace Connection - Connecting" in the networks pane on the right side of the screen, which I can't say i ever noticed before.
Unfortunately, the secondary DC is a multihoming server with Direct Access role - I am not sure if this may play some part but our existing configuration worked for a year now without any problems. Issue appeared when I changed the password complexity rule,
which boggles the mind. I wonder if there has been some other changes in GPO that did not propagate from years ago and finally comeback to break things.
Any suggestions would be really appreciated.
wminHello Ace, i wish you a Happy New Year! I hope your break was enjoyable and filled with cheer.
In the end I had to bite the bullet and reinstall all troublesome servers. Your recommendations from above removed some serious problems with the DA and DNS resolution.
I was able to attach new server to the domain without any problems and begin painful process of rebuild.
I have promoted TIGER to full DC controller role, but having some issues with replication. Although running >repadmid /showrepl gives positive
feedback, the sysvol folder on the secondary DC is empty.
Also there is a couple of warnings in the event log:
Event ID 4012
Log Name: DNS Server
Source: DNS-Server-Service
The DNS server is waiting for Active Directory Domain Services (AD DS) to signal that the initial synchronization of the directory has been completed. The DNS server service cannot start until the initial
synchronization is complete because critical DNS data might not yet be replicated onto this domain controller. If events in the AD DS event log indicate that there is a problem with DNS name resolution, consider adding the IP address of another DNS server
for this domain to the DNS server list in the Internet Protocol properties of this computer. This event will be logged every two minutes until AD DS has signaled that the initial synchronization has successfully completed.
- which has not repeated since 3rd of Jan.
These events occur on the primary DC every few minutes:
Event ID 1030
Source: Userenv
Log Name: NT AUTHORITY\SYSTEM
Windows cannot query for the list of Group Policy objects. Check the event log for possible messages previously logged by the policy engine that describes the reason for this.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event ID 1058
Source: Userenv
Log Name: NT AUTHORITY\SYSTEM
Windows cannot access the file gpt.ini for GPO CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=somedomain,DC=com. The file must be present at the location <\\somedomain.com\sysvol\somedomain.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\gpt.ini>.
(The network name cannot be found. ). Group Policy processing aborted.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Should sysvol folder be shared on the secondary DC? Another interesting thing to point out is that
\\somedomain.com\sysvol\somedomain.com\Policies\ can be access
from all other machines except the DC1.
Cheers!
kind regards,
wmin -
DNS record ownership and the DnsUpdateProxy group
I have a 2 x 2003 domain controller that have DNS and DHCP Services installed
I was thinking of configuring DHCP to use a service account to update DNS records.
If I set this, do the DHCP Servers need to be members of the DNSUpdateProxy security group for the service account to work?>I have to agree with John here. I don't think it's reasonable to just say 'ms told us so'. We need a
technical before and answer is given. I have multiple DHCP servers and I use a security account on them to register the records and never use the
DNSUpdateProxy Group and I have no problems. My thinking is this:
Assume we are using Integrated Secure Zones in AD:
Scenario 1:
Windows DHCP server i registering records on behalf of clients
Not a member of DNSUpdateProxy Group and not using dedicated account
Records will have owner as dhcpserver$ and only that account can update
This is a problem if that DHCP server fails
Also, non Windows DHCP server with no AD account cannot update
Scenario 2:
Windows DHCP server i registering records on behalf of clients
Member of DNSUpdateProxy Group and not using dedicated account
Records will have owner as SYSTEM and authenticated users can updated meaning any user or client on that domain
No problem if that DHCP server fails as any other authorized DHCP server can update
Non Windows DHCP servers can updated if they have a domain machine account
Scenario 3:
Windows DHCP server i registering records on behalf of clients
Using a dedicated account
Records added with owner same as this dedicated account
Another DHCP server that also uses this same account can updated the records
A non windows DHCP server that can use this account can also update the records
Now, can someone from MS please clarify the technical reason they say that in Scenario 3, you must add the DHCP servers to the
DNSUpdateProxy group ?
http://technet.microsoft.com/en-us/library/cc780538(v=ws.10).aspx
I guess this link didn't help?
DNS Record Ownership and the DnsUpdateProxy Group
"... to protect against unsecured records or to permit members of the DnsUpdateProxy group to register records in zones that allow only secured dynamic updates, you must create a dedicated user account and configure DHCP servers to perform DNS dynamic updates
with the credentials of this account (user name, password, and domain). Multiple DHCP servers can use the credentials of one dedicated user account."
http://technet.microsoft.com/en-us/library/dd334715(WS.10).aspx
Just to add:
Why is the DnsUpdateProxy group needed in conjunction with credentials?
The technical reason is twofold:
DnsUpdateProxy:
Objects created by members of the DNSUpdateProxy group have no security; therefore, any authenticated user can take ownership of the objects.
DHCP Credentials:
Forces ownership to the account used in the credentials, which the DnsUpdateProxy group allowed to take ownership other than the registering client.
Otherwise, the default process is outlined below, and this applies to non-Microsoft operating systems, too, but please note that non-Microsoft operating systems can't use Kerberos to authenticate to dynbamically update into a Secure Only zone, however
you can configure Windows DHCP to do that for you.
1. By default, Windows 2000 and newer statically configured machines will
register their own A record (hostname) and PTR (reverse entry) into DNS.
2. If set to DHCP, a Windows 2000, 2003 or XP machine, will request DHCP to allow
the machine itself to register its own A (forward entry) record, but DHCP will register its PTR
(reverse entry) record.
3. If Windows 2008/Vista, or newer, the DHCP server always registers and updates client information in DNS.
Note: "This is a modified configuration supported for DHCP servers
running Windows Server 2008 and DHCP clients. In this mode,
the DHCP server always performs updates of the client's FQDN,
leased IP address information, and both its host (A) and
pointer (PTR) resource records, regardless of whether the
client has requested to perform its own updates."
Quoted from, and more info on this, see:
http://technet.microsoft.com/en-us/library/dd145315(v=WS.10).aspx
4. The entity that registers the record in DNS, owns the record.
Note "With secure dynamic update, only the computers and users you specify
in an ACL can create or modify dnsNode objects within the zone.
By default, the ACL gives Create permission to all members of the
Authenticated User group, the group of all authenticated computers
and users in an Active Directory forest. This means that any
authenticated user or computer can create a new object in the zone.
Also by default, the creator owns the new object and is given full control of it."
Quoted from, and more info on this:
http://technet.microsoft.com/en-us/library/cc961412.aspx
More on this discussed in:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/6f5b82cf-48df-495e-b628-6b1a9a0876ba/regular-domain-user-uses-rsat-to-create-dns-records?forum=winserverNIS
If that doesn't help, I highly suggest to contact Microsoft Support to get a definitive response. If you do, I would be highly curious what they say if it's any different than what I found out from the product group (mentioned earlier in this thread).
And of course, if you can update what you find out, it will surely benefit others reading this thread that have the same question!
Thank you!
Ace Fekay
MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
This posting is provided AS-IS with no warranties or guarantees and confers no rights. -
Error while updating a record in MS Access
Im new to coldfusion and am running into a problem while
trying to update a record in a MS Access table.
I have a MS Access table where the primary key is a
auto-number long integer field named jobid.
I have an edit form where info can be changed then saved. A
hidden form field named jobid holds the records primary key field
value for the record being edited. When submitted this is what
happens:
I use a basic SQL UPDATE statement but I get the error "Data
type mismatch in criteria expression"
Some code:
<cfset nJobId=Int(Val(FORM.jobid))>
*dont know if i need the above line but using #FORM.jobid#
in the WHERE clause below didnt work either
<cfquery datasource="lrs">
UPDATE jobs SET
status='#FORM.status#',
offer='#FORM.offer#',
postdate="#CreateODBCDate(FORM.postdate)#",
jobtype=#FORM.jobtype#,
jobtitle='#FORM.jobtitle#',
..etc...
WHERE jobid=#nJobId#
The WHERE clause is where the error occurs with "Data type
mismatch in criteria expression"
After a few times with that i changed the where clause to
simply "WHERE jobid=1" as this record id does exist, but it has the
same error.
I then tried changing the where clause to
WHERE jobid=<cfqueryparam cfsqltype="cf_sql_bigint"
value="#FORM.jobid#">
and there it "appears" to work, but the record is not
actually updated. No changes are made to the table though no error
is thrown.
Im missing something here... why wont the record update
?The data type mismatch isn't necessarily in your where
clause. I'm guessing that it's the quotes around the create
odbcdate function.
use of cfqueryparam will solve a lot of these problems for
you. -
Getting timeout error while updating a record from c#
Hi,
I have around 30k records in a tables. When I update that record inside the Transaction (Enterprise Data Library, c#) , it takes long time and throws timeout error.
But I am able to update the same record via Toad.
In the morning I tried same updating the record, it works without any change in the code or script.+
is it due table lock or db related issue? please adivse, how to resolve if occurs again.
anandCode:
private static void Save()
using (DBTransactionManager dbTransactionManager = new DBTransactionManager())
try
DataTableDAL.Instance.ExecuteDML("Update Voyage SET BallastBonus = 30000 WHERE ID = 'AE53B610BEA743EC8AFBAED0C8349BF8';");
//commit database
dbTransactionManager.Commit();
catch
dbTransactionManager.RollBack();
throw;
Table
Column Name ID Pk Null? Data Type Default Histogram Encryption Alg Salt
ID 1 1 N NVARCHAR2 (32) None
CALCNUMBER 2 N NUMBER (10) None
CURRENCYID 3 N NVARCHAR2 (32) Frequency
CALCTYPE 4 N NUMBER (5) Frequency
ESTIMATEDESCRIPTION 5 Y NVARCHAR2 (200) None
ESTIMATEGROUPDESCRIPTION 6 Y NVARCHAR2 (200) None
BALLASTBONUS 7 Y NUMBER (12,2) None
BALLASTBONUSCOMMPCT 8 Y NUMBER (6,3) None
ISESTIMATE 9 N NUMBER (1) None
ADDITIONALSTEAMVALUE 10 Y NUMBER (8,4) None
ISADDITIONALSTEAMPCT 11 Y NUMBER (1) None
ADDITIONALPORTVALUE 12 Y NUMBER (8,4) None
ISADDITIONALPORTPCT 13 Y NUMBER (1) None
CREATEDBY 14 N NVARCHAR2 (32) Frequency
CREATEDDATE 15 N DATE None
UPDATEDBY 16 Y NVARCHAR2 (32) None
UPDATEDDATE 17 Y DATE None
LUMPSUMCARGOCOST 18 Y NUMBER (1) None
BUNKERPRICEMETHOD 19 Y VARCHAR2 (30 Byte) None
INCCONTCALCRESULT 20 Y NUMBER (1) None
FINAL_EST 21 Y NUMBER None
SPOT_VOYAGE 22 Y NUMBER (1) None
ISRUNCOSTEDIT 23 Y NUMBER (1) None
Index
Table doesnt have any index, except primary key index.
Total Records
35,000
Hope this input might sufficient to help me. -
Stale data error while trying to update row.
Hi,
I have a search page, from where i would like to select a particular record and update some of its attributes. But when i try to commit the transaction, i get the error below:
Unable to perform transaction on the record. \nCause: The record contains stale data. The record has been modified by another user. \nAction: Cancel the transaction and re-query the record to get the new data.
My Results table, based on VO1(based on EO), has an image item which submits the page and opens another page with the details of the current record, and provides the user with an option to update one of the attributes. The second page, where the user updates the attributes is based on another VO (say VO2, which again is based on the same EO as VO1).
Behind the Apply button, i call a method in the AM which simply commits the transaction and then re-directs to the original search page and displays the confirmation message.
Pseudo Code:
In the controller for VO1 (search page).
if <update> then
params = config_id ;
am.invokeMethod("initSketchDetails,params) ;
In AM
public void initSketchDetails(String config_id)
vo = getVO2 ;
vo.initQuery ;
In VO2Impl
public void initQuery(String config_id) {
<convert string to jbo.domain.number>
setWhereClause("config_id = :1);
setWhereClauseParams(null) ;
SetWhereClauseParam(0,config_id);
executeQuery();
In the PFR of Controller for the Update Page
if ("apply" != null)
am = pageCOntext.getAM ;
am.invokeMethod("apply") ;
pageCOntext.forwardImmediately to results page ..
AMImpl
public void apply() {
getTransaction.commit();
Where am i going wrong?
Thanks
AshishHi,
I noticed that this error is occuring only under certain conditions.
In my application a particular record can have 4 statuses (Draft, Submitted, Cancelled and Technical Query). But when a record is being updated, it can only be updated to Draft, Technical Query or Cancelled.
The error occurs ONLY when i am trying to update a record which is in Submitted Status to any other status. If i update a record from Draft -> Technical Query/Cancelled, there are no issues!!!
I cant figure out where the problem lies.
The poplist picks up values from a lookup.
Any idea how to debug this situation?
Thanks
Ashish -
How To Update A Record? What is Wrong With My Code?
I tried to update a record and got the
java.lang.ArrayIndexOutOfBoundsException: 0
Here is my code:
public void updateLastPostMemberName(int threadID, // primary key
String lastPostMemberName)
throws ObjectNotFoundException, MessageDAOSysException
Connection conn = null;
PreparedStatement stmt = null;
String sql = "UPDATE message_thread SET last_post_member_name = '" + lastPostMemberName + "' WHERE thread_id = '" + threadID + "'";
try
conn = DBConnection.getDBConnection();
stmt = conn.prepareStatement( sql );
stmt.setString( 1, lastPostMemberName ); // this is the statement where the error occurred.
stmt.executeUpdate();
catch( SQLException se )
System.out.println( se.getMessage() );
se.printStackTrace();
throw new MessageDAOSysException( "Error executing SQL in ThreadHandler.updateLastPostMemberName." );
finally
if ( conn != null )
try
stmt.close();
stmt = null;
conn.close();
catch( SQLException sqlEx )
System.out.println( "Problem occurs while closing " + sqlEx );
conn = null;
}Natalie,
try this...
public void updateLastPostMemberName(int threadID, // primary key
String lastPostMemberName) throws ObjectNotFoundException,
MessageDAOSysException {
Connection conn = null;
PreparedStatement stmt = null;
String sql = "UPDATE message_thread SET last_post_member_name = ? WHERE thread_id = ?";
try {
conn = DBConnection.getDBConnection();
stmt = conn.prepareStatement( sql );
stmt.setString( 1, lastPostMemberName );
stmt.setInt(2, threadID);
stmt.executeUpdate();
catch( SQLException se ) {
System.out.println( se.getMessage() );
se.printStackTrace();
throw new MessageDAOSysException(
"Error executing SQL in ThreadHandler.updateLastPostMemberName." );
finally {
if ( conn != null ) {
try {
stmt.close();
stmt = null;
conn.close();
catch( SQLException sqlEx ) {
System.out.println( "Problem occurs while closing " + sqlEx );
conn = null;
}Good Luck,
Avi. -
Updating condition records in an outbound delivery
Hi,
I'm trying to update condition records in an outbound delivery but couldn't find any suitable BAPI for the same so I just implemented the BADI 'le_shp_delivery_proc' and called a FM inside the method SAVE_DOCUMENT_PREPARE' which does a call transaction to VL02N to update the condition records. But the problem now is that, when I try to save this delivery, again the same BADI is triggered and goes through the same process of call transaction and thus gives me an error message that the delivery is locked as it indeed is.
Can somebody suggest a way out of this problem. ??
Thanks
AshishHi,
@praveen: I tried the solution provided by you and it worked for me in this context. But it seems this BADI gets triggered every time the delivery is getting saved. So for my test purposes, I'm triggering this BADI in a program, but in actual scenario, the BADI would be called on every sy-ucomm = 'SICH_T' i.e. SAVE. hence, I can't separate my piece of code using this condition.
I'm trying to call my FM(update module in collective run mode) inside this BADI in backgrnd task as a separate unit but this doesn't seem to work.
Any more suggestions?
Thanks
Ashish -
Updating multiple records without having to use a cursor
I am trying to update multiple records in a table.
Eg
Table A -20 records
Table B -10 records.
Would like to update Table B with the updated records in Table A for those records which the primary key matches
and I dont want to use cursors. Is this possible??
Thanx in Advance.Please refer to the test below, it should give you the general idea,SQL> desc tableA;
Name Null? Type
SEQ NUMBER
INV VARCHAR2(20)
AMT NUMBER(12,2)
AMT2 NUMBER(12,2)
SQL> desc tableB;
Name Null? Type
SEQ NUMBER
INV VARCHAR2(20)
AMT NUMBER(12,2)
AMT2 NUMBER(12,2)
SQL> select count(*) from tableA;
COUNT(*)
6
SQL> select count(*) from tableB;
COUNT(*)
12
SQL> UPDATE tableB b
2 SET b.inv = NVL((SELECT a.inv from tableA a WHERE a.seq = b.seq), b.inv),
3 b.amt = NVL((SELECT a.amt from tableA a WHERE a.seq = b.seq), b.amt),
4 b.amt2 = NVL((SELECT a.amt2 from tableA a WHERE a.seq = b.seq), b.amt2)
5 /
12 rows updated.
*** Please note that this is DIFFERENT from what you asked, here tableB is having more rows, which is fine. We **may not be** able update tableA in this example by reversing the table names, because the join may bring more rows than UPDATE statement needs. ***Thx,
Sri -
Hi,
I am trying to update mulitple records in a table, however I
can't seem to figure out a way to differentiate the fields. I used
a query to get all sales from a single customer using their
customer number. I sometimes end up with 2 or more records. I want
to mark both records as shipped (using a select statement with the
choices of shipped and not shipped) then update these at the same
time. However I have two values the field "shipping", one for each
record, I also have two values for the field "salesnum" (the key
for the sales table). If I just try to do a regular update query,
then I only seem to update the last record with the last set of
values.
Anyhow, I have been althrough the forums and books to find a
solution (not to mention tried several combinations of looping
through the query). Any help will be appreciated. Thank you.Why wouldn't I need the original query? I want to see what
customer #2 ordered, then have the ability to update one or more
fields in one or more of his sales records. The first thing to do
would be to find out what the customer ordered.
This is the crux of the problem, what if I want to update one
record and leave the second, third, forth, etc alone because they
haven't shipped yet?
So I use my original query to pull all the sales records
using where to filter everything but customer #2's records. I use a
<cfoutput query ="getsales"> <tr>
<td>#custnum#</td>
<td>#Salesnum#</td>
<td><select name="shipping">
<option value ="#shipping#">#shipping#</option>
<option value-"Shipped">Shipped</option>
<option value="Not Shipped">Not
Shipped</option></td>
to display the records and set up the form for updating.
The post method yields a value for "shipping" and "salesnum"
that only seems to match the last value rendered by the query.
Hope this clarifies things, thanks for the help. -
Need to update multiple records using store procedure
Hi i am trying to update multiple records using store procedure but failed to achieve pls help me with this
for example my source is
emp_name sal
abhi 2000
arti 1500
priya 1700
i want to increase salary of emp whose salary is less than 2000 it means rest two salary should get update..using stored procedure only
i have tried following code
create or replace procedure upt_sal(p_sal out emp.sal%type, p_cursor out sys_refcursor)
is
begin
open p_cursor for
select sal into p_sal from emp;
if sal<2000 then
update emp set sal= sal+200;
end i;f
end;
and i have called the procedure using following codes
set serveroutput on
declare
p_sal emp.sal%type;
v_cursor sys_refcursor;
begin
upt_sal(p_sal,v_cursor);
fetch v_cursor into p_sal;
dbms_output.put_line(p_sal);
end;
the program is executing but i should get o/p like this after updating
1700
1900
but i am getting first row only
2000
and record is not upsating...please help me with this
thanksHi Alberto,
thanx for your valuable suggestion. but still i have doubt. the code which i have mentioned above might be simple but what if i have big requirement where i need update the data by using loops and conditional statement.
and i have similar kind of requirement where i need to deal with procedure which returns more than one row
my source is
empno ename salary
111,abhi,300
112,arti,200
111,naveen,600
here i need to write a store procedure which accepts the empno (111) as input para and display ename and salary
here i have written store procedure like this
create or replace procedure show_emp_det(p_empno in emp.empno%type, p_ename out emp.ename%type,p_salary out emp.salary%type, p_cursor out sys_refcursor)
is
begin
open p_cursor for
select ename,salary into p_ename,p_salary from emp where empno=p_empno;
end;
and i have called this by using
declare
p_salary emp.salary%type;
p_ename emp.ename%type
v_cursor sys_refcursor;
begin
show_emp_det(111,p_ename,p_salary,v_cursor);
fetch v_cursor into p_ename,p_salary;
dbms_output.put_line(p_ename);
dbms_output.put_line(p_salary);
end;
here i should get
abhi,300
naveen,600
but i am getting first row only
abhi,300
but i want to fetch both rows...pls help me to find the solution -
DNS records not always updating / up to date / correct
Hi
We have a local domain with a primary DC running Windows Server 2008 R2 along with DHCP and DNS (AD integrated), and a secondary backup DC running Windows Server 2008 (non-R2), however it has been off for a very long time due to malfunctioning
hardware. We also have another domain on the same LAN in a different forest altogether which has a trust set up between these two domains. This other domain has a Windows Server 2008 R2 as the primary DC and utilizes the first mentioned DC for DHCP
as well. The LAN has physical Ethernet connectivity and WiFi as there are mostly laptops as workstations. DCHP leases are set to 24 hours and DNS Aging and Savaging is configured for both domains.
I have been troubled by an issue for some time now where in some cases there is a mismatch with the IP a laptop has and what DNS has captured. I tried to reproduce the issue but I am unable to do so: I would connect a laptop via cable, then switch
to WiFi and then back again, each time DNS gets updated accordingly. I have tried the same tests with both connected simultaneously while switching between them as well.
What is curious is that I experience this intermitted issue in both DNS forward lookup zones for the respective domains. Keep in mind as I said previously that these are completely separate domains from different forests with a trust
configured between them. Other than the trust which they have in common, the DHCP is also in common which makes me suspect the issue is related to it. I have configured the IPv4 DCHP setting: "Always dynamically update DNS A and PTR records"
and ensured credentials were set which will be used to register and update records on behalf of clients.
This issue is causing problems with internet access through our hardware firewall as the sessions are dependant on the accuracy of DNS. Please, could anyone try and assist me. Thank you in advance.I have made an interesting discovery. At one point yesterday client was connected to both cable and wifi which means DCHP had 2 leases for each adapter respectively. Later in the day wifi was completely turned off though a physical toggle switch on the
machine and only plugged in via cable. Further in the day I had the user complain that there is no internet connectivity (remember I said our firewall is dependant on the DNS' accurancy). Upon inspection I found that DNS had the IP of the wifi adapter and
not the one from cable, yet the wifi adapter is turned off completely for a couple of hours. I ran ipconfig /registerdns which corrected the A record, however only for about an hour after which the wifi IP overwrote the record again. I ended up deleting
the wifi adapter's DHCP lease late in the afternoon after which we all left for the day not too long thereafter. In the morning I had the same complaint of no internet access to again find that the cable IP is not reflecting in DNS for the client's A record
and now found a completely new IP which it did not have before, yet according to DCHP, the MAC address matched the wifi adapter. When I checked, the wifi adapter was still completely off. Somehow someway the record keeps on being overwritten by something (suspect
DHCP), even if the other adapter is completely turned off?! -
DNS record ownership for DHCP clients
my configuration:
dhcp/dns/dc installed on same system - Windows 2008 R2 SP1 in domain environment.
all zones configured to secure updates only with aging and scavenging enabled
dhcp servers are member of DNSupdateproxy group.
dhcp are configured with standard domain user account (this user was made a member of dnsupdateproxy as well, DOES THAT MATTER?)
dhcp scopes are configured with default DNS setup (force DNS update by DHCP)
now...
all DNS records for endpoint devices on dhcp lease (windows7, mac os X, ubuntu) are owned by SYSTEM
in security tab for some DNS records i can see service account with write permission to record ( i believe this is desired state)
in other records service account has no permission but timestamps are still updated by computer account (hostname$ has write permission). these records have pencil icon on computers in dhcp lease table.
Problem with this (hostname$ has write permissions) is when user connect to network via VPN (obtains dhcp lease) it get's two records registered in DNS -> 1 record for ip distributed by dhcp server and 2nd record for his home private network.
Have anyone seen this before?
i've tried deleting DNS records / releasing ip on endpoint device (example win7). It would not register to DNS by DHCP. However if i do ipconfig /registerdns it will do it, but dhcp service account won't have permission no this record.Apparently it appears that DHCP may not be configured with credentials, DHCP DNS settings are not configured to force DHCP to register ALL requests, nor has the DHCP server itself have been added to the DnsUpdateProxy group. These are all prerequisites
for DHCP to own all records, otherwise you will see default behavior, which is:
By default, a Windows 2000 and newer statically configured machines will
register their A record (hostname) and PTR (reverse entry) into DNS.
If set to DHCP, a Windows 2000 or newer machine will request DHCP to allow
the machine itself to register its own A record, but DHCP will register its PTR
(reverse entry) record.
The entity that registers the record in DNS, owns the record.
In summary:
Configure DHCP Credentials. The credentials only need to be a plain-Jane, non-administrator, user account. Give it a really strong password.
Set DHCP properties, DNS tab, to update everything, whether the clients can or cannot.
Add the DHCP server(s) to the Active Directory, Built-In DnsUpdateProxy security group.
Make sure ALL other non-DHCP servers are NOT in the DnsUpdateProxy group. For example, some believe that the DNS servers or other DCs not running DHCP should be in it. They must be removed or it won't work.
On Windows 2008 R2 or newer, DISABLE Name Protection.
If DHCP is co-located on a Windows 2008 R2 or Windows 2012 DC, you can and must secure the DnsUpdateProxy group by running the following:
dnscmd /config /OpenAclOnProxyUpdates 0
Configure Scavenging one one DNS server. Set the NOREFRESH and REFRESH values combined to be equal or greater than the DHCP Lease length. What it scavenges will replicate to others anyway.
DHCP Service Configuration, Dynamic DNS Updates, Scavenging, Static Entries, Timestamps, DnsUpdateProxy Group, DHCP Credentials, prevent duplicate DNS records, DHCP has a "pen" icon, and more...
Published by Ace Fekay, MCT, MVP DS on Aug 20, 2009 at 10:36 AM 3758 2
http://msmvps.com/blogs/acefekay/archive/2009/08/20/dhcp-dynamic-dns-updates-scavenging-static-entries-amp-timestamps-and-the-dnsproxyupdate-group.aspx
Good summary:
How Dynamic DNS behaves with multiple DHCP servers on the same Domain?
http://social.technet.microsoft.com/Forums/en-US/winserverNIS/thread/e9d13327-ee75-4622-a3c7-459554319a27
DNS Record Ownership and the DnsUpdateProxy Group
http://technet.microsoft.com/en-us/library/dd334715(v=ws.10).aspx
DNS Record Ownership and the DnsUpdateProxy Group
"... to protect against unsecured records or to permit members of the DnsUpdateProxy group to register records in zones that allow only secured dynamic updates, you must create a dedicated (NON-ADMIN) user account and
configure DHCP servers to perform DNS dynamic updates with the credentials of this account (user name, password, and domain). Multiple DHCP servers can use the credentials of one dedicated user account."
http://technet.microsoft.com/en-us/library/dd334715(WS.10).aspx
DNS record ownership and the DnsUpdateProxy group
http://social.technet.microsoft.com/Forums/en-US/winserverNIS/thread/b17c798c-c4b2-4624-926c-4d2676e68279/
Ace Fekay
MVP, MCT, MCITP/EA, MCTS Windows 2008/R2 & Exchange 2007, Exchange 2010 EA, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Technical Blogs & Videos: http://www.delawarecountycomputerconsulting.com/
This post is provided AS-IS with no warranties or guarantees and confers no rights.
Maybe you are looking for
-
Downloading file from application server in Binary mode
Hi, I am trying to read an application server file using open dataset in Binary Mode.. While downloading using gui_download method the file is getting truncated because of its size. My questions are, How to increase the size of the internal ta
-
How do I rotate pages in a pdf
How do I rotate pages in a pdf with adobe reader?
-
Recently received msg to download update to iTunes. When I did got message file MSVCR80.dll was missing and update had failed. Now I can't even open iTunes. How do I get the file back
-
Unable to connect: incorrect log on parameters - In CMC / CR report
I have a CR report that connects to an AS400 and an Excel file. The Excel file is on a Network Drive, and I've made sure that the drive is mapped on my server that the Crystal Reports Server is on. I can sucessfully run this report on this same ser
-
What's with midi controller 23 in audio instruments?
If I record midi continous controller #23 to an audio instrument track it doesn't come up as a curve in hyperdraw. It comes up like a long straight line (at the top of the region) with dots and it can't be edited properly (the only possible values ar