Is there a way to monitor the round-trips to the database in an NHibernate application?
I need just a log to see when NHibernate connects to database.
Have a look at NHibernate Profiler (NHProf) if you don't mind a commercial product. Some of its features are:
Visual insight into the interaction between your database and application code.
Analysis and detection of common pitfalls when using NHibernate.
Analysis is delivered via perfectly styled SQL and linkable code execution.
Supports NHibernate (.NET) and Hibernate (Java).
You can 'monitor' via logging using NH's log4net. Some useful info here.
That will be monitor from the application side.
Have you tried monitoring from the DB serverside? E.g. enable logging at the say mySql.
In addition to NHProf and log4net, there is also a "show_sql" config entry that will dump the SQL to the console in a console app.
Your database vendor should also have tools for monitoring the SQL that is being run against it.
Related
I am not sure if this is the right place to post this.
I am writing a PHP and ZF2 based website that needs to be scalable. So, I am looking into Database based sessions. I understand ZF2 supports DB Session management, so I can create a MySQL DB, and use it. But DB session management could be slow. So, I have looked into redis as a cache management solution.
My question is will using redis as a standalone server work for both server side session management and a cache solution (as it seems to have it's own in memory DB) or do I need to combine it with ZF2 DB Session management?
I have developed my web-application using spring-boot and spring-data-jpa and and in-memory database, and I have a couple questions:
how can i now switch to a persistent, let's say, MySQL database? What do I have to change in my configuration?
Can spring-boot set a database up for me with a specific port and where does it get stored in my file system?
Does IntelliJ provide a datasource browser for the created database?
I am sure this must be covered somewhere in the endless jungle of spring-boot documentation.
You can change the application properties for the datasource according to the link Gabor Bakos already provided.
That depends on the type of the database you want to use. HSQLDB and H2 allow you to specify a file path for the database file, however the database instance itself is still running within your application process. With full RMDBS like MySQL you have to install and configure the MySQL server yourself and provide the connection data to your Spring Boot application.
Yes, IntelliJ has a datasource browser for all major databases (maybe you have to download the database driver).
There is a offline WPF client and WCF server.
Client use SQL-CE or localDB - EF-Code first
For example, for the following scenario - Administrator can edit the common information and to add jobs to Users, and the user can see the lobules added him the job, and synchronize changes made when a connection.
Prompt the best way to synchronize reference data.
Looking toward the "microsoft sync framework" - but it seems that then have to implement your own provider. Maybe there's an easier way?
SQL CE and LocalDB are both supported out of the box in Sync Framework. you can use the same SqlSyncProvider against the LocalDb
no need to write custom sync providers.
A developer on my current project has used Microsoft.SqlServer.Management.Smo within the code of our development to build tables programmatically.
To me this seems like a bad idea.
Is it?
I thing being or not being a bad idea for that matter depends on the environment under which the application will be run or deployed or what the application is required to do.
SMO makes it easy to perform database administration operations in .NET code. While all of those admin tasks can be performed with T-SQL directly on a database or through the SQL Server Management Studio, being able to use SMO offers broad flexibility to include these types of operations in .NET applications.
In fact, SQL Server Management Studio relies on SMO for most of its management tasks.
I did find an article demonstrating what can be done with SMO here http://msdn.microsoft.com/en-us/magazine/cc163409.aspx
So I am currently doing some research for creating iPhone and Mac applications for my company and perhaphs other small businesses. I have found god knows loads and loads of books on cocoa and iOS development, but on the side of SQL server things get a little more shady. I have seen all kinds of products online who claim to be the best SQL driver and to be the simplest and performance enhanced way of adding a relational database to your cocoa app. I have currently been and still create desktop applications under windows and we extensively use our databases for almost all applications and reports we build. We have iPads and iPhone all around our company and I could really bring some innovative apps to our table if we could have some of our workflows or reports on the iPhone or iPad. I cannot seem to find a viable SQL driver like using visual studio under widows. Is there a obvious solution that I have missed or do developers just not deal with enterprise projects with relational databases? We as a company have the capabilities to create what ever web or server needed to get such a project underway but before I do I want to make sure I can work with our existing database as I could with visual studio, any ideas or suggestions are welcomed.
I guess this is one of reasons why is there sooo little enterprise-class software on Macs... As a first candidate I would consider FreeTDS to access SQL Servers. It has headers and libraries that can be linked in XCode as far as I know.
As you mentioned in your post and comments, you do have great design in your mind. For having an application to compatible with any mobile device, the best application design would be to have your application running on as cloud service connected to specific cloud DB while application is talking to it over any exposed interface.
With Windows Azure your application can run as Cloud Service while using SQL database. In your cloud service you can have WCF endpoint exposed which can serve connection to your SQL Database and provide specific data you are looking for. This way your cloud application will be able to serve any mobile device as long as you can make connection to secure WCF endpoint and get back the data. In WCF you not only get XML data, you can pass much more complex results and process in the device as if needed.