Questions tagged [query]
196 questions
2
votes
1 answer
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: sAMAccountName & userPrincipleName. I've tried…

JLPH
- 71
- 2
- 8
2
votes
1 answer
OpenLDAP and range attributes
I am trying to query the "member" attribute of a groupOfNames object, and in AD, I can be sure to retrieve all of them, should they exceed the maximum of 1000 entries, by using ranged attribute queries. They look like this:
member;range=0-999
This…

Michael Böckling
- 309
- 3
- 15
2
votes
3 answers
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 one that I have found:
$strCategory =…

nate
- 417
- 5
- 8
- 17
2
votes
1 answer
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 the column means ? (is it sort of a sum ?)

Paul
- 714
- 2
- 6
- 19
2
votes
1 answer
SCCM 2007 query to select users belonging to listed AD groups
Can somebody advice me on WQL query to select all users from specified AD groups? I tried to do this through query builder but without success.
I'm going to use these selecter user to further select those of them who don't have some particular…

Mikhail
- 1,295
- 3
- 19
- 35
2
votes
1 answer
SCCM how to check installed software versions?
How can I write a query to find machines which installed office 2003 and office 2010 in SCCM version 4.00.6487.2000?
I don't have the collection for the PC anymore. It was deleted when we thought all PC's have Office 2010 installed.

Cocoa Dev
- 185
- 2
- 3
- 9
2
votes
2 answers
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 would be very time consuming doing this…

Jarred
- 41
- 1
- 4
2
votes
1 answer
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 it right?
But how can I get the timing stats I…

Fabio B.
- 299
- 2
- 6
- 17
2
votes
2 answers
How to create one update query (mysql) on multiple databases
I have several DBS on the same mysql server.
The DBS's structure and schema are exactly the same (only data is different)
the query on certain db works well like this (written in phpmyadmin)
UPDATE `mdl_modules` SET `visible`=0
WHERE `name` IN…

Miki A
- 23
- 1
- 3
2
votes
3 answers
Retrieve list of users/groups that have access to a network folder and its subfolders?
One of our users is requesting a list of the users and groups that have access to two folders on the network, as well as all of the subfolders of both of these folders. There are hundreds, if not thousands, of subfolders. Is there an automated way…

Citizen Chin
- 532
- 2
- 12
- 21
2
votes
1 answer
how to optimize postgresql81 for a hug query but not a complicated one?
i have a query which execution takes 15s on the server.
the server is bi-xeon 5130 (2GHz) with 2GB of RAM and 160GB of scsi hardrive in RAID.
Database is PostgreSQL 8.1 on Debian 4 etch.
This query is executed by an ERP (openerp), so i can't change…

Michael REMY
- 21
- 1
2
votes
2 answers
MySQL query times for tuning are different every time
I am tuning SQL query time for my slow query but every time I get different times so I can't evaluate my optimize solution.
For example, I run query select * from abc where abc.status in (x,y,z) and abc.scale>123; three times, and I get result time…

Yadun
- 39
- 1
- 3
2
votes
1 answer
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
- 327
- 4
- 15
- 32
2
votes
4 answers
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 structure as fellow:
create table t (
record…
user55708
2
votes
1 answer
SQL server Intergration services 2008 sub queries
I am looking for a way to execute sub queries from within a main query that I execute in my SSIS package.
So When I execute the package, I want to be able to execute the sub query after everyline that is produced by the main query and pass the data…