Questions tagged [query]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
46 votes
4 answers
65k views

How do I remove a specific bad plan from the SQL Server query cache?

We have one particular SQL Server 2008 query (not a stored proc, but the same SQL string -- executes every 5 minutes) that intermittently caches a very bad query plan. This query normally runs in a ...
Jeff Atwood's user avatar
  • 13.2k
44 votes
3 answers
63k views

Why multiple PTR records in DNS is not recommended?

I often read that using multiple PTR records in a DNS configuration is not recommended. However, the reasons are often vague, or not so obvious, naming: "it can cause problems", "can ...
Totor's user avatar
  • 2,966
28 votes
3 answers
59k views

AWS CLI Command Line: How to use "--query" to output multiple source lines

I am using aws-cli version 1.7.8 to get the --query output to create one record that is derived from multiple lines. In this case I am trying to get specific information from describe-instances. In ...
Chris Charles's user avatar
27 votes
18 answers
78k views

Are there any good and lightweight LDAP querying tools? [closed]

As developers we sometimes need querying LDAP. Do you know useful tools for this task? edit: I don't mean in code, I mean utility/tool (command-line or gui, mostly gui) for just to look/confirm data, ...
spinodal's user avatar
  • 373
20 votes
11 answers
159k views

Command line active directory query email address for username

On Windows XP in an Active directory environment - what is the easiest way for me to query a user's email address from AD given their username on the command line. (Assuming I know where it is kept ...
Hawkeye's user avatar
  • 2,709
19 votes
5 answers
57k views

How to automatically kill slow MySQL queries after N seconds?

I am looking for a well tested bash script (or alternative solution) to do so, in order to avoid max_connection to be exhausted. I know that it is fighting the symptoms, but really need such script as ...
alfish's user avatar
  • 3,137
13 votes
3 answers
70k views

bind would not work unless allow-query is "any"

I have this in /etc/named.conf, I commented the default values and set my own under it. My domain would not load in browser unless I set allow-query to "any", is this OK, what should I edit? If is ...
adrianTNT's user avatar
  • 1,139
12 votes
4 answers
48k views

DNS searching with wildcards?

Anything like nslookup or dig offer the ability to search based on something contained in the name ... like a wildcard search or something? I'm trying to make a little script with a GUI wrapper for ...
TryTryAgain's user avatar
  • 1,152
10 votes
1 answer
159k views

How to use WMIC to connect to remote machine and output OS information to a file?

I want to know how to use WMIC to connect to remote host and output their PC's OS information(Installed programs list) to a file. I tried wmic /node: <IP address> OS get vendor, name > c:\...
PYO's user avatar
  • 111
10 votes
4 answers
44k views

Why are my MongoDB queries really, really slow?

I've inherited a large MongoDB server at work, and have been tasked with figuring out why queries run against it are so slow. The DB contains tons and tons of records (on the order of 10^9) and takes ...
Mark LeMoine's user avatar
7 votes
1 answer
29k views

openldap sizelimit. Can't receive more than 500 entries

I can't receive more than 500 entries, when I query my openldap-server. Although I made the following changes: slapd.conf # This is the main slapd configuration file. See slapd.conf(5) for more ...
JMAD2016's user avatar
7 votes
1 answer
692 views

BIND - increase in outgoing NS queries after upgrade to CentOS 6.7?

After upgrading BIND to 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6_7.2 in a few caching nameservers I've noticed it's doing lots of outgoing NS queries, without changes to incoming traffic volume or patterns. ...
André Fernandes's user avatar
6 votes
1 answer
7k views

PostgreSQL raw query vs "Function returns TABLE" - insane difference in performance. Why?

I work with the PostgreSQL and it is used for reporting. The way it is configured currently is as follows: There is a complex query which returns report data, like this: select Column1 as Name1, ...
Evgeny's user avatar
  • 213
6 votes
2 answers
7k views

best practice for fixing mysql slow query log error 13

CentOS 5.5 MySQL 5.5 installed via a yum repository [ERROR] Could not use /var/log/mysqld.slow.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To ...
comb's user avatar
  • 143
5 votes
1 answer
8k views

MySQL slow query log logging all queries

We have a MySQL 5.1.52 Percona Server 11.6 instance that suddenly started logging every single query to the slow query log. The long_query_time configuration is set to 1, yet, suddenly we're seeing ...
Blanka's user avatar
  • 155
5 votes
3 answers
30k views

Event Log > Filter Current Log > XML > where EventData contains text

I'm trying to search through the windows event log for anything where the event data contains the string TCP Provider, error: 0 as part of a longer error message. To do this I created the code below: ...
JohnLBevan's user avatar
  • 1,278
5 votes
2 answers
890 views

Effects of internet connection speeds on server queries

Can my internet connection significantly effect queries run on phpmyadmin? I am currently 18 down and 30 up. I switched internet connections today and noticed a deep drop in query performance. The ...
SephMerah's user avatar
  • 159
4 votes
3 answers
7k views

Importing a large SQL script into SQL Server?

I'm trying to move a database from our production server to our test server. I've used Microsoft's Database Publishing Wizard to create a script containing the schema and data for the production ...
James McMahon's user avatar
4 votes
1 answer
1k views

How to make BIND behave differently depending on query source?

How would one make BIND behave differently depending on the source IP address? For example, I want to use different forwarding DNS servers for different people on my network.
Richard Hum's user avatar
4 votes
5 answers
24k views

Query DNS for multiple domains at once

I have recently moved servers and want to query all of the accounts domains on the new server to check that they are all resolving to the correct NS. I am currently using http://www.whatsmydns.net/#...
Solace's user avatar
  • 41
4 votes
2 answers
2k views

What is the most efficient way to add a lot of data to a mysql database?

I have a batch of data that needs to be added to a mysql database every day consisting of about 100K queries. START TRANSACTION; INSERT IGNORE INTO info (Created, Modified, MType, Pform, Name, ...
Daniel's user avatar
  • 43
4 votes
2 answers
5k views

Estimating MySQL Query Runtime

I ran a MySQL query from command line using the following: nohup mysql --user=root --password=XXXXXXXXX database < report.sql > results.tab This query is extensive (5000 lines) and running a ...
reefine's user avatar
  • 239
4 votes
1 answer
5k views

SCCM query for cluster (virtual) name

I'm trying to determine if the cluster name is stored in SCCM audit data. I see the host name in [v_R_System], and I'm able to identify cluster nodes here. What I need is the virtual name for the ...
Eric Higgins's user avatar
4 votes
1 answer
1k views

SQL Azure insert query ten times slower on V12 than V11?

I noticed performance degradation about two weeks ago impacting one of our applications with an SQL Azure backend. It's running on V12 on tier S1 90% of the time, sometimes scaling to S2, S3 or P1. ...
enter.net's user avatar
3 votes
3 answers
5k views

Can IP tables allow specific DNS queries based on domain name?

I have iptables blocking all UDP traffic at the moment, however I want to allow only certain DNS queries to get through. Let's use google.com as an example. I am trying to use string matching to ...
Jarred Kenny's user avatar
3 votes
1 answer
6k views

Update InfluxDB measurement names

Is there a way to update existing measurement names in an InfluxDB? When my system was originally set up we used measurement names like "CheckCPU" or "CheckLOAD" and have changed to all lower case ...
Jason P's user avatar
  • 33
3 votes
2 answers
5k views

how solve Recursive Queries error in intodns web site?

Please see the below link : intoDNS Web Site How can I solve Recursive Queries error! the entire error is below : Recursive Queries I could use the nameservers listed below to performe ...
SilverLight's user avatar
3 votes
2 answers
7k views

Zabbix - Populate Item with SQL Server Query

I'm trying to track a process that locks up regularly. It's a funky program that we have no control over. I'm trying to find a good way to track when the program stops responding. I have a query ...
WernerCD's user avatar
  • 344
3 votes
1 answer
6k views

how do I list Distribution Group (List) and their members inside of an OU using AD or exchange 2010

our entire domain has thousands of distribution groups, while i can use the script referenced here: How to get a list of all Distribution Lists and their Members in Exchange 2007? to pull all ...
wraak's user avatar
  • 33
3 votes
1 answer
384 views

Active Directory lookups from bound Mac without user credentials

One of my Mac boot scripts needs to grab a property from AD that is not one of the ones I can see with the built in tool called dscl, which is pretty much limited to Users, Groups, and Computer ...
Geordie Korper's user avatar
3 votes
1 answer
188 views

Should I be suspicious of this querystring?

I noticed in my application event log some errors: Exception message: A potentially dangerous Request.QueryString value was detected from the client (term="DT&#304;NST32") Request URL: http://...
Brian's user avatar
  • 303
3 votes
1 answer
7k views

Handler_read_rnd is too high (more than 2GB)

I am running an advertising program and there are some SELECT, UPDATE and DELETE queries when showing ads. Sometimes, displaying ads is fast but sometimes it is too slow. At this time, it is slow and ...
Prasad N's user avatar
  • 145
3 votes
2 answers
966 views

MySQL - Select queries 10x slower on Azure VM vs on-prem VM

We have been working on a project to migrate a MySQL database from an on-premise Linux server to a Windows VM on Azure (IaaS). (There's a specific reason because of which we have gone with the IaaS ...
Sridharan Srinivasan's user avatar
3 votes
1 answer
891 views

Expensive LDAP queries from Workstations

Troubleshooting high LSASS process on a DC found expensive queries originating from a few workstations. Each query is as follows: Visited Entries: 1Million+ Returned Entries: <50 (most of the ...
Darktux's user avatar
  • 827
2 votes
3 answers
61k views

How To List All Computers Operating System On A Network In Powershell

I am looking for a script to show all the machines, hostnames, and OS versions on my domain. I have found a few scripts, but none of the scripts that I have found will do both. Here is an example of ...
nate's user avatar
  • 417
2 votes
3 answers
2k views

Block any query in BIND

I've been trying to block ANY queries in my BIND server with no success. I followed this post Block ANY request in Bind which says that I can use minimal-responses but it doesn't work. None of the ...
Sabri MJAHED's user avatar
2 votes
3 answers
749 views

How to filter a LDAP query for users which are authenticated? [closed]

I want to check if a user is authenticated right now for my Windows domain. For that I want to use an LDAP query. I learned that there is a group "Authenticated Users" (S-1-5-11) which might do the ...
avh's user avatar
  • 41
2 votes
1 answer
9k views

Search AD for empty sAMAccountName & userPrincipalName

I'm in the process of implementing a User privilege management solution and it needs to audit all users within our AD. It's currently falling over due to an account which has two blank attributes: ...
JLPH's user avatar
  • 81
2 votes
1 answer
9k views

How do I query members of an Exchange distribution group using LDAP filter syntax?

I'm trying to use a couple of Exchange distribution lists for access to an application (the list, due to the culture at this particular enterprise, is kept more up to date with people moving in and ...
Mikey T.K.'s user avatar
  • 1,417
2 votes
1 answer
2k views

SCCM Collection Query- FullName

I found this page about using usernames to build a sccm collection query. http://jengeek.blogspot.com/2014/07/creating-sccm-collection-from-list-of.html?m=1 This works great! However, the list I ...
Benjamin Jones's user avatar
2 votes
2 answers
5k views

SQL query to Automatically Export to file and FTP?

I am wondering if there is such a way to automatically run SQL queries and export to file (example: csv file) and then FTP to desired location? It seems simple and would need something like this as it ...
Jarred's user avatar
  • 41
2 votes
1 answer
3k views

Measure query execution time in bash

I need to measure a query total execution time from inside a bash script. Somebody told me to submit something like: mysql --user="someuser" --password="pw" -D "dbname" -e 'your-sql-command;' Is ...
Fabio B.'s user avatar
  • 299
2 votes
1 answer
20k views

SCCM 2007 Query for installed software versions

How can I write a query to find machines which installed office 2003 with Sp3 in SCCM 2007? Thanks,
Cell-o's user avatar
  • 325
2 votes
4 answers
1k views

why this statement in oracle perform much slower then ms sql

I tried to run a simple test to see how the speed fair between oracle and Ms Sql as follow: populate two tables with 2 million records, cross join them, filter by a range, and do a sum. Both table ...
user avatar
2 votes
2 answers
673 views

A more useful MySQL Query log that's suitable for tail -f'ing

In order to debug a webapp and mysql queries, I've enabled the mysql query log. However it's not a very good format to tail and grep through. Ideally I'd like to be able to only show queries from a ...
Amandasaurus's user avatar
  • 31.9k
2 votes
1 answer
139 views

pl/sql Oracle syntax

I have a query in pl/sql that i need to migrate to ms sql. select count(*) from table1 t1 where (conditions1) and (conditions2) and variable = t1.column1(+) Could anyone tell me what the (+) after ...
Paul's user avatar
  • 714
2 votes
1 answer
2k views

json_query help - not producing expected output

I am trying to build an array to use for with_nested, but I cannot get past why json_query isn't outputting the actual hosts assigned to each cluster: Play: - name: Index clusters.json shell: cat {{ ...
BrillCom's user avatar
  • 139
2 votes
1 answer
2k views

Nginx, rewrite get query

I would like to rewrite an url from /shop/?category=kitset-kitchens to shop/category/kitset-kitchens What I tried: rewrite ^/shop.*$ /shop/category/$arg_category permanent; goes to: shop/category/...
Nikita's user avatar
  • 123
2 votes
2 answers
180 views

Suggested indexes

I am new to indexing in general and have just started learning about query plans etc. I am working on this one specific query that keeps advising me to create the following index: CREATE NONCLUSTERED ...
Owain Esau's user avatar
2 votes
1 answer
4k views

filtering event logs with specific TIME range of ANY day

How can I query windows server events between two times of any day? I have tried with PowerShell... Get-EventLog -Logname xxxx -After 04:00:00 -Before 04:00:30 ...but just returns today's events
jreinap's user avatar
  • 23