Monday, September 16, 2013

[SQL 2012] SQL Alerts and WMI

[SQL 2012] SQL Alerts and WMI


SQL Alerts and WMI

Posted: 15 Sep 2013 06:22 PM PDT

I'm trying to create an alert disk % free space left using:SELECT * from __InstanceModificationEvent WITHIN 30 WHERE TargetInstance ISA 'Win32_LogicalDisk' AND --this line of code((TargetInstance.freespace\TargetInstance.size) *100) < 10 --AND TargetInstance.DeviceID = 'Y:' but this line of code above seems to be an issue?I've used the .freespace property without an issue but the calculation seems to throw an error.Has anyone done this successfully?

Splitting row into 2 rows

Posted: 16 Sep 2013 12:12 AM PDT

Hi, I have a table witht he following structure.EmpNo DutyId StartDate EndDate-------------------------------------------------101 01 2013-08-31 22:00:00 2013-09-01 06:00:00The employee duty spanned between 2 months.I want to split this into individual days and number of hours for each day.For example, 101 01 2013-08-31 2 Hrs 101 01 2013-09-01 6 HrsHow can I do this in single query?

Exposing ERP data on a public web/ecommerce site - from the SQL point of view

Posted: 15 Sep 2013 01:49 PM PDT

My company wants a new internet presence consistent with the possibilities provided by current technology.This means a website that provides e-commerce functionality - the ability for customers browse product catalogues, place orders, view order histories, invoices, etc - as well as providing some reporting functionality - a mix of operational and analytical - specifically for larger customers. Now, the company I work for is reasonably large, we're not talking about a basic computer parts store here. Annual revenue is about 1.2 billion.As such there are some serious architectural decisions to be made for this project. From the data point of view, the point of view of SQL Server, perhaps the most fundamental question is this: should the public website communicate directly (in real time) with the ERP system in terms of both presensting information to customers as well as the entry of orders back into the system, or should the public website communicate with its own bespoke database which is synchronized with the ERP via managed processes?Right now, looking from a SQL point of view, I fall pretty firmly into the latter camp. Giving the system its own database...- you can index appropriately for what could be an entirely different load pattern- you can guarantee the security of information that should not be exposed since there is no channel from the outside world to the internal system. - It keeps business users from interfering with website functionality and vice versa (locking, transactions, etc) - it allows the creation of a data model suited specifically to the website rather than being stuck with the one provided by the ERP- etc etcIn general, it gives you all of the advantages that come from a separation of concerns. As a guy who strongly believes in the value of theory and principles, this approach sits well with me.The difficulty, of course, is the pratical need to come up with a robust, timely synchronization process.Does anyone have an opinion on this matter, and could you provide the reasons you have for holding that position? What about technologies used in the bespoke database solution... replication? ETL? ESB?

No comments:

Post a Comment

Search This Blog