In one of my application Iam using SQL SERVER 2008, I like to implement audit tables for few tables. One option I have to create triggers on the respective tables. Can anyone suggest me any other good, robust and secure option.
SQL Server 2008 has a new auditing feature: Auditing in SQL Server 2008.
There is also Change Data Capture
Triggers are the usual way to go. Another option could be to handle this in your stored procedures. Of course this assumes, that all data modification goes via stored procedure. Since you are on SQL Server 2008 and assuming you don't care about any lower version, check out the new auditing features here: http://msdn.microsoft.com/en-us/library/dd392015.aspx
You don't mentione which edition of SQL Server you are using as the Auditing features are only available in the Enterprise edition.
You should download a copy of the free eBook Developing Time-Oriented Database Applications in SQL by Richard T. Snodgrass from here: http://www.cs.arizona.edu/people/rts/tdbbook.pdf.
He talks about auditing and many other time related issues in databases.
Related
I have a problem for create a SQL job, in my local machine I have just .\SQLExpress, but my site stay in a Shared Host, and in this SQL instance I don't see the SQL Agent for create a SQL Job.
Who I do creating a job?
The jobs can actually be scripted in.
Here's an article that might be useful http://www.mssqltips.com/sqlservertip/2161/sql-server-agent-job-management-scripts/
I believe another solution could be to reverse engineer an existing job created through Management Studio by using the IDE to script it out for you. I know you only have SQL Express, so that might not be feasible :-)
SQL Express does not include the SQL Agent. Sorry.
When I provision a scope for synchronization in an SQL 2008 database like this:
SqlSyncScopeProvisioning sqlServerProv = new SqlSyncScopeProvisioning(sqlServerConn, myScope);
if (!sqlServerProv.ScopeExists(scopeName))
{
sqlServerProv.Apply(); // Apply the scope provisioning.
}
i see a bunch of change tracking tables, stored procedures and triggers created.
Why is this not using the "Change Tracking" feature of SQL 2008, which is much cleaner and everything gets tracked behind the scenes?
I thought that the "Change Tracking" feature of SQL 2008 was designed precisely to simplify these scenarios.
Now turning the question around: Is there a way to do a 2-way synchronization between two SQL Server 2008 databases just using Change Tracking in both of them instead of provisioning the triggers/auxiliary tables ?
See Syncing SQL Server 2008 Databases over HTTP using WCF & Sync Framework
Is there any way we can share the SQL Server 2008 database Diagram (Other then capturing the jpeg).
I've used the 2005 version of this tool which did the job very nicely.
EDIT: The original link is dead. However http://devnuggets.blogspot.com/2011/04/script-diagram-really.html seems to be the same person's code for scripting/moving diagrams.
The SQL Server 2008 diagrams are stored in a sysdiagram table in the same database as a binary value.
We can copy the binary data and then reinsert them at another databse to recreate them there. But the table structure of the database needs to be there as well. So in this case it is of no important use for sharing.
this is a quick question:
I have this Database Project in a Web app solution with the real database. I want to update the database using SQL server managment studio, and then update the corresponding VS project.
This can be done?
I know that you can update the scripts in the project, but I'm not the SQL kind of guy, i rather do this changes using Mangment studio...
Thanks in advance
Update: Okay, the point is that I want to make changes (if I have to) on the database, using Sql Server Managment studio, and then update the scripts in the Visual Studio DataBase Project, instead of make my updates on those scripts, because I don't feel confortable writing SQL commands. Now what I do is to recreate everytime the Database Project (delete and then create again), this is what I want to avoid
Also, I have Visual Studio 2010 Professional.
It is very achievable in VS2010 Premium and I am currently doing what you describe with a Database Project and a Schema Comparison item.
Sigd is not correct in saying you can only compare Database/Project Compare, you can also compare Project / Database and Database / Database
You can achieve this using the Schema Compare feature, but this is only available with the Premium or Ultimate editions of Visual Studio, not the Professional edition.
In many cases this is possible using Red Gate SQL Compare Pro, although I should warn you that this is not a fully supported scenario just yet (I'm the product manager for this tool so I'd welcome your feedback if you go this route!).
Red Gate's SQL Source Control better fulfills your suggested way of working, although this won't help you just yet as we don't tie into VS Database Projects. Again, this is something we are considering for an upcoming release. You're welcome to try it and let us know what you think.
http://www.red-gate.com/products/SQL_Source_Control/index.htm
If only the Schema Compare tool did what it's name suggests.
Unfortunately it is a "Database/Project Compare". So my project which includes only a single schema, when compared with the database, generates loads of Create actions for all the other schema objects present in the database.
Nice idea, needs work.
I have lot of data in MS Access, and for analysis I need tools. Might you suggest any tools for data mining and analysis (OLAP)?
Support for Access (and other various non-SQL Server data sources) will be included in the upcoming SQL Server 2008 R2 release (this release is focusing on self-service BI). You can follow how the project is progressing at http://blogs.msdn.com/gemini.
It depends on your data volumes the the complexity of the relationships that you want to investigate:
(1) Moderate volumes with low complexity relationships - use queries, pivot's graphs and reports in ms-access.
(2) High volume and or high complexity relationships - consider up sizing to SQL server and using the more grown-up data cubes (OLAP), stored procedures etc.
A possible solution can be Excel 2010 using the new Power Pivot Add-on.
It really depend on the type of analisys needed.
Federico
I guess your best bet would be to import your data into SQL Server using SQL Server Integration Services - should be pretty straightforward and painless.
Once in SQL Server, you have the Analysis Services at your disposal which give you all these capabilities for OLAP analysis.
I don't think there's much for MS Access directly.
Marc
If it is not too much data, import it into Excel and use the privot table functionality.
If it is too much for that then SQL Server is the way to go.
An alternative OLAP solution is to use icCube to connect directly to your MS Access file.