|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Thursday, February 14, 2013 12:01 PM
Points: 743,
Visits: 900
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 6:33 PM
Points: 32,889,
Visits: 26,757
|
|
Good, short, sweet coverage of OpenDataSource and some of the key advantages to using it and when to use it... Nicely done!
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, October 03, 2012 7:41 AM
Points: 46,
Visits: 84
|
|
Hi,
Have you found a way to do this in SQL 2005 64bit?
Apparently there is a MSDASQL provider being released in Longhorn for 64bit , but I haven't been able to find any other information.
Your help will be much appreciated!
Regards, GG
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Thursday, February 14, 2013 12:01 PM
Points: 743,
Visits: 900
|
|
GG (12/13/2007) Hi,
Have you found a way to do this in SQL 2005 64bit?
Apparently there is a MSDASQL provider being released in Longhorn for 64bit , but I haven't been able to find any other information.
Your help will be much appreciated!
Regards, GG
I have been searching for that ever since my company got a 64bit server, last week. My current ugly work around is to use linked servers to execute the procedures on a 32 bit server and then bring the results across to the 64 bit server.
--- Timothy A Wiseman SQL Blog: http://timothyawiseman.wordpress.com/
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Monday, April 29, 2013 10:28 AM
Points: 46,
Visits: 262
|
|
My current ugly work around is to use linked servers to execute the procedures on a 32 bit server and then bring the results across to the 64 bit server.
Same for me, No JET support in 64 bits. About SQL2008? is it going to work in either 32 or 64 bits?
BI Guy
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, September 27, 2011 6:31 PM
Points: 32,
Visits: 174
|
|
It definitely helps me to understand about OpenDataSource. I'm working on a project to see how to create sample SQL databases (32bit/64bit SQL Server 2005/2008 including Express Edition) for a .NET application. I'm trying to figure out the following items:
1. How to create the databases? e.g. - using sql scripts - backup/restore - detach/attach 2. Where to store the sample data? e.g. - xml - mdb - text files - csv - backup - detached files 3. How to import the data? e.g. BCP BULK INSERT Import/Export Wizard SSIS OPENROWSET OPENDATASOURCE OPENQUERY SqlBulkCopy Backup/Restore Detach/Attach
What are the pros and cons (especially what datatype cannot be imported) in each option? What data source should I create (e.g. text file, XML, Access database(MDB), Excel file (CVS)) if portability is a must? Ideally, the data importing can be initialized from a .NET 3.0/3.5 application instead of thru SSMS or command prompt.
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Thursday, February 14, 2013 12:01 PM
Points: 743,
Visits: 900
|
|
pcwc66 (12/13/2007) It definitely helps me to understand about OpenDataSource. I'm working on a project to see how to create sample SQL databases (32bit/64bit SQL Server 2005/2008 including Express Edition) for a .NET application. I'm trying to figure out the following items:
1. How to create the databases?
2. Where to store the sample data?
3. How to import the data?
What are the pros and cons (especially what datatype cannot be imported) in each option? What data source should I create (e.g. text file, XML, Access database(MDB), Excel file (CVS)) if portability is a must? Ideally, the data importing can be initialized from a .NET 3.0/3.5 application instead of thru SSMS or command prompt.
Most of those questions revolve around exactly what you are trying to do, but for a few rules of thumb:
1. If you are moving a preexisting database to a test environment I would use backup and restore. It tends to be one of the easier ways and more complete ways. If you are creating something new or highly modified, I would use t-sql scripts as they will give you the most direct control.
2. How you export the data depends on who you are sending it to and what they can read. As a general rule of thumb, csv files are simultaneously the smallest way to store the data and one of the most widely accepted since they can be easily read by a variety of programs including straight text editors and they can be imported into almost anything. The downside of course is that they do not include within them information like data type or relations between groupings of files that can be more thoroughly expressed in a richer format. For a richer format, you may wish to use access files or create a sql backup and send the entire backup file, depending again on your exact intent.
3. When it works, bulk insert is almost always one of the fastest and most efficient ways of importing, but it only works on certain file types formatted in certain ways and it has very little fault tolerance. Also for rarely repeated imports, there is nothing wrong with just using the SSIS or DTS wizards. I tend to use opendatasource for a lot of the automated imports in procedures because it provides more flexibility and more fault tolerance than bulk insert while remaining pure T-SQL and not requiring outside programs.
--- Timothy A Wiseman SQL Blog: http://timothyawiseman.wordpress.com/
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, September 27, 2011 6:31 PM
Points: 32,
Visits: 174
|
|
Tim,
Thanks for prompt reply on my questions. Besides reading your article, I have been reading other articles regarding importing data to SQL Server. This article about SqlBulkCopy http://www.developer.com/net/asp/article.php/10917_3702826_1 is another good information and may applicable to my case since I'm dealing with .net application.
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Thursday, February 14, 2013 12:01 PM
Points: 743,
Visits: 900
|
|
PCWC66, thanks for pointing out that article. It is one of the best best primers on SqlBulkCopy that I have seen. It is definitely a great technique for the right circumstances, but there are times when it is desirable to keep things T-SQL pure or nearly so.
--- Timothy A Wiseman SQL Blog: http://timothyawiseman.wordpress.com/
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 5:32 PM
Points: 125,
Visits: 453
|
|
I'm in SQL 2008 64bit clustered this is my unhappiness
Error/Information message I receive
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered.
Query I'm running
SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0', 'Data Source=C:\SqlServerInstances.xls;Extended Properties=Excel 8.0')...[Customers$]
Am I missing something? Have they renamed the provider to something else, or simply removed it .
End of day so tired come back with a fresh brain tomorrow in the mean time if you got something please share!
|
|
|
|