Tag: ssms

How to optimize a cycle in stored procedure

I have this stored procedure in T-SQL for splitting a DATETIME into shifts. I would divide the DATETIME START and DATETIME END into shifts (for example, one shift for hours or one shift every 15 minutes). I should this shift into a temporary table for use it in another query. So for this I have […]

selecting the single largest/smallest/first/latest row from a table where dates/amounts are not unique

Afternoon all, I’m trying to pull together a query that will return financial overview information about our customers.I have a financial_history table of about 10m rows that contains details of every transaction and I want to see each customers first, last and largest transactions.The tricky bit (and, yes, this is in part a data quality […]

Deadlock Graph not showing statements

I am investigating deadlocks on a SQL-server 2008 (10.0.2531). When I catch a deadlock graph the statement tool tip is always empty. When I export the graph to an xdl-file I see the statements displayed there. If I open the xdl in SSMS 2008/2012/2014 the statement text is still not shown. Is there a workaround […]

Update value while inserting in a table using select statement

I am inserting values in a temporary table using select statements which calls a TVF each i.e Insert into #Temp(Rownumber, Percentage) select * from dbo.MatchFirstName(@FirstName) Insert into #Temp(Rownumber, Percentage) select * from dbo.MatchLastName(@LastName) In FunctionWeights Table, I have weights column and FunctionName column that stores different function names. dbo.MatchFirstName(@FirstName) and dbo.MatchLastName(@lasname) are the TVFs here. […]

SQL Server Management Studio cannot 'see' other network SQL servers

I have a test environment for SQL Server 2012 set up on Windows Server 2008 r2 as described in the 70-462 Guide. All the VMs reside in a Hyper V private network and can ping each other. The DC and SQL servers can all ping the other machines (the SQL Core installation gave me a […]

The specified condition is not a valid Transact-SQL expression

I’m attempting to set a conditional breakpoint in Microsoft SQL Server 2012. The condition is simple: @RCICID IS NOT NULL. I’m pretty certain this is a valid expression. I’ve also tried @RCICID != ”, which has the same result: How could I possibly make the condition more valid? Is there some other possible explanation for […]

SSMS Results Grid

We are creating an WPF Query builder application that reads data from SQL Server. We will be reading millions of rows sometimes. I am very impressed with the Results grid of SSMS or Visual Studio’s SQL Server Object explorer’s query window. How do I get same kind of performance that SSMS to render the results. […]

Install SSMS for power-users of business data? Why not?

Question: As a DBA/BI Developer, should we install SSMS on the PCs of power-users of business data? What are the risks with this approach? Context: I love SSMS. It’s ergonomically designed and enables not just the exploration and management of the SQL Server, but also the data within it (e.g. select/edit rows) Our business users […]

What did I still miss for remote connect to a SQL server 2012?

I installed SQL Server 2012 and Management Studio on a Windows Server 2008. I created database & table successfully using Management Studio. Then, I created a .udl file locally to test database connectivity and it works. The server is <My server>/SQLEXPRESS and authentication type is Windows authentication. I used the .udl file to see database […]

SSMS 2008 Object Explorer 'Refresh' not working

Using SQL Server 2008 R2 Management Studio, when I make a change to a database object, then click ‘Refresh’ in Object Explorer, the items in Object Explorer are not updated. For example, if I right-click a table and select ‘Design’, then remove a column from the table, when I save my change and click Refresh […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.