Questions tagged [ssms-2012]

Microsoft SQL Server Management Studio 2012

Microsoft SQL Server Management Studio (SSMS) 2012 is an easy-to-use graphical management tool for managing SQL Server 2012 Edition with Advanced Services.

The tool includes both script editors and graphical tools which work with objects and features of the server.

258 questions
3
votes
7 answers

SELECT * FROM Linked MySQL server

I have a SQL Server 2012.(120.120.55.15) Today I linked MySQL server(120.120.55.30) to my SQLServer and gave it a name "MYSQL". In Object Explorer everything seems fine. I can see MySQL server's database "exampleDataBase" and tables in it. But…
Almazini
  • 1,825
  • 4
  • 25
  • 48
3
votes
3 answers

SSMS 2012 Addin - ObjectExplorerService not available in SSMSAddinDenali

This question is in reference to the SSMSAddinDenali SQL Server Management Studio 2012 Addin found here http://ssmsaddin2012.codeplex.com/SourceControl/changeset/view/19629#101185. I cannot implement IObjectExplorerService using .Net 4.0/4.5 while…
user975249
3
votes
3 answers

SQL Server: stored procedure saves with errors

I am using SQL Server 2008 and SSMS 2012. I have a stored procedure that references a table that does not exist. The editor displays red underlines on the offending table to indicate that something is wrong. However when I execute the query, I get…
mtmurdock
  • 12,756
  • 21
  • 65
  • 108
2
votes
1 answer

SSMS: How to return only the value in the last row for each month/year instead of every row?

The code I'm working from returns all dates within the month/year but I only want it to return the last date row instead of all daily rows. Here is the code I'm working from. ;WITH OIL_INDEX AS ( SELECT PRODUCT_SYMBOL ,CONTRACT_MONTH …
gwhb
  • 77
  • 6
2
votes
1 answer

Sum all the previous work experiences (into months) where rows are dynamic (1 row for 1 experience) and different for each employee

I have a table which stores work experience history of employees where each experience is stored as 1 row. TblWorkExp : -------------------------------------------------- ID | ExperienceID | From_Date | To_Date …
2
votes
1 answer

Change destination folder in SQL Server Database backup plan

I've already created a backup plan in SQL Server 2012 using their Maintenance Plan Wizard. This plans runs every midnight and stores the backups at the default location C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup . But,…
nam
  • 21,967
  • 37
  • 158
  • 332
2
votes
1 answer

In SQL Server Management Studio, how do I set up the keyboard shortcuts so that ctrl+w closes an XML window?

In SQL Server Management Studio, how do I set up the keyboard shortcuts so that ctrl+w closes an XML window? I know how to do this for a regular query window. Here's how. But some of my tables have XML columns, and when I click on an XML value, it…
user2023861
  • 8,030
  • 9
  • 57
  • 86
2
votes
1 answer

Grantor does not have GRANT permission

I have a gitlab user and a role assigned to it, now the gitlab user needs extra grant permissions. I am executing the following sentence. [ssms 2012] GRANT VIEW SERVER STATE to xxx; ERROR: Grantor does not have GRANT permission What is the…
user6826691
  • 1,813
  • 9
  • 37
  • 74
2
votes
2 answers

Conversion failure varchar to int on a column cast as int

I've created a view called vReceivedEmail which includes a varchar column called RowPrimaryKeyValue. This column usually stores primary key id values, such as 567781, but every now and then has the descriptive text 'Ad hoc message'. I've set the…
Matt Hall
  • 2,412
  • 7
  • 38
  • 62
2
votes
2 answers

How do I turn a single column table into multiple columns based solely on row number?

So, I have this data that exists in a single column. Odd rows are ID, even rows are city. Is there a way to split this into two columns? DECLARE @Data TABLE ( DataRow NVARCHAR(50) ) INSERT INTO @Data VALUES …
DaveX
  • 745
  • 6
  • 16
2
votes
1 answer

Simple way to join many tables with similar names in SSMS?

I have many tables that are all named similarly (like "table1" "table2" "table3" etc.) and I need to use all of them in a query. They all contain the same two variables ("ID" and "date") that they are joined on. There are at least 25 tables of this…
MsTiggy
  • 179
  • 1
  • 10
2
votes
1 answer

Index GUI Issues with SSMS 2014 and 2016 when working with SQL Server 2005

We currently work with all versions of SQL Server from 2005 onwards. To save time I try to do everything in a single version of Management Studio. This also helps if running newer client operating systems like Windows 10 which old client tools…
Paul Andrew
  • 3,233
  • 2
  • 17
  • 37
2
votes
0 answers

When using SSMS Solution Explorer, Is it possible to drag-and-drop a file from the Miscellaneous Folder to a Project Folder as a linked file?

See attached image. I am using SQL Server Management Studio 2012. I want to be able to drag-and-drop SQLQuery2.sql from the Miscellaneous Folder to "My Project"->"Queries" Folder without physically placing the file in the "My Project" file…
bezmachine
  • 151
  • 1
  • 5
2
votes
1 answer

Linked server reference "Invalid Column Name"

In SSMS 2012, I have created a linked server in SERVERA to SERVERB from which I have successfully written queries to multiple tables within the DBB database using a four part reference. When I try to reference the 'Charge' table in the 'DBB'…
Will_C
  • 108
  • 5
2
votes
0 answers

SSMS macro to remove []

When SSMS creates a query for a table, all object names have [] around them. They are useful in some rare situations, but names I use for my objects never need them. Then I always need to use replace to remove one and then the other. Is there a way…
Hikari
  • 3,797
  • 12
  • 47
  • 77