Tag: ssms

How do I grant read access for a user to a database in SQL Server?

I want to grant access to a user to a specific database with read and write access. The user is already available in the domain but not in the DB. So, how can I give them that access with creating a new user and password? Someone told me that it can be done with only […]

How to get export output in “real” CSV format in SQL Server Managment Studio?

I have a query that I am running in SQL Server Management Studio (connecting to a SQL Server 2005 database). I want to export the data in CSV format. Not wannabe CSV format, where you just stick a comma between each column, but “real” CSV format, where you put quotes around your strings. This way […]

Unique constraint on multiple columns

CREATE TABLE [dbo].[user]( [userID] [int] IDENTITY(1,1) NOT NULL, [fcode] [int] NULL, [scode] [int] NULL, [dcode] [int] NULL, [name] [nvarchar](50) NULL, [address] [nvarchar](50) NULL, CONSTRAINT [PK_user_1] PRIMARY KEY CLUSTERED ( [userID] ASC ) ) ON [PRIMARY] GO How do I add a unique constraint for columns fcode, scode, dcode with t-sql and/or management studio? fcode, scode, […]

Cannot install adventureworks 2012 database – Operating system error 5: Access is denied

I am trying to install AdventureWorks 2012 database in sql server 2012. I got the mdf file from this link – http://msftdbprodsamples.codeplex.com/releases/view/93587 Here is the name of the file I downloaded – AdventureWorks2012_Database.zip I am doing all this on a windows 7 64 bit. I get the error below: Attach database failed for Server ‘SuperPC\SQL2012’. […]

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

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?

How to generate an INSERT script for an existing SQL Server table that includes all stored rows?

I’m looking for a way to generate a “Create and insert all rows” script with SQL Management Studio 2008 R2. I know that I can create a “create table” script. I can also create an “insert in” script, but that will only generate a single row with placeholders. Is there a way to generate an […]

SQL Server 2008 can't login with newly created user

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 […]

Add unique constraint in SQL Server 2008 GUI?

I have an existing table with data. I have just added a new column but I cannot find how to add a unique constraint on that column. Could someone please advise? Right-clicking and selecting “check constraints” wasn’t helpful.

How to quickly edit values in table in SQL Server Management Studio?

Aside from context menu -> “Edit Top 200 Rows” from Object Explorer, is there a quick way to open a table in Edit mode where I can just quickly modify the value of a cell? I need to be able to page past the first 200 rows. And I dont want to write “insert” script […]

SQL Server (localdb)\v11.0 explained

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 […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.