Connect to SQL Server Management Studio Express FAIL - sql-server

I have Visual Studio 2010 Pro on a 32 bit Windows 7 machine.
Am trying to work through a DB tutorial requiring Micorosoft SQL Server Management Studio Express so
I Installed SQL Server 2005 Express (the 32 bit flavor)
However I can't even connect to the server
For server names I've tried OSR2-PC as indicated by my command line windows >hostname response
I then tried .\sqlexpress per various blog recommendations (see pic)
I get an error popup that says:
"Additional information:
-> This version of Microsoft SQL Server Management Studio Express can only be used to connect to SQL Server 2000 and SQL Server 2005 servers "
Would greatly appreciate help.

Check the SQL services that are running by executing services.msc. Installed SQL Server instances will be shown along with the instance name. Sometimes the instance name is not the same as the hostname.

Related

What do I need to execute a SQL Server PowerShell module

I am creating an Octopus deploy that installs a windows service on a remote server. I am re-using a template from a web deploy project that sets up the web services and web application (on other servers). It has an extra step that deploys database scripts to update the schema and stored procedures etc. This step is executed on the web server using SQL Server PowerShell tools (apparently).
I need to incorporate that as well into my project. The folks who set up the original project are long gone! I have managed to get it working up to the last step, however the SQL Server PowerShell tools needed on the new server are not available.
The database script step is throwing the following error.
Import-Module : The specified module 'C:\Program Files\Microsoft SQL Server\110\Tools\PowerShell\Modules\SQLPS' was not loaded because no valid module file was found in any module directory.
At C:\Octopus\Work\20160930164655-24\.ps1:1 char:14
The necessary folders and files exist on the web server. It looks like SQL Server Client is not installed though (judging by the start menu; I don't see SQL Server Management Studio for example).
In Programs and Features on the web server I see a bunch of SQL Server things:
Microsoft SQL Server 2012 Command Line Utilities
Microsoft SQL Server 2012 Data tier App Framework
Microsoft SQL Server 2012 Express LocalDB
Microsoft SQL Server 2012 Management Objects
Microsoft SQL Server 2012 Management Objects (x64)
Microsoft SQL Server 2012 Native Client
Microsoft SQL Server 2012 Transact-SQL Compiler Service
Microsoft SQL Server 2012 Transact-SQL ScriptDom
Microsoft SQL Server 2012 Transact-SQL Language service
Microsoft SQL Server 2012 TSQL Language service
Microsoft SQL Server Comnpact 4.0 SP1 x64 ENU
Microsoft SQL Server Data Tools - enu(11.1.20627.00)
Microsoft SQL Server Data Tools - Build Utilities - enu (11.1.20627.00)
Microsoft SQL Server System CLR Types
Microsoft SQL Server System CLR Types (x64)
Microsoft SQL Server System CLR Types for SQL Server 2012
Microsoft SQL Server System CLR Types for SQL Server 2012 (x64)
Windows Powershell Extensions for SQL Server 2012
I need to raise an IT ticket to get this set up on my new server but don't know what to ask for! What installation(s) would give me the above features? Or what install would allow me to execute that script?
Would the SQL Server Client 2012 suffice?
Note: the server I need to install on is 32 bit.
SQLPS is auto installed in sql server 2012. The old versions need to install it from download Featurpack.
It's installed normally for sql server 2012 in the folder:
c:\Program Files\Microsoft SQL Server\110\Tools\PowerShell\Modules\SQLPS
If it's not available in that path require installing:
Microsoft Windows PowerShell Extensions for Microsoft SQL Server 2012
It's availabl at url:
32 bit:
64 bit:
in Poweshell 3 you can run the command (without path):
Import-Module Sqlps -DisableNameChecking;
and it's valid if you use the path
Invoke-Sqlcmd is similar to the command line tool sqlcmd
You can run your script file using the command:
sqlcmd -S <server> -U <user> -P <password> -i <qry.sql>
What you seek is the Microsoft SQL Server 2012 Feature Pack, available here:
https://www.microsoft.com/en-us/download/details.aspx?id=29065
If you expand the "Install Instructions" section, and then scroll about halfway down the page, you will see that one of the components listed there is the PowerShell Extensions, which contains the SQLPS module. Note that this component depends on the Shared Management Objects component (also on the same page), which in turn depends on CLR Types (also on the page, but at least that one is already installed on your server).
There are different versions available for other versions of SQL Server:
SQL Server 2014: https://www.microsoft.com/en-us/download/details.aspx?id=42295
SQL Server 2016: https://www.microsoft.com/en-us/download/details.aspx?id=52676

Unable to login to sql server

I dont know much about sql server.
I have just re-installed windows 7 on my laptop. After that I installed Visual Studio 2012 Express Edition. I also Installed SQL Server Management Studio 2008 R2.
Now when I try to log in to sql server management studio by using server name as . or (local) or .\SQLEXPRESS or PC-Name\SQLEXPRESS and using Windows Authentication I get the error as below.
Please dont mark this question as negative as I have searched on google for last 4 hours but did not understand the problem.
Update:
There are many reasons that may cautioning the problem:
SQL Server is not running
SQL Server is not properly configured
You try to connect with a worng instance Name
You can try the following:
Go to Mycomputer->Rigt Click->Manage->Application and Services
And from there check that SQL Server Express is running
2.From there also, gCheck the Instance name of your SQL Express and be sure when you log on to Management Studio you Provide the same Instance name
Confirm that the service is installed and running. Under Computer Management, drill-down into Services and Applications -> Services.
There should be a service named "SQL Server (SQLEXPRESS)". Try a restart or start of the service.
If any other instance of SQL Server is installed it will be listed - try connecting to LOCALHOST(whatever the instance is listed as) to verify the installation is functional.
UPDATED following further information from comments:
You may have only installed the client tools (management studio), and have not installed the database service. Ensure you have the correct installer which includes the database services engine.
First check that the SQL Server parameters are set accordingly.
Go to Start -
All Programs — Microsoft SQL Server 2008 R2 — Configuration tools —
SQL Server Configuration Manager
Under SQL Server Services, make sure that the instance is running :
SQL Server ()
SQL Server Browser
Under SQL Server Network Configuration - Protocols for (), these are enabled:
TCP/IP
Named Pipes
Do the same under SQL Native Client 10.0 under Client Protocols

How to connect to SQL Server provided by AppHarbour

I am new to AppHarbour and I am trying to deploy an ASP.NET MVC 3 Web application here. I have successfully deployed the web application.
Now I want to run some sql scripts on the database provided.
For which I have followed the following steps...
Step 1 :
Step 2 :
Step 3 :
Now here I get the server name, username and password as well as the database name, but !
When I try connecting to this database using SQL Server Management Studio I just cannot connect to it.
I always get the following error message
TITLE: Connect to Server
Cannot connect to e2f7c78d*********b9.sqlserver.sequelizer.com.
ADDITIONAL INFORMATION:
This version of Microsoft SQL Server Management Studio can only be used to connect to SQL Server 2000 and SQL Server 2005 servers. (ConnectionDlg)
Please can some one help me on this. Thanks
Appharbor uses Sql Server 2008 R2 (Microsoft SQL Server Express Edition with Advanced Services, version 10.50.1600.1). Use Microsoft SQL Server Management Studio 2008 R2 version or newer and it should work.

How to run SQL Server 2012 Services

I have Installed Microsoft Visual Studio 2012 (Ultimate) , and it installed all the SQL files,
yet I can't find the SQL Server Manager in the Start Menu, like the old version, so I can't start the services, , or there is an other way to run the services, so I can connect to the SQL Server?
In Run window, type "C:\Windows\SysWOW64\mmc.exe" /32 C:\windows\SysWOW64\SQLServerManager12.msc. I did come across the same problem (Sql Server Configuration Manager is not in start menu) before, and I had to pin it to task bar.
SQL Sever 2012 service are installed via Microsoft® SQL Server® 2012 Express as VS 2012 does not install it unless you are using custom installer..
Once you install Microsoft® SQL Server® 2012 Express in your machine you can use SSMS and other tools to manage SQL services on your machine.
Use 'sqlserver.exe' to start SQL Server from the command line - MSDN reference here. Or you can download SQL Server Management studio as shown below - from this link.

SQL Server not visible in Server Explorer

If there is a SQL Server 2000 installed on a Server, and i have a VWD Express 2008 on a PC on that network, what could be the possible reasons for the SQL Server not being visible in the Server Explorer of the VWD ? Both PC's are on the same workgroup.
I also tried keying in the name of the server, and the Login and password, but the databases in that server do not appear in the Dropdown list.
Any suggestions helpful.
Regards.
Does Visual Web Developer Support SQL 2000? As per my knowledge it does not. Why not use SQL 2005 Express or SQL 2008 Express.
Also you can download SQL Management Studio Express (05/08), Install it on the PC with Visual Web Developer & try to connect to SQL 2000 Machine. If it cannot, It will throw an error which will help you a little more to know the reason.
One last thing (very fundamental..) Is your SQL 2000 running?

Resources