ssms

Can I have multiple rows of tabs in SQL Server Management Studio

社会主义新天地 提交于 2019-12-20 09:26:18
问题 I'm wondering if it's possible to setup SQL Server to have multiple rows of tabs for files / queries. I have a lot of queries I want to switch between, and could move them to different horizontal groups, but I think two rows would be much easier to navigate than that pin on the left that drops down the big list of open queries. Visual Studio kind of supports this if you pin enough code windows to fill up the top bar. Is there something similar in SQL Server? Edit: I'm trying to achieve

Easy way to convert exec sp_executesql to a normal query?

谁都会走 提交于 2019-12-20 09:16:40
问题 When dealing with debugging queries using Profiler and SSMS, its pretty common for me to copy a query from Profiler and test them in SSMS. Because I use parameterized sql, my queries are all sent as exec sp_executesql queries. exec sp_executesql N'/*some query here*/', N'@someParameter tinyint', @ someParameter =2 I'll take this and convert it into a normal query for ease of editing (intellisense, error checking, line numbers, etc): DECLARE @someParameter tinyint SET @someParameter = 2 /*some

Simba Mongo ODBC driver: returned data that does not match expected data length

感情迁移 提交于 2019-12-20 05:44:07
问题 We are using Simba Mongo ODBC driver to connect to Mongo database and make sql queries. I tested connection on Linux using isql and was able to perform queries. When my client tried to connect to Mongo through Microsoft SQL Server Management Studio he received the following error: OLE DB provider 'MSDASQL' for linked server 'mongo' returned data that does not match expected data length for column '[MSDASQL].contributorComposite__0__biographicalNote'. The (maximum) expected data length is 255,

Microsoft Sql Server Managment studio backup size goes negative

喜你入骨 提交于 2019-12-20 04:54:24
问题 The problem is that I need to explain the different sizes of backups that are being made of a database in a plant. Sometimes the difference between the sizes is in negative, even though that there is no data being deleted from the system. Datum Backupfile-file Size KB Diff 6/1/10 backup201006010100.bak 3355914 7/1/10 backup201007010100.bak 4333367 977453 7/2/10 backup201007020100.bak 4355963 22596 7/3/10 backup201007030100.bak 4380896 24933 7/4/10 backup201007040100.bak 4380404 -492 8/1/10

Remote connection to MS SQL - Error using pyodbc vs success using SQL Server Management Studio

我的未来我决定 提交于 2019-12-20 00:59:31
问题 I have a MS SQL database in the same network but in other computer. Using the SQL Server Management Studio (SSMS) Express, I can find the database and connect without problems. But when I use pyodbc to connect to the same server using: import pyodbc server = r"xxxER\xxxSQLSERV" db = "xxxDB" user = "xxx" password = "xxxx" conn = pyodbc.connect('DRIVER={SQL Server};SERVER='+server + ';DATABASE=' + db +';UID=' + user + ';PWD=' + password) I get following error: pyodbc.OperationalError: ('HYT00',

Protect LocalDB from user access

橙三吉。 提交于 2019-12-19 11:37:12
问题 I'm looking at using SQL LocalDB as the client side database which will replace the current SQL CE 3.5 database inside an in-house application developed in .net 4. I've come across a problem that I'm not sure how to get around and that's with security setup of the LocalDB instance. If I setup a script inside .net to create a private LocalDB instance, e.g. (localdb)\T1, then create a new database inside that instance plus add a SQL user account + password (non domain account), how do I stop

Why does Microsoft SSMS syntax highlight the word “configuration”?

萝らか妹 提交于 2019-12-19 10:29:39
问题 When using Microsoft SQL Server Management Studio 14.0.17254.0 and it's query editor, I noticed that the word configuration is always syntax highlighted as a blue keyword. Even though it doesn't appear to be in the list of Reserved Keywords. Is this a keyword in some other SQL standard or has this been a keyword before? Is there any reason this should be highlighted with the same color as SELECT or WHERE ? I found similar question asking about other keywords, and they all seemed to have

Sql Server management studio how to auto capitalize

一曲冷凌霜 提交于 2019-12-18 19:32:26
问题 Is there any FREE "build-in" way to capitalize the "keywords" in the SQL 2005/2008 management studio when you write a sql query? i.e truncate table x should be automatically changed to: TRUNCATE TABLE x 回答1: the intellisense in the 2008 management studio will do this as well as long as you are connected to a SQL 2008 database. You can change the case you prefer to upper or lower under Tools / Options / Text Editor / Transact-SQL / IntelliSense 回答2: There is no built in 'intellisense' in SQL

Sql Server management studio how to auto capitalize

人走茶凉 提交于 2019-12-18 19:32:05
问题 Is there any FREE "build-in" way to capitalize the "keywords" in the SQL 2005/2008 management studio when you write a sql query? i.e truncate table x should be automatically changed to: TRUNCATE TABLE x 回答1: the intellisense in the 2008 management studio will do this as well as long as you are connected to a SQL 2008 database. You can change the case you prefer to upper or lower under Tools / Options / Text Editor / Transact-SQL / IntelliSense 回答2: There is no built in 'intellisense' in SQL

How can I resolve the “Table 'dbo.Foo' already exists.” error when the table does not exist?

安稳与你 提交于 2019-12-18 18:37:13
问题 I've created a table and then realised I made a mistake. SSMS wouldn't let me update the table without recreating it, so I've deleted the table and then tried to create it again. It won't let me do this, and I get an error dialog Table 'dbo.Foo' already exists. So I try to delete it again: drop table dbo.Foo Cannot drop the table 'dbo.Foo', because it does not exist or you do not have permission. Refreshing the IntelliSense cache does not help. 回答1: Closing and restarting SSMS seems to be the