ssms

How can I manage SQL CE databases in SQL Server Management Studio?

好久不见. 提交于 2019-11-26 16:49:41
问题 I created a SDF (SQL CE) database with Visual Studio 2008 (Add / New Item / Local Database). Is it possible to edit this database with SQL Server Management Studio? I tried to attach it but it only offered .mdf and attaching a .sdf file results in "failed to retrieve data for this request". If so, is it possible to create SDF files with Management Studio as well? Or are we stuck with the simple interface of the Visual Studio 2008 database manager? 回答1: You can create .sdf files with SQL

Sql Server 'Saving changes is not permitted' error ► Prevent saving changes that require table re-creation

◇◆丶佛笑我妖孽 提交于 2019-11-26 16:46:06
When I create a table in SQL Server and save it, if I try to edit the table design, like change a column type from int to real, I get this error: Saving changes is not permitted. The change you have made requires the following table to be dropped and re-created. You have either made changes to a table that can't be recreated or enabled the option prevent saving changes that require the table to be re-created. Why do I have to re-create the table? I just want to change a data type from smallint to real . The table is empty, and I didn't use it until now. Robert Harvey From Save (Not Permitted)

SQL Server 2008: how do I grant privileges to a username?

南楼画角 提交于 2019-11-26 15:56:53
I need to be able to establish an ODBC connection through SQL Server authentication. In SSMS how do I grant permission for a user to be able to have ALL RIGHTS on a specific database? is there a way to do this graphically with SSMS? If you want to give your user all read permissions, you could use: EXEC sp_addrolemember N'db_datareader', N'your-user-name' That adds the default db_datareader role (read permission on all tables) to that user. There's also a db_datawriter role - which gives your user all WRITE permissions (INSERT, UPDATE, DELETE) on all tables: EXEC sp_addrolemember N'db

How can I automate the “generate scripts” task in SQL Server Management Studio 2008?

左心房为你撑大大i 提交于 2019-11-26 15:47:38
I'd like to automate the script generation in SQL Server Management Studio 2008. Right now what I do is : Right click on my database, Tasks, "Generate Scripts..." manually select all the export options I need, and hit select all on the "select object" tab Select the export folder Eventually hit the "Finish" button Is there a way to automate this task? Edit : I want to generate creation scripts, not change scripts. What Brann is mentioning from the Visual Studio 2008 SP1 Team Suite is version 1.4 of the Database Publishing Wizard. It's installed with sql server 2008 (maybe only professional?)

SQL Server 2008 can't login with newly created user

孤街醉人 提交于 2019-11-26 15:03:45
问题 I'm using using Windows Vista and I'm having trouble logging in with a newly created user. I open SQL Server Management Studio. I create a new Login by right-clicking on Security->Logins. Check: SQL Server Authentication Login name: tester Password: test Click OK I added this user to User Mapping to my database of choice. Click File -> Connect Object Explorer, select SQL Server Authentication and enter tester/test and click Connect. I get an error: Login failed for user 'tester'. (Microsoft

sql runs fast in ssms slow in asp.net

浪尽此生 提交于 2019-11-26 14:38:40
I have been having this problem for a couple of weeks now. The problem is that the query takes 4-5 minutes to run on the website and at most 2 or 3 seconds to run in ssms. Also I found that after I make a change to this query like adding the customerId variable it will start running quickly on the web page but by the next day it is slow again. The query in question is this one: DECLARE @customerID INT SET @customerID = @CustID DECLARE @MyTable table( Iden int NOT NULL IDENTITY(1,1), ProductID int) INSERT INTO @MyTable(ProductID) SELECT P.ProductID FROM Product P WITH (NOLOCK) left join

Changing the CommandTimeout in SQL Management studio

╄→尐↘猪︶ㄣ 提交于 2019-11-26 14:10:20
问题 How can I change the CommandTimeout in SQL Management Studio? 回答1: Changing Command Execute Timeout in Management Studio : Click on Tools -> Options Select Query Execution from tree on left side and enter command timeout in " Execute Timeout " control. Changing Command Timeout in Server : In the object browser tree right click on the server which give you timeout and select " Properties " from context menu. Now in " Server Properties -..... " dialog click on " Connections " page in "Select a

How to remove “Server name” items from history of SQL Server Management Studio

荒凉一梦 提交于 2019-11-26 12:20:39
问题 When trying to connect to a server in Management Studio (specifically 2008), there is a field where you enter the Server name. That field also has a drop-down list where it shows a history of servers that you have attempted to connect to. I would like to know: How to remove an individual item from that history. How to remove an item from the Login field history for each Server name. Thanks! 回答1: As of SQL Server 2012 you no longer have to go through the hassle of deleting the bin file (which

The backend version is not supported to design database diagrams or tables

你。 提交于 2019-11-26 12:07:58
问题 I\'m trying to add a table to my newly created database through SQL Server Management Studio. However I get the error: the backend version is not supported to design database diagrams or tables To see my currently installed versions I clicked about in SSMS and this is what came up: What\'s wrong here? 回答1: This is commonly reported as an error due to using the wrong version of SSMS(Sql Server Management Studio). Use the version designed for your database version. You can use the command

SQL Server (localdb)\v11.0 explained

跟風遠走 提交于 2019-11-26 11:55:14
问题 I\'m following Code First to an Existing Database tutorial and noticed that it suggested to connect to (localdb)\\v11.0 in learning purposes. I\'ve tried to connect to it using my SQL Management Studio and it worked. But when I\'ve restored a DB backup it created an [DatabaseName].mdf file in my user\'s directory. I\'m quite surprised and have following questions: What is a (localdb)\\v11.0 ? Does it uses my SQL Express or SQL Compact? Does it support only databases stored in .mdf files? How