ssms

Missing SQL Management Studio

橙三吉。 提交于 2019-12-13 03:42:32
问题 I installed SQL 2008 Enterprise edition all work properly during the installation all requirement are passed then after click finish go to : start --> All Programs --> Microsoft SQL Server 2008 --> only found the Configuration Tools and import export data any help plz 回答1: During installation you need to make sure to install management tools. 回答2: I get that occasionally when istalling on a rebuilt machine or server. I have no idea why it happens, but to make sure it doesnt happen, I normally

Microsoft SQL Server copy paste results to excel not working

天涯浪子 提交于 2019-12-13 02:47:27
问题 We have a remote connect to Microsoft SQL Server studio, there are 4 remote connections we could get assigned. Now on 2 of these servers, it allows us to copy and paste the results(grid) to excel. However, on the other 2 servers, it won't allow us to copy/paste at all. Is there permissions within the database that would stop us or is it down to the remote connection? 回答1: Use Task Manager to 'End task' on rdpclip.exe on the remote machine. Then restart it using a Command Prompt by typing

Application can open .mdf with no log file but Management Studio can not attach

非 Y 不嫁゛ 提交于 2019-12-13 01:41:43
问题 I installed the DevExpress demo C:\Users\Public\Documents\DevExpress Demos 15.2\DevExtreme\DXHotels The demo came with HotelDB.mdf in the App_Data folder. Out of curiosity I attempted to open the HotelDB.mdf by attempting to attach it using SQL Server 2012 Express Management Studio However I got an error about a missing log file when I did this. When I ran the application from the solution the log file created and I was able to subsequently attach using SQL Server. Why was the application

Generate scripts with new ids (also for dependencies)

旧巷老猫 提交于 2019-12-13 00:36:49
问题 In Microsoft SQL Server 2008 R2 I have some data stored in a table for which I want a script which creates an exact copy of the data, with different guids's (uniqueidentifiers) only. The challenge is, there is also data in other tables with dependencies on the main table. These data should also be copied and referenced to the new entries. The structure looks like that: Table Form: Guid Name 335AC2DD-C874-45E4-90AA-194882DB7C12 Testform Table Field: Guid FormGuid Name 9640CA20-2CE6-4BFB-929C

How to script non-default collation and skip explicit scripting for default collation?

馋奶兔 提交于 2019-12-12 21:09:43
问题 In SSMS 2008 R2, I created a table: aTest(Albnian varchar(10), Dflt varchar(10)) In SSMS table designer, both columns have the collation: "<database default>" (under "Column Properties" → "Table Designer") I changed the collation of the column "Albnian" to a non-default, for example, Albanian_CI_AS. If I script the table in SSMS (right click on "aTest" → "Script Tables as" → "CREATE To" → "New Query Editor Window", I get [1] with no explicit collations scripted at all. Bad. Obviously, one

Powershell: SQL Server Management Studio Script Generator

倾然丶 夕夏残阳落幕 提交于 2019-12-12 19:21:44
问题 I use the Script Generator which is integrated in the Microsoft SQL Server Management Studio to generate an import script for a whole database. I have to do some replacements in the script which I do with Powershell. Now I want to automate the generation. Is there a way to execute exactly this Script Generator Tool (and setting some options as on the screenshot - in my case 'Data only')? Or (if this isn't possible) can I open this tool window automatically from a ps script so I don't have to

Editing Multiple Rows by Their Order Index

喜夏-厌秋 提交于 2019-12-12 18:42:52
问题 Q: How would I go about using / applying the row number of each row in a query to a certain column in the entire query? I've added a screenshot to try and make things more obvious: [The picture is only a simple example] I would like to be able to directly use the value of the row number in such a context. (Iterate over the values, somehow?) Thanks in advance. (Sorry if the question is a bit vague) 回答1: Try this : ;WITH TEST AS ( SELECT *, ROW_NUMBER() OVER (ORDER BY id DESC) AS RowNo FROM

SQL Server 2008 R2 intellisense doesn't work

江枫思渺然 提交于 2019-12-12 14:24:02
问题 The SQL Server 2008 R2 Management Studio intellisense stopped working a month ago though it is enabled. I read that this issue may be caused by the .NET framework 4.0 SP1 and tried some of the suggestions but nothing worked: I have installed the cumulative update package: SQLServer2008R2_RTM_CU7_2507770_10_50_1777_x64 I re-registered the TextMgrP.dll Any other suggestions what can be done? The SSMS version is: Microsoft SQL Server Management Studio 10.50.1617.0 回答1: Make sure you are

Cast FOR XML to Varchar(max) [duplicate]

巧了我就是萌 提交于 2019-12-12 13:26:10
问题 This question already has an answer here : For XML length limitation (1 answer) Closed 6 years ago . I have a query that returns XML which I want to convert to varchar. My query returns 93,643 characters of XML. When I try to cast my xml result as varchar, I only get 43,679 characters when I copy the result set to a text editor. When I do len(xmlString), I get 93,643 characters. I know from this post that varchar(max) can have up to 2^31 characters and 1 byte = 1 character, but it seems to be

See list of all SQL Queries run on server

会有一股神秘感。 提交于 2019-12-12 12:20:59
问题 Is there a query I can run which will display all the queries which have been run on the server within a date range for a specific database? I need to find out what parameter values were passed to a Stored Procedure which was executed last week 回答1: No The only way this can be done is if a monitoring process is set up in advance . Monitoring a database, e.g. through SQL Profiler, has a performance impact, so one should be wary about using this against a live system for prolonged periods. A