Can't create database in SQL SSAS - ssas

I installed Microsoft SQL Analysis Service because I need it to run a forecast analysis from Excel using the Data Mining Plug-in.
When I open MS Management Studio and connect to the SSAS I don't know how to create a new database.
When I right-click over Databases there is nothing like Create Database or New Database.
This is the image of my problem:

Well... I solved my problem reinstalling the suite selecting all of its options.
I still don't know what may cause this problem if not chosen in the instalation options but now I have the New Database option and could finish my job.
Thanks.

I managed to solve this problem by switching Analysis Services from Tabular to Multidimensional mode:
Stop SQL Server Analysis Services service
Go to the config folder, e.g. C:\Program Files\Microsoft SQL Server\MSAS15.SQL2019\OLAP\Config
Copy file msmdsrv.ini to another folder (you can't edit it here directly)
Open the copied file and search for the DeploymentMode xml tag
Set the value to zero
Save the file, copy it back to the Config folder
Start the service

You can use SQL Server Management Studio to create a new, empty database on an instance of SQL Server Analysis Services.
To create an Analysis Services database
Connect to an Analysis Services instance.
In Object Explorer, expand the node for the connected Analysis Services instance.
Right-click the Databases node of the Analysis Services instance and select New Database.
In the New Database dialog box, in Database name, type the name of the new database.
In Impersonation, provide impersonation information for the new database.
In Description, type the optional description for the new database.
Click OK.

Related

Is it possible to change default ComputeModel for create database with Azure SQL Server

I tried to create a database in Azure Sqlserver. "CREATE DATABASE" SQL command works. But it use default "General Purpose" as ComputeModel. Is it possible to use other option as default one.
I found the power shell command: New-AzSqlDatabase which I could use to create database with give ComputeModel. But I do not want to that way.
My target is: System admin define the default template such as ResourceGroupName, ComputeModel, MinVcore, MaxVcore etc... And developer or DBA could run SQL Command to create database without touching Azure setting at all.
Is there anyone could give me some suggstion?
Thanks.
With the latest Gen 5 hardware in place, we are making a change to the default database configuration and the default elastic pool configuration for all new Azure SQL databases. Starting May 31, 2019, the default configuration will be a General Purpose 2 vCore database or elastic pool provisioned on Gen 5 hardware.
In SSMS, you can edit the script to create new database with the price tier which you specified.
Fore details, please reference this tutorial: Script objects in SQL Server Management Studio
This tutorial teaches you to generate Transact-SQL (T-SQL) scripts for various objects found within SQL Server Management Studio (SSMS). In this tutorial, you find examples of how to script the following objects:
Queries, when you perform actions within the GUI
Databases in two different ways (Script As and Generate Script)
Tables
Stored procedures
Extended events
To script any object in Object Explorer, right-click it and select the Script Object As option. This tutorial shows you the process.
Hope this helps.

SQL to copy database and data on to a dev machine

I'm looking for a way to duplicate an existing database, tables and data onto a different development machine. Using SQL server 2008;
I have several tools i usually use for duplicating databases or i just restore a database dump, but i cannot use any of these. I have no direct access to the database machine i can logon via SQL enterprise manager and run queries stored procedures etc. But i have no access to the file system so i'm unable to create or copy a database dump. I cannot install or connect any tools to the database as i have to logon via a remote desktop. I also only have access to copy text files on and off the network.
I would like to run a script to generate a script to create the tables, views stored procedures etc and a script to populate the tables with some data.
I need to create a test environment so i can run tests and develop new features without affecting the live DB.
Assuming you have access to the database via SSMS, this is the approach I would take, though it could be time consuming:
Right click on the Database
Hover 'Tasks'
Hover 'Generate Scripts' and complete the process, it's self explanatory.
And from there it will generate a script for the Database architecture. This is the quick portion.
Next download Visual Studio and get the Integration Services add on. Using SSIS packages you'll be able to select all data from each source table/database and then insert the data into the destination table/database. Hope this helps you get on the right path.

Change Dataset access database Visual Studio

I've created a windows application with connected to an access database. Now I am re-using my code and project for a new application, and need to change the database for the new Access database, different columns and all.
Is there any way of replacing it on my project? I changed it in properties but can't see the dataset in my Forms to change at all. Will I need to go 1 by 1?
Right click on data connections in the server explorer, select add connection. Your installation may default to Sql Server, click the Change button to the right of Microsoft SQL Server (SqlClient) and select Microsoft Access Database File (OLE DB).

Creating a local database from server database in visual studio

I have a rather large database I am working with and I am about ready to break something. To prevent this affecting live data, how would I use the live database to setup a local database? Not sure if this is even possible but I do know you can setup a local db.
You can create a SQL Server Data Tools database project type, then right click the project file and do an "Import..." to import the database to your local machine. Then you can deploy the local DB and it will be available in the SQL Server Object Explorer locally. This way you don't have to install SQL server on your machine - everything's in Visual Studio. Hopefully you are developing with a small set of data locally.
Answer
Use Visual Studio's Data Comparison tool to synchronize data to your target database from your source after you've created the database (schema only, no data) in your local database server.
Steps
From the Visual Studio's SQL Server Object Explorer:
A. Create the local database
Add two SQL Server Objects: One that connects to your production server and one that connects to a local (development/testing) server. If you need help setting up a local server then take a look at SQL Server LocalDB
Add a New database in your local server to receive the data (don't over think this step).
B. Migrate the Schema
Right-click the source (production) database and click Schema Compare...
From the SQlSchemaCompare tab that opens, use the Select Target dropdown to select your local database as the target.
From the SQlSchemaCompare tab, click Compare.
Uncheck everything in the comparison results except for the Tables, Views, and Procedures (unless you know what you're doing) then click Update.
C. Migrate the Data
Right-click the source (production) database and click Data Comparison...
Follow through the prompts to select the Tables to migrate then click Finish.
From the SQlDataCompare tab that opens, review the comparison results (it should make sense to you) then click Update Target
That's it! Either your local database is ready with data, or you confused your target/source and wiped out all of your data in production. Either way, you're done for the day.

Create db from db project

Does anyone know how to create an entire database from a visual studio database project? Rather then running logs of smaller scripts individually.
Thanks
In VS express you do the following- It should be similar in the other versions but I don't have them in front of me.
Open Database Explorer (Ctrl-Alt-S)
Right Click "Data Connections" > "Add Connection"
Set 'Data Source' To Microsoft SQL Server Database File
Enter a name for your new Database
Choose your authentication method
It should confirm the creation of the database from there...
In Database Explorer Expand your Database and right click tables > Add new table and so on
It looks like I completely misunderstood the question. If you are trying to generate a script from an existing project for export the Database publishing wizard may do what you need.
http://www.microsoft.com/downloads/details.aspx?FamilyID=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en
Are you using vs2008 team edition? If so use the db edition and you can use schema compare to create tables, along with stored procedures, views, etc.
http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&displaylang=en
The other way I have done is to publish the database, which will create a large sql file for schema and/or data, and then you can execute that in SQL Server Management Suite.