ssms

SQL Server Management Studio Skin / Appearance / Layout

萝らか妹 提交于 2019-12-04 09:50:56
问题 Can you apply a custom skin / appearance to SSMS? I am thinking something along the lines of a dark theme (black background, yellow font) you'd find in most IDEs 回答1: SSMS 2012 is build on the VS 2010 shell. Thus, it can use compatible ".vssettings" files to apply custom color schemes. See also http://studiostyl.es/ for a gallery. 回答2: I decided to try something simple on SSMS 2012 : Go to http://studiostyl.es/ Pick a theme and download it Follow these screenshot instructions Note that doing

How do I view the SSIS packages in SQL Server Management Studio?

守給你的承諾、 提交于 2019-12-04 09:49:54
问题 Argh! I created an SSIS package via an Import Wizard and I can't find the SSIS packages on the server using Management Studio. Execute an SSIS package doesn't appear as an option when I go into job scheduler, either. 回答1: When you start SSMS, it allows you to choose a Server Type and Server Name. In the server type dropdown, choose "Integration Services" and connect to the server. Then you'll be able to see what packages are in the db. 回答2: The wizard likely created the package as a file. Do

Deleting duplicates based on multiple columns

别说谁变了你拦得住时间么 提交于 2019-12-04 07:53:00
I have listed duplicates using the following: select s.MessageId, t.* from Message s join ( select ToUserId, FromUserId, count(*) as qty from Message group by ToUserId, FromUserId having count(*) > 1 ) t on s.ToUserId = t.ToUserId and s.FromUserId = t.FromUserId Now, how do I delete all but one of the Messages (I'm trying to remove duplicates so I can apply a unique index on FromUserId and ToUserId ). Vamsi Prabhala Use a cte and assign row numbers so that all but one for duplicate pairs can be deleted. with rownums as (select m.*, row_number() over(partition by ToUserId, FromUserId order by

Cannot connect to (LocalDB)\MSSQLLocalDB -> Login failed for user 'User-PC\User'

半城伤御伤魂 提交于 2019-12-04 07:41:55
问题 I am getting an error, While I am trying to connect (LocalDB)\MSSQLLocalDB through SQL Server management studio. I also tried to login with default database as master the error is same. Here is the Server details. 回答1: The following command through sqllocaldb utility works for me. sqllocaldb stop mssqllocaldb sqllocaldb delete mssqllocaldb sqllocaldb start "MSSQLLocalDB" After that I restarted the sql server management studio, and it is successfully established connection through (LocalDB)

SSMS permits duplicate records in a table, but not subsequent updates

匆匆过客 提交于 2019-12-04 06:31:11
Edit: When I say "SQL Server", I'm really talking about the Management Studio. Sorry if that was confusing. Oh I hate when things like this happen. I was working with SQL Server yesterday and trying out the PIVOT command to try to figure out how it worked. So I created a new table with four columns, and the first column was going to have the same value for the first few rows. I added the "value1" to the first row, first column, and hit enter - sine no keys or constraints were added yet, it allowed me to enter down to the next row with NULLs for the other columns on the first row (which is fine

How to determine the effective permissions for a user of a SQL Server database through C#?

流过昼夜 提交于 2019-12-04 05:50:05
When I say effective permissions, I'm referring to the permissions listed when you go into the properties of a database in SQL Server Management Studio, click "Permissions", and then click the "Effective" tab. So far, I have been able to determine the explicit permissions with the following code: using Microsoft.SqlServer.Management.Smo; ... DatabasePermissionInfo[] permissions = database.EnumDatabasePermissions("username"); However, I still need to obtain the effective permissions. In this scenario, I added a login for a user and gave it the role of db_datareader and db_datawriter for a

sql server 2012: cannot alter the login sa

别等时光非礼了梦想. 提交于 2019-12-04 04:49:19
I'm trying to create a database on my local machine using SSMS version 11.0.2100.60. I've run the application as administrator, logged in using Windows authentication, and I've added MYDOMAIN\my-username to the Logins. However if I try to create a db with this login I get the message CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262) If I try to add the privelage dbcreator to my user, I get the following error. User does not have permission to perform this action. (Microsoft SQL Server, Error: 15247) I can't log in as sa as I don't know/remember the

“deadlock victim” in transaction, how to change the priority?

北城以北 提交于 2019-12-04 04:05:51
问题 i have logged an exception thrown by an ASP.NET-Application. Message: Transaction (Process ID 56) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. I'm sure that the reason for it was, that i was running some selects directly in SSMS on tables that were queried in the application in the same time. So now my question is: Can i change the priority SQL-Server chooses "deadlock victims"? I would like to

“Favorites” or “macros” in SQL Server Management studio?

假装没事ソ 提交于 2019-12-04 03:49:52
I have a few databases that I always use SQL Server Management Studio with. I'd like to be able to create a toolbar button or keyboard shortcut that automatically opens a new query window (in the current SSMS instance) and connects to a given (registered, perhaps) database. That's it. That's all I need. And this ashtray, and the paddle game, and the remote control. That's all I need. As it is now, I have to expand the Object Explorer, collapse/expand two to eight trees, right-click on my database, and choose "New Query". I see no way to do it, this would probably save me 30-60 seconds a day.

Sql Exception: No Process Is on the Other End of the Pipe

谁说我不能喝 提交于 2019-12-04 03:20:15
I can not access my sql server connection from c# code. I get this error: Sql Exception: No Process Is on the Other End of the Pipe thats the connection string in my app.config: <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=BELLA\SQLEXPRESS;Initial Catalog=TLP;User Id=pascal;Password=test;Pooling=False"/> When I use windows authentication: Integrated Security=True; Then I can connect to the database. BUT I can NOT use windows authentication because the opening of the sql connection is done from within a windows service which is run as