Parsing Microsoft ODC file to connect to SQL Server database - sql

I have an Excel workbook that I inherited and it refreshes data from an external data source. The connection string is:
DRIVER=SQL Server;SERVER=XXXXXX;UID=XXXXXX;Trusted_Connection=Yes;APP=Microsoft Office 2003;WSID=XXXXXX;DATABASE=XXXXXXXX;Network=XXXXXX
Can I use this information or the ODC file to connect to the database to query the table within?
Thanks.

Related

Export Data from Azure SQL Server SP or table to Excel using Azure Resources

I am having few data which gets returned from my Store procedure or table from Azure SQL Server,
Client is having some formatted excel and I need to export data from SP to that formatted excel.
The excel has pre defined columns with different name than DB Column names .
Is it possible by using any Azure resources like Azure data factory or logic Apps to export data from sql server and append in the excel.
Through Azure Data Factory -Data Flow Activity we can achieve this.
Source here is SQL Database where column names are coming from Table:
Connect Sink(Target) and in the Mapping Tab uncheck Auto Mapping and Add Output column names as required at the target :

How to connect HSQL DB Manager to a Embedded Database

Hi i'm connection my HSQL Embedded db using HSQL Database manager using hsqldb-2.3.3.jar.
But when i connected with the db i can't see any tables.
The application working good and i can even tables values while running app.
Each HSQLDB file: database has a name. The files for the database all have this name but different extensions.
I this example the database name is learn_ware and it is stored in learn_ware.script and learn_ware.properties.
To connect to a file database, append the database name (without an extension) to the path of the database directory.

OpenRowSet returning only one result

I am using OPENROWSET and Microsoft.ACE.OLEDB.12.0 to retrieve data in SSMS from an Excel 2007 (.xlsx) file. When I execute the query I only get the title of the first column (Excel cell A1) and F2, F3, etc. for the rest of the columns and no data within the table. The Excel file contains data; however, OPENROWSET is not retrieving anything other than cell A1.
I have tried both
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=C:\filepath.xlsx','SELECT * FROM [Sheet1$]')
and
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=C:\filepath.xlsx',[Sheet1$])
I get the same result for both queries.
I have also tried using the Import/Export Wizard (64-bit) and when I am on the 'Select Source Tables and Views' and use Edit Mappings... I receive the following error:
Column information for the source and destination data could not be retrieved
-Unexpected error from external database driver(1).
**Additional information**
->Unexpected error from external database driver (1).(Microsoft Access Database Engine)
I have a 64-bit version of SQL Server that is being used. Also, this is an Excel file that I receive from an outside source. The other Excel files I receive from outside sources do not give me any problems when retrieving data using the same method. Additionally, I am using SQL Server 2008 R2 and the Excel file is located on the same drive as the SQL Server.
Any help is greatly appreciated. It would be nice if I could get this working so I can handle moving the data from these files over to a SSIS package.

Load Data form one SQL table to Multiple Excel sheet in SQL 2005

How to load Data form one SQL table to Multiple Excel sheet in SQL 2005 through SSIS
Use BI studio to create a new project.
Create a new data flow task.
From the toolbox drag an OLE DB Source and an excel data flow destination you need.
Choose the OLE DB Source and drag the destination arrow to the excel destination.
Click each datasource and configure the details.
In the control flow you can copy the flow as many times you need and change to excel file destination to another file.

How to backup transaction log after database backup everyday in SQL server 2005

How to backup transaction log after database backup everyday in SQL server 2005
Why not just use SSIS to backup the log, so it can backup, then copy it to where it needs to be.
UPDATE:
You can look at this question, it talks about how to go from SQL Server 2005 query to an Excel file:
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/DTS/Q_23090779.html
The useful answer is:
Create a stored procedure that will have the output you need to export in
excel.
In the DTS package add a SQL connection and an excel conection. SQL
conn should point you server and db
and excel conn your file. If it
doesn't exist just create one on the
fly.
Create the Transformation task betreen the SQL conn and excel conn.
Double click on the arrow and in the trasformation data task properties
window in Source tab instead of
Table/View pick SQL query. In the
panel below type EXEC sprocname, where
sprocname will be the name of your
procedure from step 1.
5.Click on Destination tab; if file/worksheet if doesn't exist will
open a dialog window for creation.
Edit if you want and click OK.
In Transformations tab define your trasnfromation by matching the
columns. 7 Run.
If you want to run this automatically you need in an ongoing matter what you need is to define a Dynamic properties tasl where you can edit the excel connection to generate a name that will have a timestamp, (you can use an sql statement as well) and then in an Active X task create/copy the file from an existing structure file.
So
Dynamic Property Task ---> ActiveX task (copy from struct file to new generated name file ) ---> SQL conn ------> Excel conn.