Transfer table between two SQL Server databases [duplicate] - sql

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
SQL Server 2005 - Export table programatically (run a .sql file to rebuild it)
I always using xls files to transfer data between two tables. But this way is very horrible. Any alternatives? Note: There is no direct network connection between the servers.

You should look into SQL Data Compare from RedGate. It will make your life much easier. Per no direct network connection, you can save the comparison in a script, and execute it on the other server.

Related

How do I view an embedded RavenDB database? [duplicate]

This question already has an answer here:
Is it possible to connect to an embedded DB with Raven Management Studio
(1 answer)
Closed 5 years ago.
RavenDB server comes with a web UI Studio letting to look what's inside. But what's the way to take a look in an embedded RavenDB?
If you are running a test you can use the WaitForUserToContinueTheTest method. Otherwise I guess you'll need to start the http server yourself.

Deploying a Windows Form App in C# for multiple users with SQL Server. Alternatives for databases?

I'm working on a database driven program in Visual Studio 2015, in C#, Windows Form Application, and I'm using SQL Server 2014 for my databases, downloaded the most recent version from the MSDN site.
I've got it working well. But if I want other users on other computers and different versions of Windows, this would require them to have SQL Server installed, correct?
Basically the app is used for storing current medications, moods, a mood quiz, symptoms, etc.. and I store all the results in SQL Server databases. They can be edited, deleted, etc through the program's GUI. Do the users need SQL Server installed to use this app?
If so, is there an alternative to keeping databases without having to have the SQL Server connections, or is there a way to do this without the users having to have SQL Server installed? I don't want remote connections to me, I want it standalone.
Does this make any sense? If not, I can explain more. I know way back in the days of Visual Basic 4 I was making, reading and writing databases without SQL. But that was 16 years ago. So I'm wondering what the easiest solution to this is. Thanks!
In other words, you want a database that you can a) distribute to end users freely and b) that will 'connect' just to the copy of the database they have stored locally.
Here are a few options ---
SQLite over ODBC is as-easy-to-use as MSSQL, the driver can be found here:
SQLite ODBC
Use ConfigurationManager.OpenExeConfiguration to read / write your app config .xml file and use it as a key / value store. I can provide examples if needed.
Dynamically create an Access database, it should work as well as MSSQL for most things, with less overhead. Here's how:
Create an Access Database
Use SQLIte DLL. Details on SO
create-sqlite-database-and-table

Disconnected Access DB to collect info then upload to sql database [duplicate]

This question already has an answer here:
Update SQL Server table with local data
(1 answer)
Closed 8 years ago.
I am creating an Access Database that will reside on a Windows Tablet.
The user will take the tablet to locations where network and internet access aren't available, create entries into the local database on the tablet.
The database was developed on Sql Server 2008, then copied to local table to insure correct structure.
I can collect the data fine, my question is this:
When the tablet is back on the network, I want to use a button to upload the data stored locally to our SQL Server, then remove the data from the local database.
How do I connect the SQL Database (connection string info in VBA I assume - just don't know the syntax) and perform the upload when back on the network?
Thank you,
Steve
If you are talking about synchronising a local sql database on a table (surface ?) to say web based sql server you might want to consider the sync framework - see this post for more information on its use in mobile
mobile and sync framework

MS SQL Server with management studio - how to script a table with its data (as insert statements)? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Get script of SQL Server data
I want to move some rows from 1 table (on one server) to another (on another server).
The table schema is the same, what I need to do is generate some insert statements. Is there a way to do this using some built in / best practice way?
Import / Export seems completely extreme and excessive.
Thanks in advance.
Right-click on the database name and choose Tasks -> Generate Scripts. On the Scripting Options screen set Script Data to true.
You can do it with the publish wizard
Maybe it’s well-known, but new to me, you can just run “C:\Program
Files (x86)\Microsoft SQL
Server\90\Tools\Publishing\1.4\SqlPubWiz.exe”. This nifty little tool
can generate INSERT script very easily.
Reference here

Anyone know a program to automatically dump a bunch of test (dummy) data into a sql database? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Tools for Generating Mock Data?
I am running SQL Server 2005 and I want to dump some dummy data into a large table with about 50 columns (I did not design it :P) - anyone know a tool to do this automatically? I want the rows to have all sorts of different data, and I would rather not write a script if there is already a tool out there - thanks.
Check out Sql Data Generator by Red Gate.
Do you want the tool to generate the data, or just get it into the database? If you just want to be able to easily dump in some canned data, use Excel.
Edit: These options only apply if you already have data from another system that you want to import in. After re-reading your question I don't think my answer is relevant...
Inside SQL Server 2005 (and 2008), you have a few built-in (aka free) options to import data:
1) Management Studio
This is by far the simplest option for importing data.
1) Connect to your database inside Management Studio.
2) In Object Explorer, right click on your database then select Tasks -> Import Data
3) From here you can specify your data source, do some minor transformations on the columns, and specify what table(s) you want to dump the data to.
4) You can save this as a job in case you want to repeat this (even automate this) as a future task.
2) SQL Server Integration Services
You can use Business Intelligence Development Studio (BIDS) to create an SSIS project and have much more granularity over your data source, the transformations on your data, and how you want to import it into your destination database(s).
This tool takes some time to master, but is very useful once you get the hang of it.
And, like the previous option, SSIS packages can be put into a job and set as an automated task.
3) Command line BCP Utility
If you're interested I'd recommending Googling this option. It is a time consuming option, and there are easier ways to get data into a system. :)
I hope that helps.