a developer's notes – a semi-technical web development BLOG

March 30, 2014

Can’t Connect to SqlServer 2012 LocalDB

Filed under: SQL — Duy Nguyen @ 11:12 am
Tags: , , , , , , ,

I had trouble connecting my sql server to (LocalDB)\v11.0 with my Windows account. I ended up having to delete it and recreate it.

Open a cmd prompt

c:\sqllocaldb delete "v11.0"
LocalDB instance "v11.0" deleted.

c:\sqllocaldb create "v11.0"
LocalDB instance "v11.0" created with version 11.0

If the database is in use, stop MSSQL service and try again.

Advertisements

October 28, 2011

How to Uninstall Sql Server Express that gets installed with Visual Studio 2010

Filed under: SQL — Duy Nguyen @ 1:12 pm
Tags: , , , , , , , ,

1. Go to Add/ Remove Programs.
2. Choose “Microsoft SQL Server 2008”
**I had Microsoft SQL Server 2008 R2 installed but you still need to select “Microsoft SQL Server 2008” NOT “Microsoft SQL Server 2008 R2”. If you do choose R2, you will see the SQLEXPRESS instance but you will not be able to select it!

3. Click on the REMOVE link (This will allow you to chose the instance to remove. See image)

4. Select SQLEXPRESS and remove!

September 5, 2011

How to search all columns of all tables in a sql database for a keyword

Filed under: SQL — Duy Nguyen @ 2:26 pm
Tags: , , , , , ,

How to search all columns of all tables in a database for a keyword? Check out this great blog entry: http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm

You can also use these queries to find which table a particular column name resides in:

SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name = ‘MYCOLUMNNAME’ )

SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name like ‘%PART_OF_NAME%’ )

Blog at WordPress.com.