sServer = "SQLSERV01"
Set oConn = CreateObject("ADODB.Connection")
On Error Resume next
sConnStr = Replace(Replace(Replace(Replace(Replace(NewConnStr, "%DBUser", "test1"), "%DBPassword", "test1"), "%DBName", "model"), "%DBServer", sServer), "%DBPort", "1433")
Call oConn.Open(sConnStr)
This script runs under stripped-down Windows enviornment (Windows PE) with very basic components (i.e. no GUI, only command-line interface). I am trying to find out if there is any client side setting to bypass "self-generated SSL ceritificate" on server. I have tried all things on server side from disabling shared memory protocol, setting "Force Encryption" property etc. Could somebody help me with name of this property?
Also, is it possible to not use self-generate certificate on server. We don't want any kind of encryption for SQL connections.
Thanks..
Couple of questions for the SQL Server Guru's out there.
SQLServer 2005 Web Hosting Provider
Ok I am developing a Web application in ASP.NET with AJAX, etc. etc. It will be some time before it is ready to roll out. As a mockup I created the same application in Microsoft Access and Visual Basic (VS 2008), which I can link the tables to the hosting provider on the internet. Works very well and speed is very acceptable.
My question is, is how secure is the data that is moving from the local application to SQLServer 2005 with the web hosting provider ? Is there anything that I can do to increase security ?
Hello I'm having a problem with the server connection and my C# code. The code executes alright but no data is entered into the database behind it. I'm pasting the connection code over here as well. The sql commands are used in the code. I think I used the sql server mobile edition which is installed along with visual studio.net 2005. Anyone know what's wrong, and can help me out? Thanks in advance.public static void storeInDb(string trackName, string artist, string albumTitle, string year, string path, uint[] fp) { string connStr="Data Source=.\SQLEXPRESS;AttachDbFilename='"+path+"\Data\ACI.mdf';Integrated Security=True;User Instance=True";SqlConnection conn = new SqlConnection(connStr); conn.Open();string sql = "INSERT INTO Clip(Song, Artist, Album, Year) VALUES('" + trackName;sql = sql + "','" + artist + "','" + albumTitle + "','" + year + "')"; SqlCommand cmd = new SqlCommand(sql, conn); cmd.ExecuteNonQuery(); sql="SELECT max(ClipID) FROM Clip"; cmd = new SqlCommand(sql, conn);int id = Int32.Parse(cmd.ExecuteScalar().ToString());for (int i = 0; i < fp.Length; i++) { sql="INSERT INTO Hash VALUES ("+id+","+(i+1)+","+(int)fp[i]+")";cmd = new SqlCommand(sql, conn); cmd.ExecuteNonQuery(); } conn.Close(); }
I am using SQL server 2005 sp1 to work with my applications... and i am using ODBC connection to communicate with SQL serrver...
The connectivity has been working fine for more than a 6 months now .... and suddenly it thows an error ...
"General network error. Check your network documentation.ConnectionRead (recv())."
There about 10 applications accessing SQL server... and all the applications throws this same error...
I intially thought it migjht be bacuase some applications are over utilizing the SQL connection and not closing them properly... but i noticed the connection opened in the Activity monitor are the same as it supposed to be ... no extra unwanted connection opened...
I also noticed that SQLserver.exe process is utilizing almost all the RAM memory and trying to allocate more page memory.... so i restarted the SQL sever service and that reinstated all the connectivity properly....
in couple of days .... the memory utilization again reached the max and this problem started again and i had to restart the SQL server again... and this problem happens every 2 days...
I know SQL server is using up those memory for caching purpose which is normal... but Y would this cause the connectivity to fail...
Is it a problem in SQL server 2005 SP1 ... shd i upgrade it to SP2?
If some of my application is causing this how would i narrow it down to that application and pin point on that particular one?
The thrown error does not have much information for it to guide me in a direction for debugging...
I have an application which is under development in VS 2005 but the database is in SQL Server 2000. We are facing some strange problem with the connectivity between VS 2005 - SQL Server 2000. I have tried all the possible ways or solutions i found when searching in google but unable to find a solution.This had become a major challenge for us now to identifiy the root cause of the problem
Error: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" Please suggest.
I am an application developer with an existing system developer in SQL Server 2005 Express and Visual Studio 2005.
I have installed the system I wrote at a physician's office, and it is working fine on a local computer utilizing XP operating system.
There is a requirement to allow other terminals to connect to this XP terminal to execute the application, so I am exploring possibilities for connecting remotely from the other computers in the physician's office.
I am running Virtual Machine for my client computer.
I modified SQL Server 2005 on my main computer. I enabled both TCP/IP and Named pipes in the SQL Server Surface Area Configuration utility. I also set SQL Server Browser to start automatically.
The local application is successfully connecting with the following connectionstring: Data Source=localhostsqlexpress;Initial Catalog=MedicalDB;Persist Security Info=True;User ID=sa;Password=thepassword
I realize that I would have to substitute the server name for localhost before I could connect from the application, but I wanted to first "connect" to the database from my second machine successfully before I began trying to connect from my application. I can Ping the pc that is running sql server express, I am able to "telnet" my pc that is running SQL Server Express.
Both my computers are in the same workgroup and there is no domain.
There are no aliases in my configuration, and there is no encryption on the server.
Ther error message I recieve is:
Cannot connect to DDD
An error has occurred while attempting connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under default settings SQL Server does not allow remote connections. (providor: Named Pipes Providor, Error: 40 Could not open a conneciton to Sql Server) (Microsofi SQL Server, Error: 1326)
I have an application which uses ADO to connect to Database. DSN name is specified in the connection string used by ADO as part of the application logic.
This application is working perfectly fine when it is run from a Windows 2003 Enterprise Edition (EE) Server and successfully connects to a remote MSSQL 2005 EE Database installed in another Windows 2003 EE Server.
This application is working perfectly fine also when it is run from a Windows 2003 Standard Edition (SE) Server and successfully connects to the local MSSQL 2005 EE Database installed in the same Server.
But this application FAILS to work when it is run from the Windows 2003 SE Server and connecting to the remote MSSQL 2005 EE Database installed in Windows 2003 EE Server. Error returned to the Application has this description: "Provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
Can somebody give me more insights into the problem and help me in overcoming the issues in the last scenario?
I have two databases that support two separate applications. Both applications are required to be in sync with one anther. One application is MSSQL 2000 based and the other is Oracle 9.i. Given the complexity of the first application (host), the best solution was to use linked servers to connect the SQL database to the Oracle database.
To prevent imbalances, the host application calls a package in Oracle to update the secondary application before it completes the transaction in SQL. This way, if anything fails at any point, the entire transaction is rolled back and neither databases are updated.
PROBLEM:
Our test system is stand alone but is performing the previously mentioned transaction in the same manner to an Oracle database on a Linux server. After passing testing, we promoted the application to the live system and are experiencing the following error when the transaction attempts to call the Oracle package:
Connectivity error: [Microsoft][ODBBC SQL Server Driver][SQL Server]MSDTC on server XXXXX is unavailable.
I have done some reading, but there really isn€™t much literature on linked servers. Will someone help?
We have an OLD vbscript process that is running on a Windows 2000 box. The box has Sql Server 7.0 on it (not sure if relevant). The process used to hit a Sql Server 2000 database, but that database was recently migrated to 2005 (on different server). Now the connection string obviously no longer works, and we can't even add a DSN to 2005 (does not recognize new server). The machine pings the new SQL server without any problem, but cannot connect for data access.
I assume there should be some driver that I can install to fix this, but have yet to find one on the web. Does anyone have a recommended download to remedy this?
I am trying to connect to an AS400 to download data to a 64bit sql server 2005 server. I am able to do this easily by migrating existing sql2000 DTS packages but how do i do this is in an SSIS project creating the process from scratch? and how do i incorporate activex transforms like you could in DTS2000 into the trasnform with copy columns?
Please help i am slowly turning grey trying to get this to work.
hi all. i m looking for help in Java - SQL Server 2000 Connectivity.i worked on Java- Oracle & Java - MS Access format.now i m looking to work on Java - SQL Server 2000. I m using JBuilder 2005. what sort of configuration needed in JBuilder or SQL Server 2000, like adding JAR files and all other stuffs? or what to do? lemme know quickly. thanx in advance.
Hi, We are running one shopping site for our organisation, which includes Tomcat 5.0.28 , IIS & SQL Server 2000 SP3 hosted on platform Microsoft Windows Server 2003 Enterprise Ed. , we are running jsp pages server side and site is hosted on internet, but it is observed that after every 1/2 days , page will throw following exception, and site get blocked.
javax.servlet.ServletException: Network error IOException: No buffer space available (maximum connections reached?) : connect
Can anybody help please?
I am beginner with JDBC - SQL Server Connectivity ,
I am giving our configuration details:
Driver Used - Microsoft SQL Server Driver 2000 SP3
Protocol Used - TCP/IP which open socket connection on default port 1433
Authentication - Mix Mode Authetication ( using sa account login)
Even setting done within LOCAL instance running on server to allow max. connections i.e 32767
My observation is that some kind of virus threat may causing this error, because if server will be rebooted, we doesn't
We are in web site development company,Previously we don't have proxy configuration, after implementing Proxy , we have an issue to connect a remote database.
The error pops "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. Error 53".
I am developing a UDT using Hashtable as the member of the UDT and the UDT is defined as Format.UserDefined. After deployed in sql, I tried the UDT as below:
declare @_prodtype ProductSearch
SET @_prodtype = Convert(ProductSearch, 'Product,Certification;Region,China')
where ProductSearch is the UDT.
The error occurred:
Msg 6522, Level 16, State 2, Line 3
A .NET Framework error occurred during execution of user defined routine or aggregate 'ProductSearch':
I am attempting to connect directly to an instance of sql 2005 from the VS Pocket PC emulator running Mobile 5.0. I have installed AtiveSync 4.0 and successfully cradled the device to establish connectivity to the internet. I have also successfully browsed to the IP of the server that i is running sql 2005. I am able to populate a datagrid via a stored procedure resultset which accepts no parameters. When attempting to pass variables into a stored procedure a SqlException was thrown stating that the procedure excpects these parameters. I have successfully built the app and ran the executable from my local machine and successfully passed these parameters to the procedures. I dont know what the problem could be. Any help would be of great assistance, this problem has halted productivity.
I have a question regarding the security of SQL Server 2005 Express Edition. What securities options that SQL server 2005 EE provide for its users?
I know that after I deploy my website to a hosting company or a web server, my database file will be on the net. That means everybody can type in the file name and download my database file then open it. Just like that. For example, my database filename is EXAMPLE.MDF. then, someone just goto my website, say http://www.cool.com/app_data/example.mdf, and download the database.
To prevent that to happen, what the securities options that available to me beside putting password on my database file?
Thanks for taking time to answer my question. Any help will be appreciated. Have a good day!
HI, I am just starting out with SQL Server 2005 and really getting in a muddle with al the security stuff. It seems i have LOGINS, DATABASE USERS, Server Roles, Database Roles, SCHEMAS and somehow they all tie in together. I am using Microsoft Press "SQL Server 2005 Implementation and maintenance" but it really isn't doing a good job of explaining it to me. Can anyone point me to a reference that clearly explains all this stuff?
Hi All, I am a beginner in ASP.NET and trying to access sql database from using C# language thru ASP.NET . I hv tried with below code but could not able to make out. connection = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Northwind;Data Source=ServerName;"); connection.Open(); dataadapter = new SqlDataAdapter("select * from customers", connection);dataset = new DataSet(); dataadapter.Fill(dataset, "table1"); DataGrid1.DataSource = dataset; DataGrid1.DataMember = "table1";
Am getting the error - System.Data.SqlClient.SqlException: Login failed for user 'ServerNameASPNET'. Please help.
I would really be grateful for some advice regarding the above matter (note: am novice to the 'client/server' implementation, so would ask for your patience, pls!):
We have a front-end Access 2K app’n, which connects to some back-end data, (using a 'dsn-less' ODBC link (Access table)). The system was not in use for several months, during which time the server was re-built. The problem I’m having is that although I can connect to the back-end data, the other users are unable to do this.
I have been looking into the problems/issues encountered so far, including:
· - Updating the dsn-less connection table within the front-end Access application (note: we have other applications which use this method for connectivity, without any problems here), i.e.
ODBC;Driver={SQL Server};APP=Microsoft Access;UID={updated username};PWD={updated password};Server={name of server};DATABASE={name of database on server}
· Re-visiting the ‘ODBC Data Source Administrator’ and checking the configuration of the ‘Microsoft SQL Server DSN Configuration’ (i.e. ‘Window authentication, using the network login’, etc).
The strange thing is that I’m able to access the back-end data, via the application without any problems at all (I’m using the full version of MS Access 2K, as need to eventually make changes to the front-en app’n. All of the users have MS Access 2K run-time only installed).
However when the user tries to log, they acquire ‘ODBC—connection to {Access application name} failed’ messages.
Up to three other users have tried to access the system, and acquire error message of the following nature:
Within the front-end application:
· ‘The {Access application name} is not available (Error No: 3151. Error: ODBC—connection to {Access application name}’ failed.)
· (1) Initially the user obtains the message: ‘The expression you entered has a function that ‘{Access application name}’can’t find.’ Then (2) I receive an ‘Action Failed’ on the ‘AutoExec’ macro (this is set up to execute a function which acquires the user’s window’s login details).
Linking to the back-end data:
· Connection failed: SQLState: ‘28000’. SQL Server Error: 18456. [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ‘{domain_name}{users_Windows_login_name}’.
· Whilst user was logged in at my desktop, I tried to implement a ‘SQL Server ODBC Data Source Test’. However the ‘Test Results’ have been as follows
“Microsoft SLQ Server QDBC Driver Version 03.85.1117. Running connectivity tests… Attempting connection [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ‘{domain_name}{users_Windows_login_name}’.
We currently have other client/server applications which link using the above methods (ODBC dns-less connections, etc), but have no problems with the user’s and their permissions to access these.
Would appreciate any help/suggestions/advice, etc with this.
I have been building a database in SQL Server Express for some months now using the Windows level authentication login that has given me full access to everything in the database.
The time has now come where I need to create user accounts and grant permissions to specific stored procedures and I'm having trouble doing this.
Can anyone give me a brief rundown of the required T-SQL commands I need to set up a user account that can do nothing but run stored procs (not the system procs which apparently are being discontinued: http://msdn2.microsoft.com/en-us/library/ms182795.aspx).
So far I have:-
CREATE LOGIN db_test_user WITH PASSWORD = 'eXaMpL3Pwd USE db_new CREATE USER db_test_user
The above code executes successfully but when I try and connect (using Management Studio) I get error message 'The user is not associated with a trusted SQL Server connection (error 18452)' which means little to me.
I also tried creating a 'WITHOUT LOGIN' user for the database but could not figure out how to give it a password.
I don't know (/understand) roles/schemas and don't know if I really need them as I only need user access to specific stored procs. I don't ever want them to see the tables for example so they only need the most restricted access.
I cannot block user access to tables. I have restriced accounts at theserver, database, group, schema, and table lavel and can still opentables right up.In other words, I have absolutely no security. Any ideas?
Does anybody have a link to either of these two documents. My company is getting ready to go through an audit and we need some firepower and to know what is expected. Any help with obtaining microsoft SQL Server 2005 best practices documents is appreciated.
Couple of questions for the SQL Server Guru's out there.
SQLServer 2005 Web Hosting Provider
Ok I am developing a Web application in ASP.NET with AJAX, etc. etc. It will be some time before it is ready to roll out. As a mockup I created the same application in Microsoft Access and Visual Basic (VS 2008), which I can link the tables to the hosting provider on the internet. Works very well and speed is very acceptable. The want to start utilizing it with the mockup distributed app that I created.
My question is, is how secure is the data that is moving from the local application to SQLServer 2005 with the web hosting provider ? Is there anything that I can do to increase security ?
Dear mems, I have a problem, and i don't khow how to resolve, pls help me:
My server is Windows XP (not domain), I work with SQL Server 2005, installed on my server, I configurate my SQL SERVER connection is "Windows Authentication mode", I add user "MyComputerguest" to MyServerSecutityLogins to accept connections from local network I have many databases: Db1, Db2, Db3...
But, I don't know to configurate my SQL Server to achive these: 1) My clients using "SQL Server Managment Studio" connect to Databases Db2, Db3... on my Server, they can expand, modify, add new all Tables, Sp, functions of Db2, Db3. 2) My clients are not allow to access Db1. 2) My clients can add new Databases Db4, Db5, Db6... in the future and they have full permission on every Database which they create without my interfere.
if you run the following script it takes access from the windows admin from getting into sql server through windows auth. The issue is that the files that are attached logging as SA after that are read only. Is there any solution? When you try and switch the file to read write sql server gives an error saying that it cant read the mdf and ldf--gives a windows access error....
USE [master] GO
IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'BUILTINUsers') EXEC sp_dropsrvrolemember [BUILTINUsers], sysadmin DENY CONNECT SQL TO [BUILTINUsers] CASCADE GO
IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'BUILTINAdministrators') EXEC sp_dropsrvrolemember [BUILTINAdministrators], sysadmin DENY CONNECT SQL TO [BUILTINAdministrators] CASCADE GO
IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'NT AUTHORITYSYSTEM') EXEC sp_dropsrvrolemember [NT AUTHORITYSYSTEM], sysadmin DENY CONNECT SQL TO [NT AUTHORITYSYSTEM] CASCADE GO
I am not sure if this is the right place to post this but I need some help. We have an email server, with windows 2003 server, set up with SQL server 2005 and sql server management studio express which uses windows authentication. I noticed in the event viewer we keep getting an error under the application, "failure audit". about 25 a minute. The error says "login failed for user admin The user is not associated with a trusted mysql server connection." followed by an ip address (this username changes on a daily bases which makes me wonder if it is an attempted hack) I have little knowledge of sql. How can I get this to stop happening. Event Viewer returns no results to help me fix this and I am having no luck researching it on my own. If there is any more info I need to provide, let me know. HELP!
I'm currently investigating the security improvements of SQL Server 2005. I've got some problems with the schemas introduced in SQL 2005 and security settings.
For my test I've created two schemas: UserManagement and Sales. A user "test" is attached to the UserManagement schema. There's a table Sales.Users containing a list of users (varchar) and a stored procedure named UserManagement.AddUser that can be executed by the UserManagement schema (GRANT EXECUTE, so "test" can execute the SP). UserManagement.AddUser simply inserts a new row into Sales.Users.
Because the Sales schema doesn't contain any user, nobody (except the sysadmin, of course) can do a INSERT/SELECT/DELETE in the Sales.Users table. As expected, the following SQL statement fails:
EXECUTE AS LOGIN='machine est'; INSERT INTO Sales.Users VALUES('Test User');
INSERT was not allowed: object 'Users', database 'test', schema 'Sales'. The second way of inserting rows into Sales.Users is to execute the stored proc UserManagement.AddUser: CREATE PROCEDURE [UserManagement].[AddUser] WITH EXECUTE AS CALLER AS INSERT INTO Sales.Users VALUES('Test User'); The user "test" can execute this sproc without problems: EXECUTE AS LOGIN='machine est'; EXECUTE UserManagement.AddUser;
(1 row(s) affected)To my astonishment the INSERT statement inside the stored proc does execute - although UserManagement.AddUser and Sales.Users are two different schemas. Why is that, is there a chaining happening? To my understanding SQL Server should test INSERT rights on Sales.Users for the UserManagement schema and deny the INSERT statement because UserManagement isn't allowed to INSERT in the Sales schema.
Any ideas? Help regarding the issue is greatly appreciated.