“No backupset selected to be restored” SQL Server 2012

I had this problem and it turned out I was trying to restore to the wrong version of SQL. If you want more information on what’s going on, try restoring the database using the following SQL: RESTORE DATABASE <YourDatabase> FROM DISK='<the path to your backup file>\<YourDatabase>.bak’ That should give you the error message that you … Read more

SQL Server Configuration Manager cannot be found

If you happen to be using Windows 8 and up, here’s how to get to it: The newer Microsoft SQL Server Configuration Manager is a snap-in for the Microsoft Management Console program. It is not a stand-alone program as used in the previous versions of Microsoft Windows operating systems. SQL Server Configuration Manager doesn’t appear … Read more

Enable remote connections for SQL Server Express 2012

Well, glad I asked. The solution I finally discovered was here: How do I configure SQL Server Express to allow remote tcp/ip connections on port 1433? Run SQL Server Configuration Manager. Go to SQL Server Network Configuration > Protocols for SQLEXPRESS. Make sure TCP/IP is enabled. So far, so good, and entirely expected. But then: … Read more

How to check if a column exists in a SQL Server table

SQL Server 2005 onwards: IF EXISTS(SELECT 1 FROM sys.columns WHERE Name = N’columnName’ AND Object_ID = Object_ID(N’schemaName.tableName’)) BEGIN — Column Exists END Martin Smith’s version is shorter: IF COL_LENGTH(‘schemaName.tableName’, ‘columnName’) IS NOT NULL BEGIN — Column Exists END

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)