All Questions
Tagged with export sql-server
73 questions
0
votes
1
answer
80
views
Microsoft SQL Server Import Export Wizard on Remote SQL Server
Is it possible to run the SQL Server Import/Export Wizard purely on a remote server (e.g., from one database to another on the same remote server)?
If I setup the source/destination connections in the ...
-1
votes
2
answers
125
views
How to increment as 001,002 etc In SQL Server
i have created an sp to export scripts i stored in a table to text files. What this sp do is if I give 100 as count then each file will have 100 scripts from the table. i am saving the file name as ...
3
votes
3
answers
20k
views
In SQL Server, how do I save the results of a query to a txt file?
In SQL Server, how do I export the results of a query to a txt file. I tried tools>options>results to file. But this appears to have saved the Messages the query generated instead of the Results ...
0
votes
1
answer
634
views
SQL query to script all objects from a database in order
i have a script to get all objects (functions ,views ,triggers and procedures from a database . I need to create this in another database . The problem is some procedures may have another procedures ...
1
vote
3
answers
2k
views
How can I export all of the Tables from a given Database in SQL Server to tab separated files?
I tried using SSMS but it only lets me export one file at a time and I'd prefer not to create an SSIS package. Is it possible to do this in PowerShell?
I need the headers of each table in the file as ...
0
votes
1
answer
187
views
SQL Server export data from synonyms table to excel
I tried to export synonyms table from my server database to excel using SMSS, I choose database, then I choose export, and manage source and dest, then I choose Excel File and I rename sheet 1 to name ...
3
votes
1
answer
126
views
How can I transfer the entire content of several tables to another database, not in the same network?
I have a set of 12 tables, about 4 million rows total, that I need to move four times per year. The database server they are coming from can NOT directly talk to the server that they are moving to. ...
-2
votes
1
answer
140
views
Sql 2008 export table csv with headers and data
I need to export a table in SQL Server 2008 with headers and data delimited with | ( pipes ), but some information inside of this table have , ( comma ) and CR or LR, it's possible to put it a "&...
2
votes
1
answer
5k
views
What is the best way to export/extract varbinary images in a SQL Server database to flat file via t sql, anything better than sp_OA methods?
I've been tasked to extract images saved in SQL Server (as varbinary) to flat files via t-sql. I haven't done ETL work for over a decade and I can't recall any other method of doing this via t-sql ...
0
votes
1
answer
192
views
SQL Server backup file 15GB is empty when downclick trying to export single table from this sep4 a weekly backup
SQL Server backup file 15GB no Backupset selected to be restored?
is empty when downclick trying to export single table from see attached why is that
is it permissions?
seeTheBackupScreenShot
0
votes
1
answer
807
views
Take a "slice" of a SQL Server database: for all tables, get only the rows that join (directly or indirectly) to a specific row
For audit purposes, I'm trying to obtain a copy/export of a DB but including only the rows from each table that have relevance to a small collection of rows in some table. So every row of every table ...
1
vote
4
answers
2k
views
How to write and read files from client machine SQL Server 2019
I need to prepare a stored procedure which export as many files as many tables I have in schema, but files need to be written on local machine on specific path e.g. C:\Temp\ not on SQL Server ...
3
votes
2
answers
2k
views
Database Mail has incorrect encoding of CSV attachment
I have a procedure that generates a resultset, which I attach as a CSV file attachment in sp_sendmail. However, the resulting file is encoded UCS-2 LE BOM (according to notepad++). This causes the ...
2
votes
0
answers
1k
views
Export and split QUERY results in multiple files
I would like to know if it's possible to export and split query results in multiple files. Let's assume I have a query returning 100 results and I want to save the results in 5 different csv files (20 ...
1
vote
1
answer
2k
views
What is the best way to include a large amount of configuration data in a SQL project?
I have a BIDS SQL Server Database Project with a database that I publish dynamically to various servers (SQL2016). It initially starts blank and everything is parameterized. Everything is in Azure ...
1
vote
1
answer
514
views
Is there a way to specify which schema the database task "Export Data-tier Application" exports for the other entities besides the tables?
I noticed in the Export Data-tier Application database task, you can specify which schema to export data from in regards to tables, but I also want to exclude certain schemas for the other object ...
4
votes
1
answer
1k
views
MS Azure remote back up with SqlPackage
I wanted to do an export of a .bacpac file from MS Azure database, from local machine, with command like this:
sqlpackage.exe /Action:Export /ssn:tcp:<ServerName>.database.windows.net,1433 /sdn:...
1
vote
1
answer
5k
views
exporting a sql view to a csv file
Whilst I can just about script to pull data via queries, I'm finding it very difficult to figure out how to export the results of a query to a .csv file and save in a network storage location (novice ...
0
votes
0
answers
360
views
How to copy/export part of my SQL database
So I have this huge live SQL database. I want to do some testing so I thought to export it, however, it is around 200 GB which is impossible to export.
I thought maybe I export the schema of it and ...
-1
votes
1
answer
4k
views
Export all SSIS packages from SSISDB
We have quite a few SSIS packages on SQL Server 2012 deployed to SSISDB, you can right-click on a project and select 'Export' saved as an *ispac file, however, is there a script to Export All Projects ...
-1
votes
1
answer
220
views
How to update the first row in the exported query from sqlcmd
I am trying to find an easy way of updating the first row in the export of a sqlcmd query to CT_EVENT,,,,,,,,,,,,,,,,,,,,,,,,. I found this article in stack overflow which builds the csv format. I've ...
0
votes
1
answer
917
views
Exporting a Database schema and triggers [duplicate]
I have a small problem at work. Our DBA went on a journey of self-discovery ... I am very happy for him and I hope he finds what he is looking for. But he left us without any information about how the ...
7
votes
2
answers
4k
views
How to back up an entire database to text files
If it’s stupid and it works, it’s still stupid.
The hullabaloo about GDPR got me thinking - if you had to go into your backups and modify/delete data, how would you do it? Cracking open a .bak file ...
1
vote
1
answer
497
views
How to query large sets of data using server resources to the max
I am planning of retrieving large amounts of data (100+ million rows) from SQL Server to Azure Data Lake Store and I need it to be done in shortest time possible. I would like to ensure that when I ...
0
votes
1
answer
505
views
Import database from MSSQL export dump on Ubuntu localhost
I have an export file from an online database server that I need to use to generate the database locally on my system. I'm running MSSQL 2017 on Ubuntu 16.04.
The export file has Program(application/...
3
votes
6
answers
18k
views
SQL Server: SSMS "Save Results As" creates CSV that Excel mangles
Using the Save Results As option, shown below.
CSV looks good!
But when Excel opens/imports it:
Long strings are mangled as numbers (if the data is largely numeric)
Dates are not detected properly
...
1
vote
2
answers
2k
views
How to export data from a SQL Server database with hundreds of tables and timestamp columns?
I have a SQL Server database with hundreds of tables and they all have timestamp columns. I don't have access to backups or the server's file system. To use the export data wizard, I have to go into ...
7
votes
3
answers
5k
views
Very large SQL Server 2016 result sets (over 75 GB) to a CSV file?
What is the best way to get very large SQL Server 2016 result sets (over 75 GB) to a CSV file? The engineers need this output to look for correlations.
The bcp route for a 73.5 GB file filled up ...
1
vote
1
answer
142
views
Objective, SQL Server 2005 and exporting data using **bcp**
I was tasked w/ getting data out of an obsolete document management system running on top of an instance of MS SQL Server.
Trying to export > 30000 documents through the app is not an option, as it ...
5
votes
1
answer
3k
views
Informix DB export to Microsoft SQL Server 2016
I have an Informix Database and a Microsoft SQL Server 2016.
My task is to dump the whole Informix Database and export it to the Microsoft SQL Server Database.
I installed the Informix SDK 4.5. I ...
2
votes
0
answers
610
views
Export SQL View to CSV flat file. SSIS job stuck
I created a database view with the desired data and format. I used SQL Server Import and Export wizard to create a flat file export procedure and saved it to SSIS package.
The data exports correctly ...
3
votes
3
answers
7k
views
Copy whole database from SQL Server to SQL Server using linked server
I am using SQL Server 2014 Management Studio installed in my system. And using linked server I have connected to a linked server.
Now here I need to copy whole database from linked server to my ...
3
votes
1
answer
2k
views
How SQL Server determines the data transfer rate
We are having some issues with the data transfer rate when extracting data from SQL Server. Our scenario is as follows:
SQL Server 2008, in a Windows Server 2003 with 32 GB RAM (located in Guatemala)....
4
votes
1
answer
2k
views
Fastest Way to Move Data from Current Database for Multiple Tables to New Database?
This is my first question and post so let me know if I can improve. I'll err on the side of providing too much information.
I'm a fairly new DBA at my company, less than two years with the DBA team, ...
1
vote
1
answer
3k
views
oracle expdp similar method to export datas for SQL Server
On our oracle databases, we regularly run database export through expdp/impdp utility (wrapped for readability):
$ expdp user/[password] SCHEMAS=<nom_schema> DIRECTORY=expDatapump
...
1
vote
2
answers
2k
views
Export SSRS report to CSV
I would like to export an SSRS report to a CSV file. Sounds simple, but I do not know how to add double quotes to the column headers in the exported CSV file. For example:
"UserName"|"UserAdd"
"Mike"|...
2
votes
2
answers
8k
views
Create a monthly job to export from SQL Server 2014 to Excel
There are a lot of questions here asking "how to export from SQL Server to Excel", but every answer, together with stuff I know, is giving me problems (64bit system here).
We have a developer that ...
58
votes
3
answers
39k
views
Why is a .bacpac file so small compared to a .bak file of the same database?
I've been doing backups of my SQL Server 2014 Express databases for import to other servers and noticed a difference in file size between .bacpac and .bak.
Why is a .bacpac file so small compared to ...
1
vote
0
answers
730
views
How can I create a Web-service to share data from SQL Server?
Our organization has an externally hosted website that displays data from a monitoring system. Data is currently provided by FTPing csv files.
The data is stored in a SQL Server Database. The ...
3
votes
1
answer
1k
views
File size when extracting from SQL Server to CSV
I am attempting to extract a table to CSV using BCP from SQL Server 2014 and the size of the file once the data is extracted is actually larger than the size of the database itself.
One thing to note ...
1
vote
1
answer
557
views
SQL Server 2014 Not recognizing 64 bit drivers for Office
I have a SQL Server 2014 virtual machine. It is a 64 bit version of SQL Server or a 64 bit Windows Server. The SQL Server software was installed before I was hired by the Sysadmin. He choose to have ...
-1
votes
1
answer
2k
views
How to fix invalid length in all tables of MS SQL Server 2008 (R2) database
Task is simple: I want to export all SQL Server database tables using SQL Server Management Studio 2008 R2 to MySQL (or any other format that MySQL can take, e.g Excel, CSV).
I have tried the ...
2
votes
1
answer
783
views
In SQL Server, are there any other options of data Import and Export
I've been working with SQL Server since SQL Server 7. So I know about BCP, Bulk insert, openrowset and SSIS.
My question is a simple one:
Do you know of any other ways to Import/Export data using ...
2
votes
2
answers
3k
views
Export a table and zip with password
I would like, from TSQL, to use a view to extract data from a table, output it with BCP, then use non 3rd party tools to ZIP it with a password and AES encryption. Optionnally, I could use a 3rd party ...
6
votes
1
answer
524
views
Exporting SQL Server DB from my laptop to AWS RDS
I am following this tutorial from AWS to export a SQL Server database that currently sits on my laptop to Amazon Web Services RDS. In particular I am trying the Generate and Publish script wizard ...
2
votes
1
answer
4k
views
Dumping stored procedure result to a text file programmatically
How can I save stored procedure execution result to a text file? I need to do this from SQL script (not Management Studio nor external utility) and I need to preserve correct characters encoding (...
1
vote
1
answer
845
views
SQL Server to XML files alternatives
I am currently looking for an alternative to writing a large, complex XML file based on a known specification. Currently the file is written in t-sql as a stored procedure. The output is in a results ...
2
votes
4
answers
3k
views
Move result of a query from one server to another table on another server
What are my options in moving result of a query in one server to another table on another server? Data contains ~400.000 rows so it won't be a quick one. (Both of them are SQL Server 2008 R2)
...
2
votes
2
answers
12k
views
Export SQL Agent jobs with steps and scripts
I recently saw some kind of export of SQL jobs configured under SQL Server Agent that I would like to achieve as well.
Unfortunately I don't have any trace to author of that report to ask him\her ...
2
votes
2
answers
3k
views
Powershell Restore Azure SQL Database to local with Restore-Database
I have written a powershell script that uses Start-AzureSqlDatabaseExport & Get-AzureStorageBlob to export my Azure DB to a bacpac and download it locally, the next step is to restore the bacpac ...