Management Studio has any logging mechanism for user actions - ssms

Exists any possibility to instrument "Management Studio" to log all user actions that are performed? Eg. search, modify data ...

SSMS does not have this functionality.
I develop SSMSBoost add-in for Management Studio and have recently added this functionality.
Have a look here:
http://www.ssmsboost.com/Features/ssms-add-in-executed-sql-statements-logging-history
Additionally it can also keep history of SQL Editor window. It helps sometimes to restore lost work after unexpected shut-downs.

Related

SQL Server Profiler not available in Sql Server Management Studio tools

SQL Server Profiler is not available in Sql Server Management Studio tools for a few users.
They can run Profiler as a seperate application but can't find this app in SSMS. Do you know what can be a reason?
Considering that profile is deprecated, and has been for quite some time, wouldn't they be better off using Extended Events anyway?
Otherwise, I suspect they have (in error) removed it. You can readd the link in the Customize menu.
Right click the toolbar and select Customize:
Select the Commands Pane, and then change the Menu bar drop down to Tools. Then find the point you want to add the Command (by default above Database Engine Tuning Advisor) and then select "Add Command" and add SQL Server Profiler:

Database monitoring Scripts Automation

I am working in the configuration part of the application, so i am new to this data base side configuration.
Database Oracle,SQL,DB2
I need some clarifications on below Questions:
How to monitor the database changes.
How to Track the changes in the database with any specific tool or script
How to roll back the database if to any specific point of change (like we are doing in source control management).
How compare last two changes in UI or with help any other tools.
You should check IBM Data Studio. Of course you can track changes made by Data Studio itself. If you issue a DDL statement outside of the Data Studio, Data studio will not be aware of that.

cannot add members to tabular model roles using visual studio 2012

I've created a tabular model project in Visual Studio 2012 and everything seems to work properly until I go to use the Role Manager. I can create roles easily enough, but when I click the Add button on the members tab for a role - absolutely nothing happens. No dialog, no error, nothing.
I'm pretty disgusted by this, but I thought I would ask if anyone else has seen this behavior or knows a workaround.
I believe I've found a workaround for this. On two separate computers, installing the following SQL Server features resolved the issue:
"Client Tools Connectivity"
"Management Tools - Basic"
"Management Tools - Complete"

Standard template in SQL Server Management Studio

I am working on a team that have a number of developers working with SQL Server, developing stored procedures, functions etc.
I would like a consistent layout between the SQL, same header with a copyright etc. SO I need a standard template for the SQL. I know in Visual Studio it is possible to share templates.
How can I generate such a template for SQL Server Management Studio that I can share between developers?
This is how I do it:
the physical location of my template is in(Win7 SQL Server Management Studio 2012):
C:\Users\ys\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\Templates\Sql
I created my own folder in it (00_Mine)
Created a git repository
Asked other devs to pull from it.
In SQL Server Management Studio, press Ctrl-Alt-T or go to Menu, View, Template Explorer
It will list all the templates. However, from SSMS, there is no easy way to add templates to it by drag and drop, you can create new ones and put them into a folder, such as _WORK_.
The templates live physically in (for 2008 R2): C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql, so you can simply drop files and folders in there or push out to team members using group policy. The templates are sorted alphabetically, hence the suggestion for _WORK_ above. Note: A restart of SSMS is required to pick up Template Folder changes.
Here's an article: Using SQL Server Templates
Question to users of template functionality: do you think it will be helpful if you had a possibility to have placeholders for data like: Current database, Current User, Date/Time (something else ?), so, when you open the template these placeholders would be replaced by appropriate values. I develop an add-in and had this idea a time ago, but I do not know if someone really needs it.

Visual Studio Database Project and SQL Server Management

I enjoy using SQL Server Management Studio for change and updating my database. Its easier, faster, and safer than writing changes myself.
I was looking into using some sort of version control for databases and read about using a SQL Server Database Project in Visual Studio 2010.
I scripted out an existing database and imported it into a new SQL Server Database Project. Now, from what I can tell, there is no GUI to edit the database; I can't add columns, change datatypes, or edit existing data without scripting it myself. For instance, in SQL Server Management Studio I can right click on a table-name and select "Design" and then add/edit columns, change datatypes, etc from there.
While Visual Studio's Database Projects has some features SQL Management Studio does not have I don't think I can live without a "table designer".
Is there a table designer built into VS's Database Project I'm just not seeing?
No, there's no table designer.
If you're starting to think about version controlling your database, you ought also to be thinking about writing actual SQL to implement your database objects. That's the route that the Database Projects force you down. If you can't write the SQL for your database changes, how are you going to be able to review and appreciate a diff between how a table was 6 months ago, and how it currently is in your project?
I've been using VS2008 Database Projects for about 10 months now for our version control. Every now and then I do still use the table designer, it is a quick and easy tool. I believe the majority of your question centers around workflow as this is what I found to be the most challenging part about development in a version controlled environment. I would recommend continuing to design your objects in Management Studio or however you're comfortable and then do a create script and import that script into your Database project. There are some quirks when doing this, you'll need to always script the create statement even if you're performing an alter in your environment. As well you'll need to remove any USE statements for your database as the context in which you're importing your scripts will always be in the project you're importing to.
We have found that a successful workflow for us to facilitate code deployment is to have a production branch which is branched to a Main (development branch) and then to test. All new development is done in Main and merged by changeset to each other environment as required.
You can import your scripts from your development environment by right clicking in the solution and clicking import scripts. I recommend that you check all the options to overwrite objects that exist, import extended properties and import permissions.
After changing your DB schema using SSMS's GUI tool, you can use Database project's Schema Compare tool to update your project files (set the source to be your database and target to be your project). This way you can keep using GUI tool to manage the schema and the database project will manage the versioning.
There is no visual table designer in Visual Studio 2010 Database Project. But, concerning version control for databases, there is a workaround - you can use SQL Server Management Studio together with Red Gate's SQL Source Control. It costs some money but definitely is worth it.