Loading data to Remote SQL Server Database - sql

I need some suggestions about a problem in hand. I receive some report containing some financial transactions in Excel files. The Excel data needs to be loaded to a SQLServer Database running behind fire wall. The file is transmitted to a Windows machine which does not have access to the SQL Server over port 1433.
So is there any other option to load the Excel content (we can convert it to XML if need be) other than web services.
Is it possible to use XMLBulk load under such circumstances?
In case web services is the only option what is the best practice for bulk loading data through web services.
Thanks for sparing you time.

You can use SSIS in order to convert data of your excel file to SQL Server.
SSIS run on the server and must be access to your excel file from network.
In this method windows firewall not effect to your process.

Related

Leverage current SSMS environment and create a "LOCAL DATABASE"

I currently have my tables all connected to a server on my company's network with views built off of those tables.
I want to recreate this environment on my client's local desktop. I currently upload my excel tables to the server so I would like to connect this local environment directly to the excel files.
Is there a feature of SSMS that would allow me to do this, or any alternative DBM services that would allow for this?
Thank you.
I would recommend the SQL Server Import/Export wizard. It allows you to create a database complete with tables directly from an Excel file. You can find more details here: https://www.mssqltips.com/sqlservertutorial/203/simple-way-to-import-data-into-sql-server/

Importing XML files to Azure SQL Database

I have a large amount of XML files that I transfer via ftp to an azure website folder on a daily basis. I currently use c# to transfer the data to azure sql server tables. However, it is extremely slow.
Is there a way I can run an Azure SQL job to bulk import these files and if so, how do I access the files in the web apps folder?
I know how to do this on a standard SQL server with XML files residing on a share drive but am unsure how to do this in azure.
Currently, we do not support any T-SQL interface to read files from blob store or container. So you have to push the data from outside of SQL Server.
One option is to use Azure Automation to run your code periodically or based on a schedule. See post below on how to use Azure Automation:
http://azure.microsoft.com/en-us/documentation/articles/automation-manage-sql-database/

Windows Form Application and SQL Server Hosted?

If our sql database was hosted externally on an sql server website and we were connecting to it via a windows desktop application, how to get around the issue, if the internet was not working.
Is there a way to keep the data local so the application still works, and replicate the changes to the sql server once the internet is connected?
If you want to access the data localy when the internet is down, you will need a local database. You can replicate the data between the 2 databases

Why cant I create a database with mdf file?

I have a feature in visual studio which I have never really understood.
I am able to 'right-click' on the App_Data folder and then I am able to select 'Sql Server Database'. I dont really understand how I can create a db using just an mdf file? I thought the sql service was responsible for manipulating these files? And that you have to create the db using the 'sql management studio' interface?
Im confised as to how we can essentially just have a lone file and run a db from it for a website?
You're application is still connecting through the SQL Server service but it can instruct the service to attach to a specific mdf file at runtime through a connection string. e.g.:
"Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;"
All SQL Server databases are represented as one (or more) .mdf files and usually .ldf files as well (ldf is the log file, mdf is the data file.) An .mdf file is a file but it is highly structured and maintained by SQL Server. The way SQL Server uses this file is very different from serving up CSV data, as a simple example. SQL Server breaks the file into pages and serves the requests for reads and writes via this paging system. It is indeed like a file system within a file system. If you think about it it does all make sense. The data has to get persisted to disk and that disk persistence has to come in the form of a file or files.
When you installed Visual Studio you also installed SQL Server Express. This gives you the ability to create and use SQL Server databases.
If you were to deploy your application you would then also need to have a SQL Server (Express) install on the web-server you were using (at least because you don't want to use your development database server in production).

how to open multiple connections on multiple servers in the same ssms instance using batch file

I have a lot of sql server 2008 servers with many databases on each server.
I usually forget which database is on which server.
I want to create a batch file named after the name of the database that opens a connection to this database in the currently opened SSMS instance and not in a new instance.
I found a better solution than creating a batch file to handle my problem.
I've registered all my database servers in the Registered Servers window under one Server Group and exported it to a file.
When I need to connect to an instance of them in the Object Explorer I just double-click the instance in the Registered Servers window.
When I need to write some sql code to be executed on an instance of them, I create a new Sql Server Scripts project, add my connections to the project and add sql files to write and save my daily scripts.