log in failed connecting vb2008 to sql server 2005
DAX IFERROR function in SQL SERVER
I am am new to DAX formulas.
What is to be done to use any DAX function in SQL SERVER procedure. When i am simply using ISERROR function in SQL then i am getting this error:: 'IFERROR' is not a recognized built-in function name. Am i required to add some library or anything? Pls share.
declare @x int=10; declare @y int=0; declare @c int; print IFERROR((@x / @y),Null);Code can be something like this,i want to return null if the result is erroneous.
linux connectivity sqlcmd works but c code does not
This question has been asked before by others, "answered" and moved, but no real answer. I have Linux driver 11 set up and am trying to connect to a Windows machine with sql server fromhttp://www.microsoft.com/en-us/download/details.aspx?id=28160 on fedora 19x64. If I use sqlcmd on Linux terminal with -S Server..., I connect, but no matter what I seem to do with an adapted C program that was provided by a MS person on a blog http://blogs.msdn.com/b/sqlblog/archive/2012/01/26/use-existing-msdn-c-odbc-samples-for-microsoft-linux-odbc-driver.aspx. It fails at the
// Connect to data source
retcode = SQLConnect(hdbc, (SQLCHAR*) "SQLCMD", SQL_NTS, (SQLCHAR*) "Test1", 5, (SQLCHAR*) "Password1", 9);
with changes to the arguments for me like
// Connect to data source
retcode = SQLConnect(hdbc, (SQLCHAR*) "trogw", 5, (SQLCHAR*) "XX", 2, (SQLCHAR*) "XXXXXXXXXX", 10);
That -H fails to connect on sqlcmd but -S works makes me think something is amiss with the connection string in the c code, or the character width/encoding is not right....
It would be nice to see someone's working connection code.
connect to SQL with jdbc and a windows AD account
I am trying to connect to a SQL database from my machine but with a different windows AD account. The server is set to mixed mode and my code is this.
String pPSSDBDriverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String pPSSDatabaseName = "MG_Staging";
String pPSSDBConn = "jdbc:sqlserver://DLKMS025:1433;Integratedsecurity=SSPI;UseNTLMv2=true;Domain=AD;Trusted_Connection=yes";
String pPSSDBUserId = "RB373";
String pPSSDBPassword = "#######";
Class.forName(pPSSDBDriverName).newInstance();
pPSSDBConn = pPSSDBConn + ";Initial Catalog=" + pPSSDatabaseName ;
System.out.println("start ******* " + pPSSDBConn);
try {
DBconn = DriverManager.getConnection(pPSSDBConn, pPSSDBUserId, pPSSDBPassword);
my connection string is : jdbc:sqlserver://DLKMS025:1433;Integratedsecurity=SSPI;UseNTLMv2=true;Domain=AD;Trusted_Connection=yes;Initial Catalog=MG_Staging
I get this message [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user 'RB373'.
Error: 18456, Severity: 14, State: 6. –Attempting to use SQL authentication with a windows account.
Random SQL Error "invalid connection string attribute"
I have been using SQL Server 2008 R@ Express for about 6 months. It has been working great for my Windows Desktop application with the exception of this random error.
Error: -2147467259 : Microsoft SQL Server Native Client 10.0
Descr: Invalid connection string attribute
I will randomly receive this error from my application. I cant seem to find a pattern or an exact cause because everything in my system seems to working as usual. Could it be something in my connection string?
ConnectString = "Provider=" & SQLNCLI10 & ";" & _
"Persist Security Info= True" & ";" & _
"OLE DB Services = -2" & ";" & _
"User ID=USERNAME" & ";" & _
"Password=" & MYPASSWORD & ";" & _
"Initial Catalog=" & MYDATABASE & ";" & _
"Query Wait=-1;" & _
"Data Source=" & PCNAME/MYINSTANCE
TDSSNIClient init failure
I started getting this error when I tried to start my local SQL Server yesterday and nothing I do seems to help:
Error: 17182, Severity: 16, State: 1.
TDSSNIClient initialization failed with error 0x2, status code 0x35.
Error: 17182, Severity: 16, State: 1.
TDSSNIClient initialization failed with error 0x2, status code 0x1.
Error: 17826, Severity: 18, State: 3.
Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
Error: 17120, Severity: 16, State: 1.
SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
The only thing I did recently was move the My Documents folder from my local machine to a folder on a network share (to make sure my docs are backed up) via a right click on the My Documents folder in the Start menu, then pick the new location. I've since moved it back, but the above error persists.
Also, when I try to configure the server's protocols, I'm not able to enable any of the protocols. I can right click the protocol and click enable, then I get the error that says it'll take effect when i restart the service, but then in the display, it still says disabled. Refreshing doesn't change the status. The client protocols are enabled though.
Any help would be greatly appreciated (since the service never successfully starts)...
Importing Access 2013 database to SQL Server
hi
When I try to import a table from the access database to SQL Server it gives a following error
what would be the reason
thanks
TITLE: SQL Server Import and Export Wizard------------------------------
Could not connect source component.
Error 0xc0202009: Source - Products [1]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.
Error 0xc02020e8: Source - Products [1]: Opening a rowset for "`Products`" failed. Check that the object exists in the database.
------------------------------
ADDITIONAL INFORMATION:
Exception from HRESULT: 0xC02020E8 (Microsoft.SqlServer.DTSPipelineWrap)
The database [ABC] is not accessible (ObjectExplorer)
Hi,
I am getting an error while accessing the database ABC (which I Created.) and the error is below.
The database is not accessible (ObjectExplorer)
The database ABC is not accessible. (ObjectExplorer)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.DatabaseNavigableItem.get_CanGetChildren()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.GetChildren(IGetChildrenRequest request)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)
I am not able to access the tables in the SQL Authentication mode but able to access in Windows Authentication mode.
Please Help
Thanks in Advance
Wrapping a TransactionScope
Just wondering if there are any issues or side effects to doing something like this :
public class ScopeLock : IDisposable { private TransactionScope scope; public ScopeLock() { this.scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() { IsolationLevel = IsolationLevel.ReadUncommitted }); } public void Dispose() { scope.Complete(); scope.Dispose(); } }
And then using it like this:
using (var scopeLock = new ScopeLock()) { var result = model.Clients.FirstOrDefault(c => c.Email == email); }
Anyon see any downsides to this? Thanks.
Get data from foxpro
Hi All,
How can I migrate all data from Foxpro 9 database to sql server 2012.
I installed the OLE DB for visual fox pro.
I try to create a link server as:
exec sp_addlinkedserver 'VFP','','MSDASQL',null,null,'DRIVER={Microsoft Visual FoxPro Driver};SourceDB=c:\PROJECTS\ACCOUNTS\mydata.DBC;SourceType=DBC;NULL'
No error after the connection but when I open the tables i got an error:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "VFP". (Microsoft SQL Server, Error: 7303)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.2100&EvtSrc=MSSQLServer&EvtID=7303&LinkId=20476
-------------------------------
Also I try to import the data using "Import and Export Data Wizard", I can see and select the OLE DB visual foxpro but it hangs as the picture attached.
Any ideas in how to do this import?
Thanks!
SQL 2012 and Access 2010
Hello,
We recently upgraded to SQL 2012 on one of our machines but our users are using Access 2010. Can anyone tell me if there is an update that can be applied to Access to get around the message below?
"This Version of Microsoft Access does not support design changes with the version of Microsoft SQL Server to which your Access project is connected."
Thanks,
Matt
A connection could not be established to (local) in sql server 2000.
Hi,
I am getting below error while connecting sql server 2000 enterprise manager
A connection could not be established to (local).
Reason: SSL security error
ConnectionOpen(SECDoClientHandshake())..
please verify SQL server is running and check your SQL Server registration properties(by righticlicking on the(local)node) and try again
please suggest me a solution on above error.
Retrieve a list of fullname and email address
Retrieve a list of full name e-email address in in the table with SQL code based on Windows server 2012 and AD account. Every user has a AD account
Problem:
What is the name of the database, table and column to locate their full name and e-mail adress in SQL server?
Information:
I'm using SQL server 2012 with Windows server 2012.
Client to Server MSDTC connectivity Issues - Need help interpretting DTCPing results
Working on getting MSDTC to work between Windows 7 SP1 and SQL 2008R2 server SP2. Both client and server can ping each other by NetBIOS name. Both are part of the same domain.
Running DTCPing getting a couple of erros before it fails. Having no luck resolving this.
Server log reads as follows:
++++++++++++++++++++++++++++++++++++++++++++++
DTCping 1.9 Report for Server1
++++++++++++++++++++++++++++++++++++++++++++++
Firewall Port Settings:
Port:50000-55000
RPC server is ready
11-17, 09:02:47.663-->RPC server:Server1 received following information:
Network Name: Server1
Source Port: 50012
Partner LOG: Client1.log
Partner CID: A67C83D2-3F38-4CF9-92A3-246A37F8EF20
++++++++++++Start Reverse Bind Test+++++++++++++
Received Bind call from Client1
Network Name: Server1
Source Port: 50012
Hosting Machine:Server1
11-17, 09:02:47.945-->Trying to Reverse Bind to Client1...
Test Guid:A67C83D2-3F38-4CF9-92A3-246A37F8EF20
++++++++++++Validating Remote Computer Name++++++++++++
11-17, 09:02:52.648-->Start DTC connection test
Error(0x2AFC) at nameping.cpp @62
-->gethostbyaddr
-->11004(The requested name is valid, but no data of the requested type was found.)
-->11004(The requested name is valid, but no data of the requested type was found.)
-->gethostbyaddr
-->11004(The requested name is valid, but no data of the requested type was found.)
11-17, 09:02:57.414-->Start RPC test (Server1-->Client1)
Error(0x6BA) at ServerManager.cpp @453
-->RPC reverse BIND failed
-->1722(The RPC server is unavailable.)
Reverse Binding to Client1 Failed
In GUID
Out GUID
Reverse BIND FAILED
Session Down
Problem:fail to invoke remote RPC method
Error(0x6BA) at dtcping.cpp @303
-->RPC pinging exception
-->1722(The RPC server is unavailable.)
RPC test failed
********************
The client log reads as follows:
++++++++++++++++++++++++++++++++++++++++++++++
DTCping 1.9 Report for Client1
++++++++++++++++++++++++++++++++++++++++++++++
RPC server is ready
++++++++++++Validating Remote Computer Name++++++++++++
11-17, 09:02:47.540-->Start DTC connection test
Name Resolution:
Server1-->10.0.0.43-->Server1@domain.local
11-17, 09:02:47.556-->Start RPC test (Client1-->Server1)
RPC test is successful
Partner's CID:14C50512-C144-4B58-A969-126DE252300C
++++++++++++RPC test completed+++++++++++++++
++++++++++++Start DTC Binding Test +++++++++++++
Trying Bind to Server1
11-17, 09:02:47.618-->Client1 Initiating DTC Binding Test....
Test Guid:A67C83D2-3F38-4CF9-92A3-246A37F8EF20
Binding call to Server1 Failed
In GUID
Out GUID
Session Down
Problem with Views defined with Linked Server data source
I have a problem with a data retrieval query that uses three SQL Views, each based upon a remote table via a Linked Server object. The problem is that the query, a simple 3 table (actually view) join, that returns the top 200 rows, is taking over 3 minutes to run.
The SQL server on which the Views are defined is linked to a Progress Database server, the Progress database on this server is also being used by a mission critical OLTP system. Each view is defined in a similar way, like this :
CREATE VIEW [VIEW_A] AS SELECT * FROM OPENQUERY(REMOTE_SVR,’SELECT * FROM [REMOTE_TABLE]’)
The REMOTE_SVR referenced above is the name of the Linked Server object, its connection to the actual remote server is via an ODBC driver.
I have looked at the query plan generated by the SQL Server and it is showing that 3Remote Scans are taking place and appear to be bringing the full contents of the 3 remote tables across the network to be processed on the SQL Server. Where they are placed in a worktable before the join is performed.
Is this correct? Is it the case that the Views are nothing more than a direct connection thru to the associated tables on the Progress Server, and so for SQL Server to action the join it must first pull all the rows from each of the 3 tables on the remote (linked) server? If this is the case I’m guessing the performance hit on the remote server and the network are potentially very significant. Not to mention the slow query itself, and the hit on the SQL Server resources. If were a complex query returning a large result set the performance hit could be massive.
I would really appreciate some comments, hopefully to confirm if I’m right or wrong in thinking this is bad news. I am not currently in a position to redesign this setup as it is provided by a 3<sup>rd</sup> party, but If I can show the design is inappropriate then I will have more influence, confirming my thoughts is the first step.
Thanks in advance
Separating SQL Server files and data
Hello Community
When installing software the O/S usually goes on the c:\ drive (or partition) and the data
goes on the d:\ drive (or partition).
But in the case of SQL Server and software like that, the O/S goes on the C:\ drive
(or partition) including the .mdf files and the d:\ drive (or partition) contains the .ldf files
so my question is what drive (or partition) does the data go on (for example spreadsheets
and Word documents) should there be an e:\ drive (or partition) for that data?
Thank you
Shabeaut
Unable to connect to SQL Server 2008 Express from NT4 client
I have a client running a manufacturing system which uses a very old controller running NT4.
The controller connects to a MSSQL database and also uses flatfile scripts. Previously it was successfully connected to MSSQL Server 2008 R2 Express running on a Server 2003 platform.
The old server must be retired, and we deployed a new Server 2008 R2 x64 platform, which has the same MSSQL Server 2008 R2 Express instance on it. Other systems can successfully connect to the database on the new server. The NT 4 box can see the server name and instance name via SQL Browser, but attempts to connect to the database using a UDL connection yield the following error:
[DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.
The NT 4 box can still connect to the old server 2003 and its MSSQL2008 Express instance successfully.
I upgraded the Data Access Components on the NT4 box to MDAC 2.8 SP1 in hope that the updated DBNETLIB.dll would solve the issue. MDAC 2.8 SP1 appears to be the latest possible version for NT4. I'm well aware that NT4 is long EOL for support purposes, but replacing the controller on this piece of equipment is a very expensive proposition. If there is any way we can milk the old box for a few more months the owner would like to do so.
The software on the controller uses a UDL connection and so I am using a UDL file for testing - as I said, I get a successful connection to the old database on the Server 2003 box.
I'd be grateful for any insight.
sqllocaldb.exe stop v11.0 "Access is denied" in vs2012
When i want to stop the SQLServer start from last Friday my system prompt me this message I try to run as administrator also same error.
I am calling this message. before the day i can run this command and also the delete command.
sqllocaldb.exe stop v11.0
http://i1293.photobucket.com/albums/b585/Tyler_Lim/help_zps60fbd038.pngLDAP vs SQL dialect
What benefit and drawback between LDAP and SQL dialect can you explain? What context should you use when you have to choose LDAS and SQL?
Database Error (ODBC): Data Source name not found and no default driver Specified.
I have 1 user who is getting the error of tabase Error (ODBC): Data Source name not found and no default driver Specified when trying to access a db of one of his applications.
If I have other users (3 tested so far) try they can get to the db just fine, no errors.
I will add that this application is on Citrix, but its weird that this only affects 1 person, and all others can open the DB just fine.