How to copy from local db to compact db with WebMatrix? - sql-server

I am using Microsoft WebMatrix and SQL Server 2014 Managment Studio. My question is how to copy data (records in all rows, all columns)
from SQL Database (certain table) made in SQL Server and stored
locally to the compact database created in Webmatrix?

Try this:
INSERT INTO NewDatabase.NewTable
SELECT * FROM OldDatabase.OldTable

Related

How to copy table from SQL Linked Server to SQL Server and maintain key constraints?

I have an SQL Server installed on a local Windows 10 machine - I'm using Microsoft SQL Server Management Studio to interact with it.
I also have a DB2 database hosted on an IBM i machine and I've created a Linked Server in SQL Server Management Studio to represent it. I can connect to the Linked Server and can query/pull data from it successfully.
I'm trying to copy particular tables from the Linked Server and insert them into a Database/Schema in the SQL Server - I can do this successfully but unfortunately, it appears that in the process of copying the table over, none of the constraints (particularly in my case, the key constraints) are maintained.
Is there a simple way to copy over tables from a Linked Server to SQL Server (in SQL Server Management Studio) while maintaining key constraints?
The following query is an example of what I'm using to copy the tables over (one-by-one):
SELECT *
INTO SQLSCHEMA.SQLTABLE
FROM LINKSERVER.LINKDATABASE.LINKSCHEMA.LINKTABLE
The easiest way is to use proper tool for it like SSMA:
Microsoft SQL Server Migration Assistant (SSMA) is a tool designed to automate database migration to SQL Server from Microsoft Access, DB2, MySQL, Oracle, and SAP ASE.
Migrating DB2 Databases to SQL Server (DB2ToSQL)
SQL Server Migration Assistant (SSMA) for DB2 is a comprehensive environment that helps you quickly migrate DB2 databases to SQL Server or Azure SQL DB. By using SSMA for DB2, you can review database objects and data, assess databases for migration, migrate database objects to SQL Server or Azure SQL DB, and then migrate data to SQL Server or Azure SQL DB. Note that you cannot migrate SYS and SYSTEM DB2 schemas.

Can't see data in SQL Server database table

I can't see data in SQL Server database table. The column is of nvarchar(MAX) not null.
It stores json string in string format.
When I run query Select * from table, I can see the data in output window, but can't see when I open table using edit top 200 rows.
You need to update your SQL Server Management Studio (SSMS) to the latest version. This problem occurs if you use SSMS v. SQL 2008 for working with SQL server 2014.

create a database in SQL Server 2014 can be mounted in SQL Server 2005?

create a database in SQL Server 2014 can be mounted in SQL Server 2005?
If you have a DB in SQL SERVER 2014 (with data) and you want to restore in a SQL SERVER 2005 you need to "migrate" all data (tables, indexes, constraint, views, etc). A great tool to do that is Visual studio Data Tools. You can use Schema and Data Sync. It worked very well for me.

linked server compares between Oracle and SQL Server

We are doing a migration from Oracle 10g to SQL Server 2014. Once I set up the linked Server connection in SQL Server to the Oracle DB will I be able to run a statement like the following:
select * from linkedservername...schema.table
except
select * from Servername.database.schema.table
Not all queries will be this easy as I'll have to do some data manipulation on the oracle side. Will I need to use Oracle syntax for that or once I have the linked server set up will everything be in T-SQL for querying purposes?
Thanks

migrate sharepoint data to a table in sql server database

I have two questions:
1) I wanted to migrate some data that is in sharepoint (listview) to a table in MS SQL Server 2008 R2. The data is not huge 50 -60 rows of data with 6 columns. Also, whenever the data is updated in sharepoint, it has to automatically update in ms sql server 2008R2.
2) Can the data be queried from sharepoint and updated in sql server using Stored Procedures?
Regards,
Jude

Resources