Network Access SQLExpress
Jan 16, 2006
I am trying to access a SQLExpress database on another computer on my LAN. Using Windows Authentication. I don't really want to go to Mixed Mode authentication as I understand it involves a registry tweak and creating a new user. I am a novice at this.
Getting the following error on running the connection code below:
SQLException was unhandled "Login failed for user 'D37YKC1SGuest'."
No doubt it is a security problem but I am not sure how to get around it. Any help appreciated.
Connection code:
Dim conn As New SqlClient.SqlConnection
conn.ConnectionString = "Server=D37YKC1SSQLEXPRESS;Integrated Security=True;Database=VBNMDATA"
conn.Open()
Tried the following which is my Windows logon on the other computer (blank password) but same error:
conn.ConnectionString = "Server=D37YKC1SSQLEXPRESS;Integrated Security=True;Database=VBNMDATA; User Id=Geoff; Password="
I have TCP/IP enabled in SQL Express and the firewall is off. I can see the server on the other computer with this code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Retrieve the enumerator instance and then the data.
Dim instance As SqlDataSourceEnumerator = _
SqlDataSourceEnumerator.Instance
Dim table As System.Data.DataTable = instance.GetDataSources()
' Display the contents of the table.
DisplayData(table)
End Sub
Private Sub DisplayData(ByVal table As DataTable)
For Each row As DataRow In table.Rows
For Each col As DataColumn In table.Columns
MessageBox.Show(col.ColumnName.ToString & " " & row(col).ToString)
Next
Next
End Sub
View 7 Replies
ADVERTISEMENT
Oct 26, 2006
Hi,
I have a VS2005 application that I run with a SQL server 2003 database.
In order to make the application distributable, I'm trying to get it to run with SQLExpress.
I've installed SQLExpress on a spare machine and changed the connection string in my application to use SQLExpress c:databasesmydatabase.mdf (and the database is obviously in that location!). This works fine on the spare machine.
However the problem is getting the application to run on another machine but using the same database. I note that SQLExpress won't let me put the database on a networked drive.
On another machine I've also installed SQLExpress, I've enabled the tcpip stuff and the browser but to be honest don't really know what I'm doing!
How do I set up additional machines to use the database on the original PC? What do I put in my connection string? If I leave it as it is won't it look for the database on it's own local disk?
Any pointers much appreciated!
View 13 Replies
View Related
Apr 1, 2008
how can Share may sqlexpress 2005 on network that other can access my databasess on their pc and edit update and insert recored into my table
please tell me how can do this ?
View 2 Replies
View Related
Mar 3, 2007
Hi
Please if any one can answer.I am developing .net vb app sqlexpress database.
In single user work ok.In multiuser from other computer on network I cannot get data.Any form without data workok fine . The error I am getting is as follows.
Application attempted to perform operation not allowed by the security policy.
request for permission of type
'System.data.sqlclientpermission,system.data,
version=2.0.0.0.,culture=Normal, publickeytoken=b77a5c561934e089'
Zaabdullah
View 1 Replies
View Related
Mar 11, 2008
I'm using the methods of the Microsoft.SqlServer.Management.Smo namespace within a .NET application to create a backup file from a SQLEXPRESS database. I can then restore the database from that backup device using methods in the same namespace. Here is a snippet from the restore code:
srv = New Server("MYPCSQLEXPRESS")
db = srv.Databases("washmaster")
Dim bdi As New BackupDeviceItem(BackupFileName, DeviceType.File)
Dim recoverymod As RecoveryModel
recoverymod = db.DatabaseOptions.RecoveryModel
rs.NoRecovery = False
rs.Devices.Add(bdi)
rs.Database = "washmaster"
rs.ReplaceDatabase = True
srv.KillAllProcesses("washmaster")
rs.SqlRestore(srv)
This works great as long as I used one of the backup files that I created directly on the disk. However, my application has a utility that allows the user to copy the backup files onto another drive, such as a CD or a thumb drive and when I try to restore from the copy of the backup, I get the following exception:
....Cannot open backup device..[filename]...Operating system error 5(Access is denied.)
The reason I get this error is that the "NETWORK SERVICE" account was removed from the file permissions when the file was copied.
How can I copy a backup to another drive and preserve the "NETWORK SERVICE" account? If I can't do that, is it wise to try to add the account back to the file before using it to restore or is there a better way?
Thanks,
SJonesy
View 3 Replies
View Related
Jan 14, 2007
When running the following statement in SQL 2005, I get the error message "Access is denied":
exec master.dbo.xp_cmdshell 'TYPE \SERVER-BSHAREFILE.TXT'
The following are true about the network:
The SQL Server is installed on SERVER-A.
SERVER-A and SERVER-B are Windows 2003 servers on the same Windows 2003 domain.
The SQL Server and SQL Server Agent services are running under the domain account SQLSERVICE.
SQLSERVICE is a member of the Domain Admins group.
The Domain Admins group is part of the local Administrators group on SERVER-B.
The SQLSERVICE account has also explicitly been given Full Control to the folder referenced by \SERVER-BSHARE
xp_cmdshell use has been enabled on the SQL Server.
If I run the following command in SQL:
exec master.dbo.xp_cmdshell 'whoami'the following is returned: DOMAINSQLSERVICE
If I change the command to access the c: drive instead of a network drive, it executes successfully.
Can anyone shed some light on why I still cannot access any of the files in this folder using xp_cmdshell?
Tim
View 5 Replies
View Related
Nov 10, 2005
Is it possible to convert an ms access mdb file to an sqlexpress mdf file?Any help appreciated,Henk Feijt
View 7 Replies
View Related
Oct 18, 2006
Hello to everybody,
I had just installed SQLserver Express. I'd like to know if tool to migrate an Access db to SQLexpress exists
Thank you
View 6 Replies
View Related
Jan 9, 2008
I have a simple (3 tables) SQL Express database that I would like to downsize to Access, as I am considering removing SQL Express from my machine. I have no need of the extra capabilities of SQL Express; Access will do fine. Presumably I could just reconstruct the tables in Access manually and then populate them from SQL Express (eg. with a C# program), but I wonder if there is an easier (automatic) way?
Seems everyone is going the other way!
Thanks for any suggestions.
View 4 Replies
View Related
Jun 12, 2008
I have SQL Express installed on my machine. I can access it with MACHINE_NAMESQLExpress but not .SQLExpress Because of this, I cannot add a .mdf to the App_Data folder of one of my projects (I assume) because it says "cannot locate server/instance specified".
View 4 Replies
View Related
Jun 1, 2006
I am trying to complete a lab in the Microsoft self-paced training kit, Developing Web Applications with Microsoft Visual C# .NET.
They have provided an Access database named Contacts.mdb and a batch file named InstContacts.bat that uses InstContacts.sql to import the data.
I have installed SQLExpress, but when I run the batch file I get the following:
C:Microsoft Press...data>rem The following command line installs the Contact SQL database
C:Microsoft Press...data>osql -i InstContacts.Sql -E
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2].
[SQL Native Client]Login timeout expired
[SQL Native Client]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.
View 1 Replies
View Related
May 28, 2005
Im getting ASP.Net 2.0 Beta 2 setup on my home machine to kick around
with. Im assuming this error means i have SqlServer Express
mis-configured for integrated security. if so, how do i go about
making sure that the ASPNET user has at least read access to the
Database?
Error Message wrote:
Server Error in '/Kinetic' Application.
Cannot open database "aspnetdb" requested by the login. The login failed.Login failed for user 'GAMESASPNET'.
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: Cannot open database "aspnetdb" requested by the login. The login failed.Login failed for user 'GAMESASPNET'.
Source Error:
Line 13: protected void Page_Load(object sender, EventArgs e)Line 14: {Line 15: Membership.CreateUser("jeff", [password], [email]);Line 16: }Line 17: }
Source File: c:InetpubKineticDefault.aspx.cs Line: 15
View 3 Replies
View Related
Nov 24, 2006
situation
we intalled sqlexpress on a server 2003 ...work well... named server <deval-sqlexpr>
instance name of sql is <sqlexpress>
we changed the server name to <apps-ii>
after that we cannot access the sql instance <deval-sqlexprsqlexpress>
we cannot remove (with add and remove program) that unsuable instance.
we have an instance name <apss-iisqlexpress1> and its works well
we cannot change the server name back to <deval-sqlexpr> ...the server is now the DC....
QUESTION:
is it possible to remove and clean out that instance from the server.
Thank you
View 5 Replies
View Related
Sep 12, 2007
Hi all,
I followed this excellent tutorial (from Microsoft) about creating and using a SQLExpress db table internal to your website:
http://www.asp.net/learn/videos/video-08.aspx
and the site I created works just fine - locally. When I publish to my web host provider I get this error:
[SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
My web host provider supports .NET 2.0 but doesn't support MS SQL Server. But that should matter - right? Because I'm putting the db instance right in the website?
I did a search and followed some of the advice:
I went into the SQL Server Surface Area Config Mgr and set SQLExpress for local and remote connections and rebooted/republished. I also have SQL Server 2005 installed as a separate entity (if that makes a difference).
I still get the above error. This is the connection string from the web.config:
<connectionStrings><add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Customers.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>And this is the call from the markup:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [Customer]"></asp:SqlDataSource>
Does any know the fix for this?
Thanking you in advance
Pat
View 4 Replies
View Related
Apr 6, 2006
Hi,
How can i make Query analyzer access SQL Server in a network, I've already allowed netowrk connections in enterprise manager(but locally) and none of the users could access what can it be ?
Thanks
View 3 Replies
View Related
Nov 22, 2006
I initially created an Access application within Access 2003 which I subsequently migrated to SQLExpress 2005 (Tables only) using Microsoft SQL Migration Assistance for Access 2003 (SSMAA) and continue to use Access 2003 as a front end, this really was easy and worked perfect. Now I added a new table to my SQLExpress DB and need to link to it from my Access application but can not find a way to do so in the same way that the SSMAA does. I need to run the Access 2003 application in share mode from multiple PC in the LAN. If I try linking to the table using an ODBC connection I can only access from the PC where the link was done! Any ideas? THanks in advance.
View 4 Replies
View Related
Jan 19, 2007
I've recently moved an asp.net website from my PC to a network share because another tech it going to be working on it. I finally got the correct permissions on the network share and the correct .NET Framework settings on my PC to be able to run the app. Now I can't access the SQL server which is on a different server. Getting the following error:
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
How to I setup access to my SQL server for the app from any given PC on my LAN?
View 1 Replies
View Related
Oct 25, 2006
Hi,
How can I read a file placed in a shared folder on a network from MS SQL Server Stored Procedure.
Thanks.
View 1 Replies
View Related
Apr 1, 2008
Hi,
I'm trying to access an SQL server 2005 database over the network. I'm at a client location plugged into their network, but when I log into my laptop I'm not logging into their domain. I have to access their network by typing in the name and password they gave me.
I cannot seem to access the database from my computer. I try to create an ODBC data source in the administrative tools, but the drop down list of detected SQL servers does not show the server I am trying to connect to. The weird thing is, it does show many other SQL servers on their network... just not the one that I'm trying to connect to. And I know that the one I want to connect to is working correctly because if I remote desktop into one of their machines (which is logged onto their domain), I can see it fine in the drop down.
Does anybody know how I can get a connection to this database from my computer, even though I'm not on the domain?
Thanks!
View 5 Replies
View Related
Oct 25, 2006
Hi,
How can I read a file placed in a shared folder on a network from MS SQL Server Stored Procedure. Is there any kind of set-up I have to do. Can someone please help I am very new SQL Server stuff.
Thanks.
View 4 Replies
View Related
Jul 31, 2007
Hello!
I have a Java application that gains access to a SQL database using:
connection="jdbc:jtds:sqlserver://localhost:1433/databasename;user="+user+";password="+password;
//Load and register SQL Server driver
Class.forName("net.sourceforge.jtds.jdbc.Driver");
//Establish the connection
conn=DriverManager.getConnection(temp);
When I distribute this application throughout the local network, what would the jdbc url be for the application to find the SQL server?
Should I replace "localhost:1433" with something else?
The instance of SQL server is called SQLExpress.
I have my computer name, computer domain, ip address etc.
Is the port 1433 still the same?
How could the SQL database be located throughout the network?
Any advice appreciated.
View 8 Replies
View Related
Apr 23, 2008
Hello,
I am trying to create a linked server in a SQL Server 2000 instance that is linking to a SQL Server 7 instance on an NT4 box. I am able to link the server but when I try to run a query (create a view) I get an error. It is the same error that I got when accessing linked servers on SQL Server 2000 instances running on Windows Server 2003. In those cases i just had to follow this procedure to get it to work:
1.
Click Start, point to Control Panel, and then click Add or Remove Programs.
2.
Click Add/Remove Windows Components.
3.
Select Application Server, and then click Details.
4.
Select Enable network DTC access, and then click OK.
5.
Click Next.
6.
Click Finish.
7.
Restart the computer.
However, this is obviously not the same in NT4 on SQL Server 7. My question is how do I enable network DTC access on this system so that I can create and query the linked database?
Thanks!
View 3 Replies
View Related
Mar 22, 2007
I have just installed Vista on one of my home network pcs. I also installed Outlook 2005 with Business Contact Manager. It installs an instance of SQL Server Express.
I have created another database on this engine that I need to access from other PCs on my network.
The server address is PCNAMEMSSMLBIZ and I can access the data the database using this name from the the Vista PC (PCNAME).
When I try to acess the database using the same credentials (server, database, username (sa) and password) from an XP PC on the network - it times out and returns an error . My guess is that it is not seeing the database service at all.
I have SQL Server Management Studio installed on the Vista PC and have full access to the instance.
Server authentication is set for SQL Server and Windows Authentication mode.
Can anyone help me?. I need to access the SQL Server from the XP PC.
Ian
View 4 Replies
View Related
Oct 12, 2007
I cannot access my SQL Server 2005 Express using Named Pipes.
I have installed SQL Express 2005 on a Windows 2000 server.
I have enabled Named Pipes and TCIP.
I can connect from an XP Pro machine using MSSMS using both Windows Authentication and SQL Authetication.
I cannot connect to Named Pipes using a Windows 2003 server through IIS connect string. I have tried many variations on the connect string.
The connect string works with another SQL Server 2000 database.
var strConnection = "Provider=sqloledb;Data Source=XXX;Initial Catalog=XXX;User Id=XXX;Password=XXX;Network Library=DBMSSOCN"
or
var strConnection = "Provider=SQLOLEDB.1;User ID=XXX;Password=XXX;Data Source=SQLEXPRESS;Location=XXX;Initial Catalog=XXX"
I cannot connect using the command line from the remote computer. But it does work from the local machine.
osql /S\XXXpipeMSSQL$SQLEXPRESSsqlquery /E
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).
Does SQL Express have named pipes disabled for remote access? Can it be turned on? I have enabled it in the Surface Area Configuration.
Please help. I have spent the whole week researching this and trying to get it to work.
View 8 Replies
View Related
Oct 4, 2006
Sql server prompts "access denied"
while firing the following query
EXEC master..xp_cmdshell 'dir \servernamesharedfolder*.* '
how to access the folders and files existing in network drive.
View 3 Replies
View Related
Feb 12, 2008
Hey All,
This is my first time using the forums here nor am I a SQL programmer. I'm trying to help a coworker figure out how to access files from a network share (using a UNC path) from a different domain. Right now we have three domains - Production, Development, and the Local. There is a one-way trust setup with the development and local domains, so using cross domain accounts is easy. Unfortunately, we cannot setup one right now with our production domain to any of the other two domains. Is there a way to pass production credentials from our local or development domain servers to a production server share? Am I even approaching this in the right way? Maybe there is a different method, any help would be GREATLY appreciated!
-Andrew
Network Administrator
View 1 Replies
View Related
Jul 26, 2007
hi,
I migrated the Northwind database using SQL Migration Assistant for Access. it worked fine and I was able to link the access forms to Local machine SQL Server 2005 and it worked fine.
Now i want to link the same Northwind access database to Another Server on the network.
When i try to run the wizard again, it won't migrate the user objects like tables to server, it will just create a database and that is it.
it will give me this error too.
No User objects were selected.
any idea,
Thanks,
Fahim
View 1 Replies
View Related
May 19, 2015
Previously I was using SSRS to create a local website(native mode) for our domain users to access. I wonder whether it is possible to share the website to outside users(just like youtube, everyone can access it). Is there a possible way to achieve that?
View 3 Replies
View Related
Mar 28, 2007
Hi,
I have created and deployed an SSRS report, which I am able to access from the same machine using the URL. But I am not able to access the URL from a another machine in the same network.
What could be the problem, do I need to make some configuration changes to the reporting server?
View 2 Replies
View Related
Jun 27, 2007
I start receiving error 'Access is denied' executing following command:
exec xp_cmdshell 'dir \IP-ADDRESSSHARE_NAME*.*'
The configuration is following:
Two computers CO1 and CO2
Both computers are not in domain,
Both computers use the same local windows account to run their instances of SQL server 2005 and passwords for those accounts are the same
Both local accounts are in their local administrative groups
Both servers do not have configured proxy account. I execute sql commands under ther sysadmin account
If I execute this command from CO1 to CO2, everything works.
exec xp_cmdshell 'dir \CO2_IPSHARE_NAME*.*'
If I execute from CO2 to CO1 I receive access denied.
exec xp_cmdshell 'dir \CO1_IPSHARE_NAME*.*'
If I will log in to the computer CO2 under account of SQL server and execute the dir command from it, it works.
dir \CO1_IPSHARE_NAME*.*
Could you point me where to look?
View 12 Replies
View Related
Mar 6, 2007
I am trying to connect to a sql server from my asp.net application via windows authentication using the Network Service account. When I try to create a login for the ComputerNameNetwork Service account I get the following error.
I know I haven't mistyped it because I clicked the check names button and it showed as a valid id.
So what gives?
TITLE: Microsoft SQL Server Management Studio Express
------------------------------
Create failed for Login 'PREMIERDCNetwork Service'. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
Windows NT user or group 'PREMIERDCNetwork Service' not found. Check the name again. (Microsoft SQL Server, Error: 15401)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=15401&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
View 5 Replies
View Related
Aug 24, 2005
Hi, i need some help, i have a problem trying to access data in my local network.
I have a PC with ms windows server 2003 and ms sql server 2000, and i want that the others PC in the network can access the data. I installed the client sql server in the others PC, but i can't make it work. What i have to do?
Thanks
View 5 Replies
View Related
Jan 5, 2015
I have SQL Server 2014 (Enterprise) on Server A. The service runs under DomainAAdmin.
The Client machine is B, User credentials DomainBUser.
DomainBUser has a share on B that contains a BCP data file. DomainAAdmin has full access to this file.
If I log onto A (the server machine) with either DomainAAdmin or DomainBUser credentials, and run SQL Server Management Studio with Windows Authentication I can run BCP sucessfully using the following:
BULK INSERT [MyTable] from 'Bsharedatafle.tsv' WITH ( KEEPNULLS , KEEPIDENTITY ) However, if I log onto B, (the client machine and the machine hosting the share) and try to run the same bcp command, I get "Access is Denied".
View 5 Replies
View Related