Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a SQL Server database using dBeaver?

How to create a database in SQL Server 2014 using the dBeaver GUI tool?

Screenshot from dBeaver

like image 694
koverflow Avatar asked Dec 27 '17 15:12

koverflow


People also ask

Can I create database in DBeaver?

Make a new database: right-click on an existing one and click Create New Database. Right-click the database and click Tools > Execute script. Select the SQL file and click Start. You may need to restart DBeaver to see the schemas and tables.

How do I create a SQL Server database?

Use SQL Server Management StudioRight-click Databases, and then select New Database. In New Database, enter a database name. To create the database by accepting all default values, select OK; otherwise, continue with the following optional steps. To change the owner name, select (...) to select another owner.

Can I create my own SQL database?

Start up SQL Server Management Studio. If you want to create a local database, set the Database Name to . and the authentication type to "Windows Authentication". Click Connect to continue.


2 Answers

It isn't supported yet, as devs explain:

Database create not yet supported for SQL Server (will be added as a part of #810).

like image 165
Álvaro González Avatar answered Sep 19 '22 07:09

Álvaro González


You can create database by commands like below:

--create where
USE master;  
GO
--check if exists
IF DB_ID (N'MyDatabaseTest') IS NULL  
DROP DATABASE MyOptionsTest;  
GO 
--create database 
CREATE DATABASE MyDatabaseTest  
COLLATE SQL_Latin1_General_CP1_CI_AS  
WITH TRUSTWORTHY ON, DB_CHAINING ON;  
GO
--Verifying collation and option settings.  
SELECT name, collation_name, is_trustworthy_on, is_db_chaining_on  
FROM sys.databases  
WHERE name = N'MyOptionsTest';  
GO 

If you want to delete existing one, use below command:

IF DB_ID (N'MyDatabaseTest') IS NOT NULL  
DROP DATABASE MyDatabaseTest;
like image 28
slon Avatar answered Sep 20 '22 07:09

slon