Quantcast
Channel: SQL Server Data Access forum
Viewing all 4164 articles
Browse latest View live

SQL Linked Server Provider for COBOL

$
0
0

Working with SQL 2008 or 2012, I have a legacy COBOL dbms to which I need to connect via SQL Server.  I'm thinking I need to set up a linked server but I don't have the appropriate provider to facilitate defining the connection.  How/where can I obtain the driver/provider?

Any assistance would be greatly appreciated.

Bob


Bob Bonta


SQL Server 2008 R2 10.50.1075 - cannot connect from win7 odbcad32

$
0
0

Hi,

I have an issue with a SQL Server 2k8. I cannot connect from win7 odbcad32 but I can connect from an win XP machine.

The error I get on the win7 machine is connection failed 'sql state 28000 server error 18456'. I connect with no problem from the XP machine except when I specify the port. If I specify the port on the windows xp machine using odbcad32 to test a connection, i get sql state: 'HY000 Cannot generate SSPI context.'

Things I have tried:

1. Removing and re-adding the account.

2. http://support.microsoft.com/kb/811889/en-us

3. http://www.katieandemil.com/microsoft-sql-server-error-18456-login-failed-for-user

SQL Error Log shows: State 11 - Valid login but server access failure 

Any help would be appreciated.

Thank you.





A SQL Server MVP or MSFT Eng should be replying soon as well. Hope this helps. Frank Garcia *** Please select "Vote As Helpful" if the information provided was helpful to you. If an answer to your issue solved the problem then please mark it as"Propose As Answer" located at the bottom. Thank you. ***

Sending data from Logman to SQL Server 2012

$
0
0

Wanted to use logman to collect performance data and send the data into SQL Server 2012 database. Tried both "SQL Server Native Client 11.0" or "SQL Server" 6.01 drivers in configuring System DSN but failed to connect to SQL Server 2012. The account running the Logman has admin access to SQL Server 2012 DB.

Was able to get data in SQL Server 2008 R2 using SQL Server 6.01 driver in DSN. Any suggestion on getting this to work in SQL Server 2012?

Thanks.

Yuantai

JDBC driver choices for SQL Server going forward?

$
0
0

hello everyone 

given Microsoft JDBC driver still does not fully support Java 7 (JRE 7 is supported but JDK 7 is not) it appears to me that this product is virtually deprecated/dead.

Given there is a lot of Java/JDBC software out in the wild running on SQL Server, what are the mission-critical choices for JDBC for SQL Server going forward?

What are the robust, high performance JDBC drivers that support Java 7 and SQL Server 2008 and 2012 and forthcoming 2014?

I found this one: http://www.datadirect.com/products/jdbc/sqlserver/index.html?cmpid=ddblog 

Opinions? Any others?

thanks in advance



Yuri Budilov

CREATE DATABASE permission denied in database 'master' when Logging into my website using the login feature that VS 2012 provides

$
0
0

I am using Visual Studio 2012 to develop my website.  I am using the Login.aspx and Register.aspx pages that Visual Studio 2012 has included in my project to log into my website.  The Login and Registration pages work fine on my local machine but when I put the website on the Server I get this error when trying to log into my website. 

CREATE DATABASE permission denied in database 'master'. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database 'master'.  

This is my connectionstring: 

 <add name="DefaultConnection" connectionString="Data Source=datasource,port;Initial Catalog=aspnet-WebApplication1-20130628150851;Integrated Security=False;User Id=userid;Password=test;Database=test.accdb"
       providerName="System.Data.SqlClient"/>   

         

           

 

How to get data faster?

$
0
0
Hi all,
We have SQL Server 2008 and in that we have a database which has views created, these views are coming from various tables and views totalling around 20(15 tables and 5 views). We had data from 2009 thru 2013. 2009 thru 2012 were accessed pretty fast from .Net application, but 2013 data is taking too long to load. So I crated table out of these views and now the data is coming faster. I am not sure this is the right approach. Is there any other way to make it faster? as it is not feasible to create tables out of all views, also memory issue in SQL Server itself. Please suggest what else can be implemented? I am not a DBA, I am a developer and maintaining this application.

Thanks for any suggestion.

Gaby

Error in creating a job step / SSIS package

$
0
0
Hello All-

I am having an issue with one of the installation ( Microsoft SQL Server 2008 R2 (SP2) Data Center Edition (64-bit)).
Whenever , I create a SSIS package from BIDS or New Job Step from SSMS , I am getting the following error.

Please advise.





===================================

Error creating package (Microsoft Visual Studio)

===================================

Retrieving the COM class factory for component with CLSID {AA40D1D6-CAEF-4A56-B9BB-D0D3DC976BA2} failed due to the following error: 80070005. (Microsoft.SqlServer.ManagedDTS)

------------------------------
Program Location:

   at Microsoft.SqlServer.Dts.Runtime.Package..ctor()
   at Microsoft.DataTransformationServices.Wizards.Dts90WizardSaveNewTask.CreateAndAddPackageToProject()
   at Microsoft.DataTransformationServices.Wizards.Dts90WizardSaveNewTask.Execute(WizardInputs wizardInputs)



===================================

Retrieving the COM class factory for component with CLSID {AA40D1D6-CAEF-4A56-B9BB-D0D3DC976BA2} failed due to the following error: 80070005. (Microsoft.SqlServer.ManagedDTS)

------------------------------
Program Location:

   at Microsoft.SqlServer.Dts.Runtime.Package..ctor()
   at Microsoft.DataTransformationServices.DTSExecUI.Controls.LoggingCtrl..ctor(IDTSExecViewManager treePanel)
   at Microsoft.SqlServer.Management.SqlManagerUI.DTSJobSubSystemDefinition.InitializeControls()
   at Microsoft.SqlServer.Management.SqlManagerUI.DTSJobSubSystemDefinition..ctor(CDataContainer dataContainer, IMessageBoxProvider messageProvider)
   at Microsoft.SqlServer.Management.SqlManagerUI.JobStepSubSystems..ctor(CDataContainer dataContainer, JobStepData data, IMessageBoxProvider messageProvider)
   at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.get_SubSystems()
   at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.InitializeStepCombo()
   at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.InitializeData()
   at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.OnInitialization()
   at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SetView(Int32 index, TreeNode node)
   at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SelectCurrentNode()
   at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.InitializeUI(ViewSwitcherTreeView treeView, ISqlControlCollection viewsHolder, Panel rightPane)
   at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control)
   at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(ISqlControlCollection control, IServiceProvider provider)
   at Microsoft.SqlServer.Management.SqlManagerUI.JobSteps.newJobStep_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Unable to save data to aspnet tables that I added to my SQL Server database

$
0
0

I am re-creating an old Interdev web application, for the new version using VS2008 with a SQL Server database.  I have quite a bit of experience with VB6 Windows applications and Access databases, but very little with web apps and SQL Server.  It's a whole new confusing world where I feel at sea.

I am trying to utilize the built in login controls that normally create a special aspnetdb database.  As I need to interface the login data with my existing database, I need to combine the two databases.  I found a method for adding the aspnet tables to my database and I have run aspnet_regsql.exe which I thought would identify the aspnet tables within my database to the application.  

Still, when I run the createuserwizard control, it does not add a user to the aspnet_User table that is inside my database.  The freestanding aspnetdb database has sprung back to life a couple of times.  It is easy enough to add users to it.  At one point I had deleted it from the data connections but neglected to exclude or delete it from the project and the application continued to add records to it instead of my database.  Now I have it deleted from the project, however when I try to add a new user, I am unable to use user names that were added to aspnetdb, so it is apparent that the application is still somehow directing the new user records to the aspnetdb database. 

How can I get rid of aspnetdb?  Is there another step to adding the aspnet tables to my database?  They are present and visible in my data connection but with these blasted automated login controls, the process by which data is added to tables is not visible or under my control as far as I can see.  How can I direct the data where I want it to go?



LouatMonaco


Please write : All Illegal characters in sql

$
0
0

hi

Please write : All  Illegal characters and text in sql

like = ; - Automotive - ....

SQL Compress data between client and server for a simple query

$
0
0

I wonder whether it is possible to activate a built in data compression mechanism on SQL, hopefully the newer 2012 version has that functionality, it should have it. Problem is that some users are running large queries that return about 10 to 20 MB of data in a query, if it is compressed, like using ZIP, it is reduced to up to 2MB which is good. 

thanks

GetSchemaTable method and DataType property missing from documentation

$
0
0

Hi,

If we check GetSchemaTable method in 4.5 version of .NET and compare with 4.0 version of the same documentation we will notice, that DataType property is missing, although apparently it still works.

Do you know if this omission is intentional and this property is going to be removed or it's an error in the Docs?

Also, when I run SQL Server Profiler, I can see that call to this method executes SET FMTONLY ON command while documentation to SQL Server 2012 (this is the version I am using) says that this should not be used in production code. Does it mean that this implementation is subject to change?

I would appreciate a detailed answer on this question.


For every expert, there is an equal and opposite expert. - Becker's Law


My blog


My TechNet articles

SqlDataAdapter Insert poor performance

$
0
0

I wrote some payroll processing software which ultimately writes data out to a SQL Server table usingSqlDataAdapter.Insert(). (I am using the default Insert command created withSqlCommandBuilder().) I am using the .NET Framework 4 on Windows 7, writing to SQL Server 2008 (not R2) Std Edition x64 SP3. The problem is, I am only seeing about 2 Mbps throughput from my PC (Dell Optiplex 990 Core i7) to the SQL Server (NICs on my PC and the server are GB Enet but there are some 100Mbps switches in between for an unfortunate bottleneck, but still - 100Mbps). I can copy a file from my PC to the server where SQL Server is running and I have no throughput problems - I can get very close to 100 Mbps throughput there. I put the database on another LAN SQL Server running 2008 R2 and there I manage to get 5 Mbps throughput, but still - very slow. My PC's CPU is near 0 when theInsert() command is running. I tried to increase and decrease the Packet Size parameter in the SqlConnection.ConnectionString property, but that did nothing.

If I perform a SELECT * FROM <table> from SSMS on my PC to the SQL Server in question, I can get about 45 Mbps sustained throughput.

I'm not sure where to look next for the culprit - any suggestions appreciated.


stored proc parameter type mismatch

$
0
0
When my classic asp calls stored proc, parameter types are
not specified. This is fine most of time, but if this funcionality is highly
used, applications gets error sometimes.

Error:
sql native client
procedure or function [sp name] expects parameter [parameter name], which was
not supplied.

This is not a replicatable issue, but happens from time to
time.
I guess the problem is SQL server guesses parameter type every time,
and there is small chance it guesses incorrectly.

I can fix this issue by
specifying parameter types, but there are hundreds of places to be
fixed.

Is there a better way to fix this? SQL server connection
settings?
Thanks you.

Error on creating a view

$
0
0

Getting this error when a tried to create  index, does this mean I can not create index on this view. The column I am trying to create is a int type.

 

Cannot create index on view 'products.dbo.view_test'. It contains text, ntext, image, FILESTREAM or xml columns.

create uniqueclusteredIndex idx_viewtest1on view_test(Id)

Gaby

MYOB as linked server

$
0
0
 Hi everyone.
This applies to MYOB database linked to SQL Server. MYOB is a database based on a data file opened by an executable database engine. I'm trying to query MYOB from SQL Server using the MYOB ODBC driver as a linked server.

I've created the linked server and be able to query the MYOB using the openquery statement. What I want to do is querying the moyb using a server.database.schema.table notation to directly join the tables with my local tables. Otherwise, I guess I could join my local tables with the result of the openquery statement and then apply the proper filter, and that's is what I want to avoid beacuse I guess it will return the whole remote table to my server and then apply the filter. Am I right?

For example I've foundf this:

    UPDATE Local
    SET data = R.data
    FROM OPENQUERY(MYOB, 'SELECT key, data FROM Table') AS R
    JOIN Local AS L
    ON R.key = L.key

Even though it is a table join, I guess the ODBC driver will return the whole "Table" and then SQL joins that in-memory table with the local one. Am I wrong?

The problems is that MYOB is not a database server. So I don't know the server name, database name nor schema to use, I just know the table names. How can I query without using the openquery statement?

Thanks

ODBC tmeout Expired

$
0
0

I have over 200 concurrent users as average,

Couple of times a week for 5 minutes connections time out,

and i see this information in a Error Tracking table in one of the columns like this

: [Microsoft][ODBC SQL Server Driver]Timeout expired

and then it automatically starts working fine

Any sugestions


k


SQL event 33002 module dbo.proc_getrunnableworkitems can not be found

$
0
0
the event log is getting this recurring error.
SQL event 33002 MSSQL$microsoft##SSEE can not be found. it is either not installed or corrupt.
module dbo.proc_getrunnableworkitems  the specified resource type can not be found in the image file.

module dbo.proc_mss_cleanup
the specified resource type can not be found in the image file

winss.exe version 2.5.2900.24 stopped working

The ram is getting maxed out, which i believe is due to the SQL error.
i have searched the technet archives and forums but no luck so far in finding what might be causing this.

the system it is on is a proliant DL 380
running microsoft SBS 2008 64 bit.

any information or advice would be greatly appreciated.
thanks


Windows 2008 Server and SQL 2012 login Win Authentication using Microsoft.ACE.OLEDB.12.0 returned message "Unspecified error"

$
0
0

I have recently installed 64 bit SQL 2012 SP1 on 64 bit Server 2008 R2 Standard  under an evaluation license.
I have created a windows user account "someone" with administrators privilege.
I have installed 64 bit Microsoft.ACE.OLEDB.12.0.
I have created SQL accounts with Windows authentication for "Administrator" and "someone" assigning role sysadmin.

Configured SQL using

USE [master]
GO 
sp_configure 'show advanced options', 1
GO
RECONFIGURE WITH OverRide
GO
sp_configure 'Ad Hoc Distributed Queries', 1
GO
RECONFIGURE WITH OverRide
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'AllowInProcess' , 1
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 1
GO

I have a "dbase" file D:\WebTest\ShapeFiles\Lines.dbf created by an application E.S.R.I. ArcMap.
When I log into Windows using account "Administrator", run SQL Server Management Studio 2012 using Windows authentication,  the following SQL returns expected data.

select * from  OPENROWSET( 'Microsoft.ACE.OLEDB.12.0'
        ,'dbase IV;Database=D:\WebTest\ShapeFiles'
        ,'SELECT * FROM Lines')


However, when I log into Windows using account "someone", and try SQL Studio with Windows Authentication I get:

OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Unspecified error".

I created SQL Authentication account "isadmin" with SQL sysadmin privilege and when I run SQL Server Management Studio 2012 using SQL Authentication for "isadmin" the query returns expected  data.

What is needed to get other than "Administrator" Windows Authentication logins to run the above?

Cross domain ADSI Linked Server Queries Failing

$
0
0

So I've been digging around trying to find an answer to this, but I think our scenario is slightly different from what I've been reading.

We have a SQL 2005 server sitting in domain globalspec.net.  Services are started under a globalspec domain user service account.
Our AD 2008 R2 Servers are also sitting in globalspec.net

We have created a linked server for ADSI access using a forced security context of Globalspec\IntranetServices

When I log in to SQL Management Studio as a local user, I can run an openquery and everything works just fine.

However, when I log into SQL Management Studio as a user in the IHS domain and try to run an openquery, i get the following error:

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "ADSDSOObject" for linked server "ADSI" reported an error. The provider indicates that the user did not have the permission to perform the operation.
Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "
select  givenName,
				sn,
				sAMAccountName,
				displayName,
				mail,
				telephoneNumber,
				mobile,
				physicalDeliveryOfficeName,
				department,
				division
from    'LDAP://dc=globalspec,dc=net'
where   objectCategory = 'Person'
        and
        objectClass = 'user'" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI". 

To me, this makes no sense, since I'm forcing the LDAP lookup to use a globalspec domain account.

So I create a new ADSI2 linked server, but changed the security user to an IHS account.  When I query this, I only get the Message 7321, Level 16, State 2, Line 1 as above.

I've gone to the globalspec.net domain and delegated read access to the IHS user, as well as the IHS service account.  I have verified that both these accounts can read from the globalspec.net Active Directory.

Any help is greatly appreciated!

Max

Move SQL Server 2008 Data Base to other Computer

$
0
0

Hi everyone,

I'm really new using SQL Server but have some experience on VB, so maybe the question could be very simple for you.

The question is, How can i move the data in one computer to other computer?

Details,

I have an application developed on VB 2008, the application request user name and password and maybe connects to a Data Base. The code in the connection is something like this:  

connection = "PC's name"\SQLEXPSS   initial catalog = DBKardex  true

The computer where the application runs has SQL server 2008 Express and R2.

When i move the application (Aplication.exe) to other computer, or even in the same computer, start session whit other user name, the application doesn't connect and shows an error connection message (can see this part in code, when connection failed).

I just want to move the application to other computer, obviously i'll change the connection code whit the new computer's name, i have no problems whit this part, I've already changed the computer name, and changed the code and it works (in the computer where the application works).

But i don't know where is the data the application access to (because it does and there is data like users and other data), i suppose is on C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL.

I want to move the application (no problems) and the Data (problems), to use this application in other computer

Computers.

The original computer is 64 bits, windows seven. The destination computer is 32 bits, windows XP SP3

Viewing all 4164 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>