Deploying .bak file from SQL Server in Mac - sql-server

Ok, I know this may sound stupid but, is there any way to deploy a database from a .bak file exported from SQL Server into any kind of Mac software? If there, which one?
If that is not possible, is there a way that I could deploy that database if I first deploy it into SQL Server and export it, maybe in a different way?
Thanks in advance.

The bak file created by SQL Server is a database backup file, and you will only be able to restore it to a Microsoft SQL Server instance.
If you want to port a MSSQL database to some other RDBMS, your best bet is to use a tool for migrating the data directly from the running MSSQL datbbase to another running RDBMS. Perhaps a third party tool, or you could build an SSIS package to do the migration.
You can create a MySQL database and try the MySQL migration tool.
But just given a .bak file, you will not be able simply to read the file; you will need to extract data from a running database instance.

Related

Restore SQL Server database from a script

I have a database stored on SQL Server with my web site at a regular windows hosting solution. I need to migrate to Azure.
The only backup mean I have is to use SQL Server Management Studio and do a Task -> Generate scripts that saves schema and data in a sql file. I did it and I got a 260Mb file.
My question is about importing that to Azure. Can I do it in Mngt Studio too? How?
Thanks
If you have exported it all to scripts, yes, you can run them against your SQL Database. However, before you do that I'd suggest looking at https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/. It might shed some light on other options that will include verifying compatibility. The BacPac method might be better than the scripts.
To answer the specific question of using SSMS with Azure SQL DB, this article https://azure.microsoft.com/en-us/documentation/articles/sql-database-manage-azure-ssms/ shows how to make the connection.

How to identify a sybase db file (how to know which software which version)

i have a sybase database *.DB file
i dont know which software created it and which version
i want to know which sybase engine is used and which version
and is the version of the engine related to spesific software
i mean can i use any client with this database engine
also i want to know a brief steps to how to install the sybase engine and the client software and restore the database created from the DB file
Sorry for these many questions as i am a MS SQL developer but i need to open this sybase DB and convert it to MS SQL :(
Thanks in advance
.db is typically used by Sybase SQL Anywhere, and Sybase IQ. Since you are tasked with converting it to MS SQLServer, it's a safe bet that the file is from SQL Anywhere.
You can find out about installing, and upgrading .db files here
Once you have the software installed, and the database running, you can use Sybase Central, the management GUI, or dbunload on the command line to extract the DDL you need to build your MS SQLServer Environment.

upload Code First DB to web server

I have created my first website and I have used Code First to create the database on SQLExpress.
Now I wish to publish my website on a server, which only accepts SQL Server databases.
How can I do this? Is there a function in EF5 or VS to let me create the database, and take a .bak file and upload it on the server?
Or is there a better way to go around this?
Thanks
I do not know if this is the right approach however I found an easy way to do it.
I created a new SQL Server 2008 database with the same name as my database, and imported the data from the database in the App_Data folder. Then I changed my connectionstrings to point to this database (in SQL Server) and could then transfer it on my server

How do I backup the data in SQL Server 2008 on a third party host?

I have a SQL Server 2008 database that is hosted by a third party host (heart internet).
How would I go about backing this up?
I used SQL Server Management Studio Express 2008 to create the tables within the database, but the backup options within this app seem to be only of use if you have direct access to the server machine (which I don't)
It's also worth noting that I am using change tracking - I presume this data would be lost should any backup be restored?
Thanks In Advance!
(PS - SQL Server 2008 novice here!)
If they allow you to run backups to a particular folder that you have access to you can just do it with the regular backup command:
backup database dbname to disk = 'y:\users\YourHomePath'
If they do not do that you might want to use the Database Publishing Wizard to script out your database (depending on the size this might be very slow)
You can create a .DAT file into a shared disk and to download it through FTP.

Easiest way to copy an entire SQL server Database from a server to local SQL Express

I need to copy an entire database from a SQL Server 2005 on my server over to my local SQL Express in order to run my application for a presentation. What is the fastest/easiest way to get this done?
EDIT: I have very limited access to my server so I don't think I can access the backup file that I could create so that is out.
If the database is not too big, you could use the Database Publishing Wizard.
This is a free tool from Microsoft which creates a complete SQL script of a database for you (not only the tables and stuff, but all data as well).
You can install the tool on your machine, connect to a remote server and let the tool create the script directly on your machine.
You can download the Database Publishing Wizard here.
Apparently the link above doesn't work anymore in 2019.
That's probably because in newer versions of SQL Server Management Studio, the functionality of the Database Publishing Wizard is included out-of-the-box, so there's no need to install it separately.
It's now called the Generate and Publish Scripts Wizard, but it does exactly the same.
You can right click the database -> Tasks -> Generate scripts. Here you can select one, multiple, or all objects. Then in the 'Set Scripting Options' step of the wizard, click Advanced. In here set the property 'Types of Data to script; to Schema and Data.
Having done these steps, make sure you publish to a file. Because only file can handle large amounts of data.
Now you should have all your objects, tables, and data scripted. Now start running the scripts and viola!
Back up the database on the server and then restore it locally in SQL Express.
EDIT: If this is part of your work, surely you can get someone in networks to get you a backup..?
If you can login to both servers (the Express and the 05 Server) using SQL Server Management Studio then you can do a DB Restore from one database to the other. No need for backup files at all.
You can use SSIS's database copy wizard, but it's not quick at all. Is there a DBA there that you can ask for the backup file? That will probably turn out to be the fastest way.
Depending which versions of SQL Server you are using, you might get some mileage out of the SQL Server Database Publishing Wizard from Microsoft. I've had mixed results with this tool in complex environments, but for most simple database scenarios it is a great tool.
An example of a scenario where I ran into difficulties was a DB with multiple distinct schemas, each with their own owner and extreme separation between the tables (don't ask...). As I said, though, most other scenarios have been fine.
Save your database as a sql script
EMS SQL Manager (for example) allows you to backup your database as a script in a .sql file. It is then possible to run this file against any other SQL server. Just update the first line of the script (CREATE DATABASE ....).
You can even fully parameter the script in order to include data from complete or filtered tables.

Resources