0
votes
1answer
20 views

Measuring DB time of application using SQL Server Profiler

I have an application residing on the same host as a SQL Server database. There is a scenario in which this application is slow and due to co-existence of IIS and SQL Server, I cannot get which one ...
1
vote
1answer
55 views

How to match a version of SQL Server 2008?

It is needed to install a new instance of SQL to the existing Windows SQL Server 2008. I have no idea what was used to originally install the existing 4 instances. Is it R5 SP32? Thanks to MS ...
0
votes
2answers
61 views

Set default value for all columns with specific name within a database

I've got a database that includes an int column project_id on many tables, and I want to script setting the default value to a specific value for all columns with that name in the database. Note that ...
2
votes
1answer
70 views

Can SQL Server stop me from running an UPDATE statement without a WHERE clause?

Whenever I have to run an update statement, I always get nervous that I might forget the WHERE clause and overwrite the entire column in the database. Is there any setting or plugin or addon I can ...
3
votes
0answers
68 views

Using Import Wizard with Access - No null values

I am trying to import a table from Access to SSMS using the Import Wizard but when I do the resulting table has a lot of empty strings instead of the NULL values that I am expecting. How do I make ...
1
vote
0answers
29 views

What does this icon in SQL Server mean? [duplicate]

Can someone tell me what the icon of a server and a blue database symbol means. It is attached to database engine instance in my object explore view. (I apologize, I am unable to add a image of the ...
6
votes
1answer
660 views

Free space of mdf and ldf does not match with database free space

In SSMS I saw file size related properties and found below details for one database. Here values does not match with other properties. Here size of the mdf, ldf and total size matches with other ...
1
vote
0answers
54 views

SQL Server 2008 upgrade and clean

After upgrading a SQL Server 2008 instance to SQL Server 2012 (in-place upgrade), there appears to be numerous 2008 instance components (namely the 2008 SSMS in start menu, in add/remove programs ...
0
votes
0answers
56 views

“Show table data” option to edit compact database

I have installed sql server compact edition 3.5 and i am sql server management studio to edit table.I am using "Show table data" option which comes on right click to a table of compact database. But i ...
0
votes
1answer
56 views

SSMS gives error if column name is “MERGE” where as other keywords works

IN SSMS create table if we include sql keywords in column name then it will be wrapped around square brackets "[]" automatically and the table gets created without any error generally. But if we ...
2
votes
1answer
48 views

Order results from query to have a certain result at the top

I'm not sure there is even a way to do this, but thought I would ask anyway. I have the following example output from a query: Name Country Number -------------------------- Harry Germany ...
2
votes
1answer
222 views

Why would a query in code be slower than a query in a SQL tool

When we face performance issues with out application, one of the first things we do is try to isolate if the problem is the code, the queries or the database itself. The most frustrating part of this ...
4
votes
3answers
2k views

How to find unused indexes?

I am working on a Data warehouse. I have tables with up to 200M records. Some of these tables have around 20+ indexes (I can't provide a reason why they have been created in the first place). This is ...
1
vote
2answers
1k views

How to make SSMS upper case keywords

I recently started using Management Studio 2012. When using MySQL Workbench, a handy feature was that I could stay all in lower case and any reserved word (like SELECT, INSERT) would convert to upper ...
4
votes
2answers
1k views

Error while taking backup using SSMS

I am using SSMS. I have about 5 logins. For a particular login I have all server roles other than sysadmin. It is a sql login (not windows authentication). In user roles it has all permission for ...
2
votes
1answer
3k views

Error on creating database in SSMS

I am using SQL Server Management Studio 2008. I am connect to localhost and I want to create a database. When I click on New Database, type the name and click ok, I get the message: Index was ...
3
votes
1answer
89 views

Adding column from SSMS wizard in SQL Server

Today, I am reading through Pinal Dave's blog about adding column in SQL SERVER....One thing make me surprised that while adding column from SSMS wizard, it goes from following process: Create a New ...
0
votes
1answer
152 views

Connecting to an SQL Azure Database from SSMS - IP Restriction

I am trying to connect to a new SQL Azure Database via SQL Server Management Studio. The client box running SSMS is hosted on a production DB so we restrict access on 1433 to just a handful of IPs ...
4
votes
2answers
577 views

Restore SQL Server database from .sql files

So we had an encrypted database that puked and killed our whole SQL Server setup. Sucks about our data, but we were smart enough to have our data structures / stored procedures / functions in Git The ...
0
votes
2answers
41 views

SQLQueryTableData-Important

In SQL Server Management Studio, when I run the query select * from tablename it shows me the data. But, that table is not physically present in that database. Is it possible?
1
vote
3answers
2k views

How do I use SSMS to compare Database 1 Table 1 against Database 2 Table 1?

I have two database - Database1 and Database2. Both database contain a table that have similar structure as follows: ...
6
votes
2answers
5k views

Allowing Foreign Key to be Null

I'm trying to create a relationship between two tables where one column in TABLE A is the foreign key for a column in TABLE B. However, there is one row in TABLE B that is currently null in that ...
2
votes
1answer
101 views

Question about new behavior of current connection combobox in SQL Server 2012

I have a question about the new behavior of the database selection combobox in SQL Server 2012 (Press Ctrl + U to move your focus to it). It seems that, unlike in SQL Server 2008 R2, clicking in the ...
2
votes
4answers
818 views

SQl Server Password Change after installation

I have installed SQL Server 2005, but at the time of installation I forgot to change my password. Now I can access my database only in window authentication mode, and I want to access the database in ...
3
votes
1answer
2k views

Management Studio all buttons disabled

I get an odd problem in my SQL R2. Although I can attach a new db to my db instance, but all buttons on the tool menu panel are disabled. So I cannot execute any sql query statements. It is really ...
3
votes
1answer
2k views

How to check connection string in SSMS2012?

I'm connected to database. I use db by Management Studio 2012 Express. Can I check connection string by click something in Management Studio?
1
vote
1answer
1k views

Simple Car Rental database

I am trying to learn SQL development using SQL Server 2008 R2 Database Management Studio. I was trying to model a car rental company, where clients can rent cars, and I have to know which client has ...
1
vote
2answers
21k views

Error: Specified cast is not valid. (SqlManagerUI)

I am trying to restore database created on server to my localbox however i am getting 'Error: Specified cast is not valid. (SqlManagerUI)' error message. Server Info: Windows Server 2008 Standard ...
14
votes
1answer
417 views

Poor SQL Server performance when management studio closed

I've noticed a strange behaviour of SQL Server 2008 r2 express: usually my query execution time is ~650ms, but if I open Management Studio and run any simple query (for example SELECT * FROM ...
1
vote
1answer
600 views

Why is my maintenance plan save overwriting job ownership?

I'm slowly untying all the system dependencies to the previous DBA's system account and moving them to a service account. The old DBA had ownership of all the jobs in our maintenance plan. In SSMS I ...
14
votes
1answer
6k views

How do I read Query Cost, and is it always a percentage?

I'm currently studying for SQL 70-433 (the Microsoft Certification exam), and I'm getting very confused about the "query cost" performance metric. According to any documentation I could find via ...
2
votes
1answer
148 views

Migrate Data and/or Schema from DBv1 to DBv2

I have a production database which has been plugging away for several months. I have been making modifications to a duplicate copy on a test/dev server. I've added some additional fields (null ...