There is probably a simple answer to this question but I do not have much experience with SQL Server/SSAS. I can connect to my local server PCNAME\SQLEXPRESS in SQL Server 2008. On that server I have made a database, some dimension tables, and a fact table that I intend to build a cube from.
I have been following tutorials on the internet on how to build a cube. I can successfully make a data source that connects to PCNAME\SQLEXPRESS, as well as make a data source view from it.
The problem is that after I build the cube, I get A connection cannot be made. Ensure that the server is running. and cannot process the cube. BIDS is displaying the star schema of my tables just fine, recognizes the relationships via foreign keys, etc... so I figured the server was running since it could access all of that data.
Does anyone know why this is happening, and if my server really isn't running can someone tell me how to start it? I am using SQL Server 2008 R2.
Thanks,
Logan
edit: I just tried to change the server name to PCNAME\SQLEXPRESS instead of localhost in the Properties->Deployment option menu. I get A connection cannot be made to redirector. Ensure that 'SQL Browser' is running.
I solved this problem - for people that find this page on Google in the future: when I first installed SQL Server, the SSAS part failed to install. I uninstalled SQL Server and when I reinstalled, I looked deeper into the issue. Apparently one of the services needed to run SSAS has a weird bug where it cannot be started if your Event Log is full. I finished the installation of SQL Server, cleared my Event Log (Administrative Tools -> Event Viewer -> Click Each Log and go to Action -> Clear All Events), and then started the SSAS service in the SQL Configuration Manager.
You can start by going to "Programs->Microsoft SQL Server 2008->Configuration Tools->SQL Server Configuration Manager". Once there, you need to start the services "SQL Server", "SQL Server Analysis Services", and maybe try starting "SQL Server Browser", though I believe that is not necessary.
Related
I am working on a project with a friend and he has deployed a SQL Server database. He uses a PC and can access the database using Microsoft SQL Server Management Studio (SSMS).
However I have a Macbook with an M1 chip and so I cannot use SSMS and need to figure out which SQL Server application I want.
It seems like the way to go is Microsoft Azure Data Studio. I cannot figure out how to connect properly, I have looked at several solutions posted online which all say to download docker, download the latest SQL Server image, use SQL edge, run SQL Server in a container and then open Azure and connect.
One caveat is that all these tutorials end with creating a SQL Server on the local host rather than connecting to an existing one.
In Azure, after entering server id, username and password, there is a green dot on the label of the DB on the left drop down menu, indicating that the connection to the DB was successful. However whenever I try to view the DB's from the drop down it loads and then errors:
Object Explorer task didn't complete within 45 seconds
and I cannot run any basic queries either.
At this point I don't care what IDE I use as long as it works. Any advice is much appreciated. It seems like this task should be super easy but has given me such a hard time and we cannot continue working on the project until I get access.
Anyways, thanks again in advance! and lmk if there's any other info I should provide.
Tried using docker with Azure Data Studio and my results were the same as when I only used Azure.
You'll want to use Azure Data Studio.
You don't need Docker at all to meet your goals. Those tutorials were in regards to running your own SQL Server instance on a Mac. You're trying to connect to an existing instance.
As mentioned in the comments, where is the existing SQL Server instance located?...is it on a server that's part of a domain. Is your Mac part of that same domain? It sounds like you're getting some kind of timeout issue or some sort of authentication issue. So this is more of an infrastructure question.
Once connected to the SQL Server instance in Azure Data Studio, what happens if you just open a blank worksheet and run the query SELECT ##SERVERNAME?
I read another article concerning this problem when getting the file in use message. I went into SQL Management studio and disconnected the database but still no success in connecting. Here's what's happening step by step:
I downloaded SQL Express 2014 and installed it. I created a DB called MyEntertainmentDB, then created a couple of files (Movies and Rating). I added some data to both. I fired up VS and in VB I created a form added various controls including a datagrid. The DB exists in the default location used by MS SQL. I clicked the Smart Tag and the data grid view tasks window appears. I click the choose data source drop down arrow and then add project data source. Database is highlighted and I click next. Dataset is highlighted and I click next. Now I click new connection and select Microsoft SQL Server Database File (Data provider is .NET Framework Data Provider for SQL Server (the only thing in that drop down box)) and I click Continue. Now I'm shown a window that has the data source as Microsoft SQL Server Database File (SqlClient) in the first box and I browse to where my database is located and select it (which is C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\MyEntertainmentDB.mdf). Everything is going well and I'm using Windows Authentication. I click ok. Now it waits several minutes and I get this message:
The attempt to attach to the database failed with the following message: A network related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.
I looked in theSQL Server log but nothing was mentioned shedding any light. I could not find any VS log. I checked the windows logs but could not find anything seemingly relevant. I'm at a loss for this problem and am about ready to trash MS SQL server and just go with MS Access 2010 or MySQL. Does anybody see where I'm going wrong? If so, please help, I've tried to be very specific and hope I've provided all info necessary.
First of all you must configure your MSSQL Express Server to respond.
To do that you must open SQL Server Configuration Manager (on Windows 8.1 just go in the upper right corner, hit Search and type: SQL Server Configuration Manager. If you are using Windows 7 you can find it on Start Menu).
On SQL Config Manager you must go to expand SQL Server Network Configuration and you'll see Protocols for (your DB instance). Click on that.
After you click on Protocols for (your DB instance) in the right window you will see Shared Memory, Named Pipes and TCP/IP. Double click on each and set them to Enabled = Yes.
Now your MSSQL Server must listen to standard port 1433. To do this double click on TCP/IP, select IP Addresses (Now you will see IP1 config, IP2 config, etc), scroll down to IPAll and set TCP Dynamic Ports to 0 and TCP Port to 1433.
Now restart your SQL Server Service. If don't know how to this, just reboot your computer. After reboot open command prompt and type netstat -a to see if your MSSQL is listening on port 1433.
Now in Visual Studio when you are connecting to your SQL Server on Server Name type server IP (your IP or 127.0.0.1) or you can select your SQL Server instance from dropdown list without any problems.
You can check this tutorial too: Allow SQL Server Express to accept remote connections
Alright, I finally solved the problem and not in a way people would think. First off, I want to thank everyone who responded with the intelligent answers, but we were off base on this one and I'm not sure why, but your responses ultimately led to my defeating this problem. I've been wrestling with this problem for the last 3 days almost exclusively - I don't like being beaten - and 1 entire night. I've uninstalled and re-installed several times and even got superstitious and waved a chicken bone - lol - at it but nothing worked! I've asked this question on several web sites and finally I went to a link that stated the .msi file was included with MS SQL Server 2012 Management objects I and was hesitant to download as they pertained to the 2012 version. So after tinkering to no avail I downloaded the 2012 CLR Types and Management Objects and looked in the Windows\assemblies folder and still no v 11. But I guess 2012 installation installed them in Program Files (x86)\Microsoft SQL Server\110\SDK\assemblies\Microsoft.SqlServer.Management.Sdk.Sfc.dll v11.0.2100.60. I ran VS 2013 and added the data source. After going through all this problem I'm wondering why Microsoft invents all these places to put things when one would work. Every version of windows from 3 to present has always been totally revised and I wonder for what. Improvements are okay but quit reinventing the wheel. Without your help I might not have ever found the solution and perhaps would have been an oracle or mysql guru or not. Your the men. Thanks all.
Do not connect to mdf, connect to the SQL Server and use MyEntertainmentDB database from there.
The MDF file is locked by the SQL Server for reading/writing data.
I just installed MS SQL Server 2012 (Express). I went through the whole install process from SQLManagementStudio_x64_ENU.exe (other things were already installed) with checking all the checkboxes, so I thought I had everything necessary.
When I try to connect to .\sqlexpress, I get a message saying "Cannot connect to .\sqlexpress". See below for message detail, I copied it from another question because mine is in Dutch :-)
Cannot connect to .\sqlexpress
I did some research through my friends Google and Stackoverflow, but none of the solutions work.
1. There is nothing in Database Engine -> Local Server Groups -> Register Local Servers (it says "No local servers of type "Database Engine" were found"
2. I cannot restart the services as I only have one "SQL related" service (SQL Server VSS Writer)
3. There are no services listed in Sql Server Configuration Manager -> SQL Server Services
Does anybody know what's wrong? Please let me know if you need additional details.
Thanks, a SQL Server newbie
The SQLManagementStudio_x64_ENU.exe as the name says only contains SQL Server Management Studio, which is the GUI used to manage servers. It does NOT includes any DB engine or anything else but the client tool, so it's normal that you don't have the service installed.
Look at the downloads at the official download website. The file named SQLEXPRADV_x64_ENU.exe or SQLEXPRADV_x86_ENU.exe are the full installs that includes both the client tools and database engine together. It's normally the best possible download I can think of from all the choices.
If I recall correct the file SQLManagementStudio_x64_ENU.exe only contains the management tools and not the server software. You need to download another file (SQLEXPRADV_x64_ENU.exe if you want the complete package with server and reporting services etc.).
See this page for more information
I assumed that you have completed whole installation process without any error.
It may possible that you have installed it with another instance name and possibly because of that you are getting this message.
Following thing you have to check.
Try to access on Same machine where you have installed SQL Server using Management studio.
Start menu or Search for SQL Server Configuration tool. At that tool you will find SQL server instance. name.
Make sure that your instance is running mode.
Which authentication mode you have choose during installation and take proper step during making connection
If above step will not work then please provide more detail.
You need to Download the SQL Server Express Edition with the Advanced Services option.
ADV - with advanced services (reporting services)
I'm really new to this, so I am probably making a simple mistake.
I need to make an OLAP cube using a remote database.
After I set up the dimensions and measures and create the cube, I can not get the cube to launch to the local server.
I keep getting the error,
"The project could not be deployed to the 'localhost' server because of the following connectivity problems : A connection cannot be made. Ensure that the server is running. To verify or update the name of the target server, right-click on the project in Solution Explorer, select Project Properties, click on the Deployment tab, and then enter the name of the server."
However, the local SQL server is running(from as far as I can tell), and I have no idea on how to go about fixing this. I've tried replacing "localhost" with "." and the IP, but that hasn't worked either.
Here's the guide I was following:
http://www.mssqltips.com/sqlservertip/1532/build-a-cube-from-an-existing-data-source-using-sql-server-analysis-services/
Maybe the SQL Server isn't really running? How can I check?
Or am I skipping over something important when I try to process the cube?
you need to deploy the cube to a SSAS instance. See here I have the SQL Server instance and the SSAS instance (check the icon to see the difference):
you can check if you have it running on the services:
if you dont have it, yo ucan install from the sql server installation CD
You need to change the target Server name as the remote sql server name or ip.
In BIDS right click on your project solution and select properties window. There you can give the server name as given below figure.
Hope it helps...
OLAP cubes will not deploy to a SQL server instance. They must be deployed to an Analysis Services instance. It will be listed as 'SQL Server Analysis Services' in your service list.
This is what solved it for me:
Copy the connection from the MSSQL Server Management Studio:
Project > Properties > Deployment > Paste:
"localhost" refers to the machine you are running the Business Intelligence Studio from.
You say you want to deploy to a remote server, so replace localhost with the server name or the ip address (e.g. "74.125.237.146")
to deploy a cube AS you need an SQL instance as source, and an SSAS instance as destination.
regards,
I got the same error while following that tutorial. I solved it by:
Double Clicking the Project Data Source
In the Impersonation Information Tab, I entered the credentials for the Windows user instead of using the service account.
Make sure you have the proper Server\Instance name instead of local host in the project deployment server.
One more reason can be Express version of SQL Server. Only standard version has Analysis Service.
In Microsoft SQL server go to registered servers and click on:
Analysis services icon -> open local server groups
Click right on your username for the server and
service control -> start
It will work ;)
I was implemented a windows application which is working perfectly.
The concept is to read an Access Database and export to MS SQL Server 2005 Database.
Now i want to make it as windows service and half way done. The problem is it is not working (Not updating the database).
The service was installed perfectly and running but not updating the database. I made that service as "Local Service", "Network Service", "Local System" and "User" bu not working for any of this type.
Can any one help me out for solving this.
The development environment is MS Visual Studio 2005, C#.NET, MS Access, MSSQL SERVER 2005 and Network supported Environment.
Thanks.
You could do this with Linked Server or an SSIS job running on SQL Agent which may well have been easier but... to tackle your question itself:
You mention trying different accounts to run the service - have you granted any of those accounts the appropriate rights on your target database to allow the service to update the data. Do they also have rights on your source (Access) database to read it.
Have you checked the Event Logs on the server and the SQL Server logs to look for reported errors, failed logins etc?
You could hook up the debugger to your running service to try and identify the problem whilst it's running or alternatively you need to write in some kind logging statements so that you can identify where your code is getting up to before it fails and log out the error message(s) so give you something to work with.