Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
chetansonvane
Starting Member
5 Posts |
Posted - 2012-06-06 : 08:23:26
|
hi frnd can you tell me why generate this error .query:--select * into Test12..Invmst FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 5.0;Database=D:\Book.xls;HDR=YES', 'SELECT * FROM [Sheet1$]') ---bcp pubs.dbo.authors out c:\Testing.xls -c -S"TITANIC\LOCAL" -Usa -P Exec Master..xp_cmdshell 'bcp "Select * from Test12..invmst" queryout "D:\Book" -c' ----------------------------------------------------------------error:--Msg 15281, Level 16, State 1, Line 1 SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online. This conversation is saved in the Conversations tab in Lync and in the Conversation History folder in Outlook.chetan sonvane |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-06-06 : 08:37:58
|
The answer will be in the english language.The answer will just repeat what you have posted as the error message.So what do you want to know? No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
chetansonvane
Starting Member
5 Posts |
Posted - 2012-06-08 : 07:15:12
|
1.open excel sheet save in .xls format [only in create by excel 2003]2.data->get external data->from microsoft query->appear a box and select ->odbc of your data->ok3.open sql server 2005 and select a particular database and->right click->import data->appear a box and select a , datasource->excel->filename[only .xls]4.to give your server id and password->select the all data to be import-then finish5.your data as been successfully import.6.to fire query select * from sysobjects xtype='u' 7.then your data as been generate successfully 8.try to your self9.any problem to call 9904811703chetan sonvane |
|
|
|
|
|