ssms

Edit a dtsx through SSMS

╄→гoц情女王★ 提交于 2019-12-12 12:07:28
问题 I created and executed a dtsx with SSMS corresponding wizard: This was to import a flat file in an existing table. At the end I saved the "package" as a .dtsx file Now I need to modify the column mappings and re-execute this package. Is there any way I can do it, using SQL Server Management Studio? I tried opening the file, but it opens this dialog: Where I cannot edit the mappings any more. Update: I understand that "editing" a dtsx is not a simple thing, yet is there a reason why the wizard

SQL Server Management Studio Error : Script failed for UserDefinedFunction

别说谁变了你拦得住时间么 提交于 2019-12-12 09:46:53
问题 I'm working on a local and a remote SQL Server instance with SSMS. I create a tiny function like: create function ufnTestFunc () returns int begin return 1 end When I try to 'modify' it, or choose 'script function as -> alter', I get an error like: Script failed for UserDefinedFunction 'dbo.ufnTestFunc'. (Microsoft.SqlServer.Smo) - Syntax error in TextHeader of UserDefinedFunction 'ufnTestFunc'. (Microsoft.SqlServer.Smo) This also happens on already existing functions. What may be the reason?

error when running any query in sql server management studio: the file exists

早过忘川 提交于 2019-12-12 08:17:55
问题 When I run any query in sql server management studio, I get the following error: An error occurred while executing batch. Error message is: The file exists. Restarting SSMS didn't help. Neither did rebooting the machine. The only thing I found on Google was someone saying "report the bug to microsoft" :P (Windows XP Pro x64, SSMS 2005) 回答1: I've been struggling with this one for while and when I recently installed Toad for MySQL I got the same issue. I installed sysInternals process monitor

What does a dashed / dotted relationship line represent in SQL Management Studio - Database Diagram

醉酒当歌 提交于 2019-12-12 08:15:00
问题 I'm looking at an existing database in Microsoft SQL Server Management Studio, and in the Database Diagram there is one relatioship that appears with a dashed or dotted line. The other relationships are all solid lines. What does the dashed line mean? 回答1: The dotted/dashed line means, that SQL Server does not enforce referential integrity for this relationship. Have a look here 回答2: referential integrity is not enforced 来源: https://stackoverflow.com/questions/9347917/what-does-a-dashed

Where should I install SQL Management Server instances on my development machine?

寵の児 提交于 2019-12-12 06:36:00
问题 I have a new desktop Windows 10 development machine and am trying to minimize what I install on it. On my old development machine I wound up with multiple versions of SQL Server and Management Studio. This time I have installed SQL Server in a docker container. Because of the answer to This question I understand I should not put Management Studio in a container. So where should I put it. In Hyper-V ? 回答1: Why "minimize" your installation and put barriers between yourself and your work? The

Too many parameter values slowing down query

微笑、不失礼 提交于 2019-12-12 04:48:27
问题 I have a query that runs fairly fast under normal circumstances. But it is running very slow (at least 20 minutes in SSMS) due to how many values are in the filter. Here's the generic version of it, and you can see that one part is filtering by over 8,000 values, making it run slow. SELECT DISTINCT column FROM table_a a JOIN table_b b ON (a.KEY = b.KEY) WHERE a.date BETWEEN @Start and @End AND b.ID IN (... over 8,000 values) AND b.place IN ( ... 20 values) ORDER BY a.column ASC It's to the

ssms copy database

吃可爱长大的小学妹 提交于 2019-12-12 04:44:55
问题 I have a local sql express server with DB A and remote server uXXX.mssql.domainname.com with DB B. using sql mangament studio 2008, I want to move copy DB A to DB B with all tables, data, dependencies and stored procedures. how to figure out this problem? I only had understood table and table data copying(using Tasks->Import Data). 回答1: Use the Copy Database Wizard In SQL Server Management Studio, go to the Object Explorer , expand the list of Databases, right-click your database "B", and in

How to set 1 to 0…1 relationship in SQL Server Management Studio

╄→尐↘猪︶ㄣ 提交于 2019-12-12 02:49:06
问题 I have tables: Users{UserId ...} Professors{UserId ...} I set UserId to be PK in both tables and made 1:1 relationship. But if I try to insert new user it doesn't work as it requires insert in the Professor table too. I want to make that one user can have only 1 record in Professor table but I also want to make it that it doesn't have to exist in Professor table (I don't want to make all users professors :) ). How to set 1 to (0...1) relationship in SQL Server Management Studio? I know that

SSMS 2008 converts control characters to spaces when using 'Results to Grid'

白昼怎懂夜的黑 提交于 2019-12-11 23:52:02
问题 I have a table in which one column (type ntext) has data that includes carriage return and linefeeds. (CHAR(13) and CHAR(10)). If I right click the table in SSMS 2008 and choose 'Select Top 1000 rows' and the display mode is set to "Result to Grid" it seems that control characters (like TAB and CRLF) are converted to spaces for display in the grid!! Yet if I right click the table and choose 'Edit Top 200 rows', the control character data is shown in the resulting grid (as two small squares).

“Cannot call methods on BIGINT” error

≯℡__Kan透↙ 提交于 2019-12-11 23:37:58
问题 I have a T-SQL query that I've been beating on for a while, it seems simple, but I get an error in the query designer when I try to execute it: SELECT Date, CAST(Date AS bigint) AS DateNum, Title, Earnings FROM dbo.Analysis_001 Whenever I try to execute/modify this in the designer, I get "Cannot call methods in BIGINT" as a pop-up error. Out of frustration, I tried executing it using "CREATE VIEW" and it worked... Why? 回答1: It's a bug : either in Management Studio - "Cannot call methods on