Import and Export Data Flashcards
1
Q
Besides backup and restore, what’s another way that you can move data from one server to another?
A
You can DETACH and REATTACH it.
EXEC MASTER.DBO.SP_DETACH_DB @DBNAME = N’DATABASENAME’
CREATE DATABASE [DATABASENAME] ON ( FILENAME = N’MDF’),(FILENAME = N’LDF’) FOR ATTACH
2
Q
What are the GUI ways for importing/exporting data?
A
IMPORT FLAT FILE
IMPORT DATA
EXPORT DATA
COPY DATABASE
3
Q
What is the t-sql syntax for BULK INSERT?
A
BULK INSERT [TABLENAME] FROM 'C:\PATH' WITH ( FIELDTERMINATOR = ',', --DELIMITER ROWTERMINATOR = '\n', --NEW LINE FIRSTROW = 2 --WHERE DATA STARTS )
4
Q
Which SQL Program creates a package for IMPORT/EXPORT DATA?
A
SSIS (SQL SERVER INTEGRATION SERVICE)