Having a data upload get "picked up" by SQL Server? - sql

I need to transfer some data over to another location so that it can get "refreshed" in their database system (SQL Server).
I'm a little unfamiliar with this, is SQL server able to refresh its own internal tables based on anything? For instance is it able to recreate/refresh tables based on the contents of .CSV files? Or would I need to move the data over in the form of a small Access database with tables or something similar?
What is the "correct" way to do something like this where you need to refresh the data of another server based on the content you have somewhere else?

Best way would be to use SSIS as Brad suggested.
But if you are not familiar with SSIS packages then you can opt for simple sql server job to upload data from csv files periodically. Please have a look in below links:
Schedule import csv to SQL Server 2014 Express edition
https://answers.laserfiche.com/questions/74591/Auto-Import-csv-into-SQL-Table

Related

Merge Tables between Databases

I would like to move all the rows inside a couple of tables from one SQL Server database into another SQL Server located in a different remote server. This means I cannot connect to both at the same time, so the exchange should have to be done via file or a similar procedure. The tables have identical column definition, meaning it is only the data inside what differs. Also important to note, I do not expect a full overwrite, but rather a merge into the second database.
You can use SQL Management Studios export/import tool. It can extract data in CSV file, so you can save it on a disk, after that change connection to the new server and run import with exported file. This should do a trick.
Here is a nice and quick tutorial:
https://www.youtube.com/watch?v=Vf6pluv0Lv4
Could you create a linked server?
http://msdn.microsoft.com/en-us/library/ff772782.aspx
use SSIS it will be good it can be automated as well as you can change your configurations also . tomorrow if you got different server you just have to change connection strings and if it is a daily task use SSIS .

Create a local DB and import csv or excel file

Due to circumstances beyond my control, I'm currently not able to create a table on one of my company's databases, and I got a project where I need to break down and get stats from a large data file. I can open it in Excel, but its not very happy about it. What I'd like to be able to do is create a local database where I could use the import wizard to import an excel file to a new table. Is this possible? If so, how would I do it?
SQL server has a free express edition of their database http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx. It probably has a cumulative data limit though (Oracle express does, I don't know much about sql server express).

update database table from csv file remotely

I have been asked by a client of mine if it would be possible for their warehouse to send a csv file of their stock to our server which then updates our sql server database automatically with the csv content. Aparently their sage system does this but im not sure if i can do it with standard sql server management studio 2008 i have on my server?
There are two ways that I use to do such tasks:-
Build an SSIS package to open/parse/import the data.
Use the OPENROWSET function. If the filename of the CSV is always the same, then it makes this option simpler.

How can I move data from one SQL Server to other?

I want to copy all my database to remote database server. I have access to server using SQL server management studio.
How can I do this? I have created script with data of old database and tried to run it on new server but it is taking too much time and returns different errors like duplicate key etc.
If this is a one time deal, you should download Redgate's SQL tools. They can handle this easily and are free to test for 14 days I believe. (http://www.red-gate.com) You might even find they are worth the purchase as I have. The tools you would use are SQL Compare (to copy structure) and SQL DAta Compare to actually copy the data.
Assuming that you can restore databases to your remote SQL server, you can use SQL Server backup and restore? They're available in SQL Server Management Studio. See http://msdn.microsoft.com/en-us/library/ms187510.aspx. It's very easy to use.
Other than that, you can try copying the database MDF and LDF files from your local database onto your remote database filesystem, then attaching to the MDF file on your remote database.
Those are probably the fastest ways that you can copy and entire database to a remote location that I can think of.
Try Database publishing wizard by Microsoft. Good enough for no very big data amounts.

create pdf files in sql server

All of our correspondence is done via database mail in sql server. The data for document generation and the rules to trigger the generation are all on sql server. We now have to create a pdf file. I was planning on using pdfsharp/migradoc to do it, but then we'd have to create document and time its readiness with sql server data state and mail state. It'd be nice if the db could handle everything.
Has anyone created pdf files directly in sql server? And if so, how.
take a look here: Create data driven PDF on the fly by using SQL server reporting service (SSRS)
I've not used it, but there is SQL2PDF stored proc. It uses sp_OA% code.
Google search
Blog article and duplicated on SQL Server Central (needs login)
SQL isn't the best place to do this of course, but if you have to I'd use CLR if possible.