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

only approve documents are shown

$
0
0

i try this sp to show documents

sp

ALTER procedure [dbo].[financespmanager] 
@DepID int
as
SELECT     dbo.DocumentInfo.DocID as DocumentID, 
 dbo.DocumentInfo.DocName as DocumentName, 
 dbo.DocumentInfo.Uploadfile as FileUploaded, 
 dbo.Department.DepType as Department, 
dbo.DocType.DocType as Document,
dbo.DocumentInfo.UploadedBy as UploadedBy, 
dbo.Approval.AppoveBy, dbo.ApproveType.ApproveType as Status
FROM         dbo.DocumentInfo INNER JOIN
                      dbo.Approval ON dbo.DocumentInfo.DocID = dbo.Approval.DocID INNER JOIN
                      dbo.ApproveType ON dbo.Approval.ApproveID = dbo.ApproveType.ApproveID INNER JOIN
                      dbo.Department ON dbo.DocumentInfo.DepID = dbo.Department.DepID INNER JOIN
                      dbo.DocType ON dbo.DocumentInfo.DocTypeID = dbo.DocType.DocTypeID                      
                      where DocumentInfo.DepID=@DepID 

when i execute this query douments are shown like this way


now here i want to show only approve documents not reject and pending documents

how i done this?





provider can not be found OLEDB in windows 7

$
0
0

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

also

provider can not be found it may not be properly installed

I am getting this error I am using windows 7

everything was working fine on XP but on windows 7 i am getting this error

I dont understand what to do since I need to run the code as it is very urgent can u please help me with what do I need to do and from where to download the content so that my laptop works properly....

I need to run my project on laptop which is installed with windows 7 -- 64 bits

and the project was developed on XP

thank u in advance

[QUESTIONS] SQL Server 2005 SP2 Installation and Limitation

$
0
0

Dear all,

I need do a small office web hosting (ASP.net) and data access (SQL Server 2005) and I have a question about the SQL Server 2005 as below,

Office Details:
- Below 10 staffs to query and data entry on the connection thru the customization web application.

Installation:
(1) Can I install it into the Windows XP or Windows 7?
(2) During installation, is that any differences between the Windows Server and Windows XP or Windows 7?
(3) What is Pros and Cons about the question #2?

Limitations:
(1) Since I plan to install it into the OS platform as above, is that any limitations problem to let my staffs to connect it simultaneously?

Please advice. Thanks :)

Architecture advise

$
0
0

Dear all,

I have an application which is based on an SQL server 2008 r2 ;

the SQL database runs actually on each standalone PC where the main application runs. If I have a customer which request licence of our application, this would means 5 installation. In such case I would need to have a remote SQL server for the database that client PC can access.

For accessing database I have relying on a WCF service which takes care of request over TCP protocole.

The question I have is do I need to have a dedicated Server running a Server operating System + Sql server or does a normal workgroup PC would be enough ?

I have heard that in Work group configuration we are limited to 10 client connection correct ?

In addition to that they could be a lot of concurrent conection to database to handle so I guess that I could not avoid having a real server correct ?

regards

serge


Your knowledge is enhanced by that of others.

SQL Server 2005 - Repair Master Database

$
0
0

(Windows XP Professional SP3) Corrupted SQL Server MASTER Database - Windows automatic updates are failing for those having to do with SQL Server or Visual Studio.   Recently, I was experimenting with exporting data from a Autodesk Revit application into the SQL server 2005 database on my local machine.  Being a novice, I used the SQL "Master" database to export my data into.  I'm inferring that I may have corrupted the MASTER so that Windows cannot successfully do its updates because I'm getting a failure on all updates having to do with SQL Server or Visual Studio.  Other Windows updates seem to be OK.  Do I need to repair the SQL master database?  If so, how?

Microsoft JDBC Driver 4.0 for SQL Server: TYPE_SCROLL_INSENSITIVE behavior

$
0
0

Hi,

From running profiler traces, I've noticed that the default behavior for the TYPE_SCROLL_INSENSITIVE result set cursor type is to do sp_cursorfetch calls.

Other JDBC drivers like the i-net one appear to read the result set into client memory and allow scrolling.

Are there plans to allow the behavior with the Microsoft JDBC Driver to be configurable (e.g. using the selectMethod and responseBuffering properties) or to change the default behavior?

Thanks,

Ken


Microsoft JDBC Driver 4.0 for SQL Server: Is fetch size ignored?

$
0
0

Hi,

I was trying to search around to see if setting the fetch size has an impact using the Microsoft JDBC Driver 4.0 or is it effectively ignored by the driver if I call setFetchSize on a PreparedStatement and/or ResultSet?

Thanks,

Ken

Downlaod Word document saved in the database.

$
0
0

Hi all,

I have saved word document in the sql server database. I want it to download the doc file when a user clicks on the "Download" Button.

The word document is saved in binary format in the database. How can a user click on the button on a form and he can download the word document(Resume in my case).

Any help would be highly appreciated.

Thanks


Cannot browse sql server

$
0
0
Hi,
I have my sql server on 10.10.10.0 network and all
users in this network can browse the SQL server (while creating ODBC
connections). I have another subnet, 172.x.x.x, in the same network, they can
ping the server, telnet to port 1433, but cannot browse the SQL servers while
creating ODBC. Any idea how to resolve this?
SQL 2005 is used.

Any
help is appreciated.

MSSQLSERVER 2008 Error ID 18456 ( Login failed for user ‘pdb’.Reason: Failed to open the explicitly specified database. [CLIENT: xxx.xxx.x.xxx]

$
0
0

My server 

MSSQLSERVER 2008 Error ID 18456 ( Login failed for user ‘pdb’.Reason: Failed to open the explicitly specified database. [CLIENT: xxx.xxx.x.xxx]

1. Windows server 2003 with MSSQL Server 2008

2. Six client Windows xp and Windows 2000 (NT)  connect by ODBC

<a href="http://upicy.com/share-C064_52970371.html"><img src="http://upicy.com/thumb-C064_52970371.jpg" border="0"></a>

Wutt


Problems with msodbc 11.0-2270 for Linux x86_64 - failure to reconnect

$
0
0

Greetings, folks,

I've been making use of the sqlncli / msodbc drivers for unixODBC, and everything is running quite smoothly until a connection handle to the database times out for whatever reason (pretty much anything that causes a TCP connection timeout).  Both the application that I am using this with (OpenSIPS) and even unixODBC's isql command-line query program will report "TCP Provider: Error code 0x68" after the timeout occurs, and I see the following sequence of packets on the wire:

1.  From client to server - SYN
2.  From server to client - SYN, ACK
3.  From client to server - ACK
4.  From client to server - FIN, ACK
5.  From server to client - ACK
6.  From server to client - ACK
7.  From client to server - ACK

And that it is it.  No further packets, error 0x68, handle is invalid.  If instead I use FreeTDS 0.92.79 on my system, I see the following set of packets:

1.  Client to server - SYN
2.  Server to client - SYN, ACK
3.  Client to server - ACK
4.  Client to server - A TDS packet including the user name and password of the user we are trying to connect to the database
5.  Success, reconnection occurs, and handle is valid once again in our application and on isql

I have tried forcing threading on, off, and MARS_Connection on, off, with the msodbc, and I never see a different in behavior.  This same behavior exists in sqlncli 11.0-1790 and msodbc 11.0-2270.  It also occurs whether or not I use unixODBC 2.3.0, 2.3.1, or 2.3.2.  Here is a backtrace of what happens when OpenSIPS crashes when the handle is failed to be reconnected:

(gdb) bt
#0  0x00007f15d4aa3f48 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#1  0x00007f15d4aa6fa2 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#2  0x00007f15d4a8e0e6 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#3  0x00007f15d4a77fc5 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#4  0x00007f15d4a79644 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#5  0x00007f15d4a76766 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#6  0x00007f15d4a702a5 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#7  0x00007f15d4a70c29 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#8  0x00007f15d4a719b2 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#9  0x00007f15d49f653a in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#10 0x00007f15d4a25246 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#11 0x00007f15d49f8e1b in SQLDriverConnectW () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#12 0x00007f15df57793a in SQLDriverConnect (hdbc=0x1695a00, hwnd=0x1, conn_str_in=0x7fff78c0fb40 "DSN=OURDSN;UID=OURUSER;PWD=OURPASSWORD;", len_conn_str_in=-3,
    conn_str_out=0x7fff78c10340 "P\230|\337\025\177", conn_str_out_max=1024, ptr_conn_str_out=0x7fff78c1074e, driver_completion=1) at SQLDriverConnect.c:1490
#13 0x00007f15df7cdb63 in reconnect (_h=0x7f15e2303300) at dbase.c:68
#14 0x00007f15df7ce015 in db_unixodbc_submit_query (_h=0x7f15e2303300, _s=0x7f15dea3a160) at dbase.c:140
#15 0x00000000005318b4 in db_do_raw_query ()
#16 0x00007f15de828501 in db_query_avp (url=0x7f15e22dc230, msg=0x7f15e2303500, query=<value optimized out>, dest=0x7f15e22ffbe0) at avpops_db.c:423
#17 0x00007f15de82f63c in ops_dbquery_avps (msg=0x7f15e2303500, query=<value optimized out>, url=0x7f15e22dc230, dest=0x7f15e22ffbe0) at avpops_impl.c:757
#18 0x00000000004152ee in do_action ()
#19 0x0000000000412e1d in run_action_list ()
#20 0x00000000004191d8 in do_action ()
#21 0x0000000000412e1d in run_action_list ()
#22 0x00000000004191d8 in do_action ()
#23 0x0000000000412e1d in run_action_list ()
#24 0x0000000000417bcc in do_action ()
#25 0x0000000000412e1d in run_action_list ()
#26 0x000000000041312a in run_actions ()
#27 0x00000000004175ec in do_action ()
#28 0x0000000000412e1d in run_action_list ()
#29 0x000000000041a8bf in run_top_route ()
#30 0x000000000047a2b8 in receive_msg ()
#31 0x00000000004e1851 in udp_rcv_loop ()
#32 0x0000000000435d78 in main ()

There are no symbols and everything is optimized out on frames 0-10, and the variables in frame 12 are valid, and work on initial connection just fine.

Server is Centos 6.4 x86_64 with 64 GB of RAM on it, and only OpenSIPS w/unixODBC+msodbc, and the OpenSIPS control panel application running on php under Apache HTTPd.

Any help would be appreciated, as this appears to be a bug to me at this time.  Please let me know if I'm leaving out any pertinent details.  Thanks!

ASP Connection to SQL

$
0
0

I've been installed the Visual Studio 2008 and the SQL server 2008. I'm developing a new application in ASP and i'm trying to stablish a connection to SQL and in the Web site Administratiion tool i selected the option Select a single provider for all site management data and then appears AspNetSqlProvider selected and when i try to test the connection this errror apears: "Could not stablish a connection to the database." I'm new in this and i don't know how could i fix this. I hope someone could help me. 

 
 

System.Data.dll error: can't connect to 192.168.9.118

$
0
0

Env:

Client:

Win7 U SP1, Sql Server 2012 SP 1, VS2012 u4

Every thing is OK in last week. But I can't connect to any remote database by SSMS, I only can connect localDB on my computer. And if I retry, the SSMS crashed...

Then, I try to connect by VS2012, and it crashed either...

In the System Event Log, there are many error report about exception code as 0xC0000005, 0xE0434352...

Finally, I have to attach to SSMS process by VS, and the debug output like follow:

0x74F7C41F (KernelBase.dll) (Ssms.exe 中)First-chance exception: 0xE0434352 (parameters: 0x80131904, 0x00000000, 0x00000000, 0x00000000, 0x54F10000)。
0x74F7C41F (KernelBase.dll) (Ssms.exe 中)First-chance exception: 0xE0434352 (parameters: 0x80131904, 0x00000000, 0x00000000, 0x00000000, 0x54F10000)。
0x773622D2 (ntdll.dll) (Ssms.exe 中)First-chance exception: 0xC0000005: 写入位置 0xFEEEFEFA 时发生访问冲突。
Ssms.exe Error: 0 : ExceptionMessageBoxShown@can't connect to hlt-ph.keyuanmed.com。
System.ApplicationException: can't connect to hlt-ph.keyuanmed.com。 ---> System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
   在 SNINativeMethodWrapper.SNIClose(IntPtr pConn)
   在 System.Data.SqlClient.SNIHandle.ReleaseHandle()
   在 System.Runtime.InteropServices.SafeHandle.InternalDispose()
   在 System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)
   在 System.Runtime.InteropServices.SafeHandle.Dispose()
   在 System.Data.SqlClient.TdsParserStateObject.Dispose()
   在 System.Data.SqlClient.TdsParser.Disconnect()
   在 System.Data.SqlClient.SqlInternalConnectionTds.LoginFailure()
   在 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
   在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
   在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   在 System.Data.SqlClient.SqlConnection.Open()
   在 Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
   在 Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
   --- 内部异常堆栈跟踪的结尾 ---thead 0x1cf4 exit,return value is 0 (0x0)。

adodb recordset error at win7

$
0
0

Hi friends,

I wonder why (objDBCn.Open)shown on the follwing statement works at WinXP but not working at win7

----------------------------------------------------------------------------------------------------------------------------------------------------------

Public Function fxExecSQLReturnRS(strSql As String, objDBCn As ADODB.Connection, Optional blnTransHand As Boolean =True) As ADODB.Recordset

Dim objRs As ADODB.Recordset
Set objRs = New ADODB.Recordset
objDBCn.Open

----------------------------------------------------------------------------------------------------------------------------------------------------------

Error 701 There is insufficient system memory to run this query

$
0
0

9.0.4262 SQL 2005 Enterprise SP3 (MS09-062) 32bit, Window 2003 Ent SP2, Server Memory: 12GB, 4CPU

SQL Memory min : 1024MB, SQL Memory max: 9216MB, LOCK PAGE IN MEMOERY - set, AWE - Enable. DB server ONLY

Problem: 100% CPU, 10G memory show under Window Task Manager.

SQL Error Log: Error 701 show up every min

1) DBCC FREEPROCCACHE (no change), DBCC FREESYSTEMCACHE (no change), customer require SQL Re-cycle

2) Problem fixed after SQL re-cycle

3) I don't have time to do "DBCC MEMORYSTATUS", "DBCC FREESESSIONCACHE", sys.dm_o_memory_clerks..etc

4) WHAT IS THE ROOT cause?  Add more memory help??? For AWE, are we limit by the 2GB VSA memory for plan cache and non buffer pool?....   

Please advice and help..... Thanks


log in failed connecting vb2008 to sql server 2005

$
0
0
Good day...my 0s is windows 8, i'am trying to connect vb 2008 to sql server 2005...i've carefully follow the procedure but it promt always lo in failed to the user...please help me!!!

Native Client on Linux does not recognize Failover_Partner in connection string

$
0
0

We are having a problem with Failover_Partner on Linux ODBC. We are using perl 5.14.2 on Ubunto 12.04.3 and unixodbc 2.3.2.

When the primary server is unavailable we expect the driver to automatically switch to the server listed as the Failover_Partner but we get an error message "[Microsoft][SQL Server Native Client 11.0]Invalid connection string attribute" instead. The connection string we are using is

dbi:ODBC:DRIVER={SQL Server Native Client 11.0};Server=Server_B;Failover_Partner=Server_A;Network=dbmssocn;Database=myDatabase;

Note 1: Server_A is the primary server and is up and running. Server_B is the mirror server and is not available. This should cause the driver to do a switch. We originally tested with Server=A and Failover_Partner=B but we had to fail the DB and this was not something that we could continue to do while we tried to debug this problem.

Note 2: even though Failover_Partner is supposed to be the correct spelling for ODC, we've tried all of the other documented spellings to no avail.

[ODBC]
Trace=Yes
TraceFile=/tmp/sql.log
ForceTrace=No
Pooling=No

[SQL Server Native Client 11.0]
Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0
Threading=1
UsageCount=1

We've also tried the driver named msodbcsql-11.0.2260.0 with the same results.

Any suggestions? Is Failover supposed to work with the native driver on Linux?

Thanks, Borden Covel

Case sensitive issue on SQL SERVER 2008r2

$
0
0

Hi all,

I am facing issues ,when I am running select command in local server it giving error “Invalid column name 'creationDate“ .but I am running same select commend from remote server like (linked server ) it working fine . please help me any one .

regards .

venkat

SQL 2008 R2 - Connection Timeout

$
0
0

I'm having a connectivity issue with SQL 2008 R2. Out of the blue I started getting SQL Timeouts when making a conneciton to the server. I get this on client apps, TFS server, and SSMS. Once the connection is made everything seems to work as it should, queries are fast and typically don't time out. I do get timeout errors when trying to run reports or even get the properties window of ther server and/or database. The issue started off about a week but in a totally different manner.

About a week ago, all apps stopped communicating with SQL all together. Not timeouts, just couldn't find the server. I was connection to the server via ip and isntance name using named pipes. If I restarted SQL services and SQL browser everything worked for a little bit. I ended up removing the instance name from the connection string and oddly enough it fixed the issue. Everything was running smoothly till the weekend when I started noticing timeout issues when checking in a project into TFS, then I noticed more error using SSMS. I rebooted the server and all hell broke loose. Since the reboot I was getting about 60% connection time out issues using any app you can think of.

Because of all the issues I decided copy the backups of DB to my system uninstall and reinstall SQL without an instance name. Just the standard default install. After reinstall and restoring DBs, I still got the lengthy timeouts. It didn't resolve my issue at all. I've since minimized the timeouts so it works better and is manageable. Things I've done to limit the timeouts:

Upgraded firmware on server, installed MS patches, switch nic port, switch switch ports, turned off named pipes for clients and server. Only Shared mem and TCP/IP are active. That last change seemed to reduce the problem greatly but it's still there. I'm running out of ideas, I see nothing in logs at all. I just don't know what to do from here. If you have any suggestions at all please let me know.

Another thing, I do have a network guy looking at the switch today to see if he sees any collisions or anything else going on. I did switch ports, but not switches. I do have another SQL 2008 R2 on same switch and running without issue [for now].

 

Thanks!

create ODBC connection to SQL SERVER 2005 from remote machine

$
0
0

Hi All,

I am trying to create a ODBC connection the the SQL SERVER 2005 installed in another system. But it show the following error:


The steps i have followed attached as images.

Step 1: In the below screen shot insted XXXXXXX i have used the system name which is having SQL server.

Step-2: instead of "username" i have entered the proper user name.

Can anyone help me on this?

Thanks,

Christober.C

Viewing all 4164 articles
Browse latest View live


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