SQL Query for SMS
Posted on 2008-10-27
I want to run a report in SMS to display PC Name, model, processor, memory, and service tag from Dell. I found the following SQL query, but it errors out;
SELECT DISTINCT Computer_System_DATA.Name0 'Computer Name',
PC_BIOS_DATA.serialNumber00 'Serial Number',
LEFT OUTER JOIN processor_data ON Computer_System_DATA.machineID = processor_data.MachineID
LEFT OUTER JOIN PC_BIOS_DATA ON Computer_System_DATA.machineID = PC_BIOS_DATA.MachineID
LEFT OUTER JOIN PC_Memory_DATA ON Computer_System_DATA.machineID = PC_MEMORY_DATA.MachineID
The error I get after running the report is;
The SELECT permission was denied on the object 'PC_Memory_DATA', database 'ServerName', schema 'dbo'.
Error Number: -2147217911
Source: Microsoft OLE DB Provider for SQL Server
Native Error: 229
I know nothing about SQL, so baby talk would be great. Also, that query shows Manufacturer and I don't need that and would rather have Username info, so any tips for changing that and fixing error would be appreciated, thanks.