1) Is SSCE (SQL Server Compact Edition) a local only database? Meaning I can't access it from anywhere else but the host machine?
2) It supports up to 256 connections locally?
3) Are there any good tools available for converting an empty mdf with no stored procedures or triggers to a CE sdf?
4) When you run the install for this, does it open any ports at all? I wouldn't think so but my boss is convinced it does.
5) Does SQL Server Management Studio open any ports by default upon installation?
Thanks for reading and any insight you can provide :)
Yes. It is a local only DB, and cannot be accessed from other machines
Not sure, I've never hit a
limit, but I know that there is a
4GB limit on the file size
None that I'm aware of
Again, none that I'm
aware of (at least my software and
corporate firewalls haven't been
complaining)
Again, none that I'm
aware of. The Management Studio
itself is not the DBMS package
(which does require some ports to be
opened). That said, I've never tried
to install the Management STudio
without either SQL DEVELOPER or SQL
EXPRESS.
Just a note: I answered Question #1 on the concept of attempting to use the SSCE as a SERVER which a secondary computer attaches to, as opposed to mounting the DB File from a Shared Drive. For example, in SQL Express, I can place an instance onto a server, and have multiple applications connect to it, and I can also mount the file associated with a DB into my local instance of SQL Express from a shared drive. In SSCE, one can mount the file, but can't act as a server.
the database file (normally an sdf) can happily be on a remote share but only one remote machine can access it at a time.
It supports 256 connections which can be from different processes.
Don't know sorry - I have used this project with some minor edits to copy from sql server effectively.
When installing from the package it might try to ping the windows update service for an up to date check (I haven't checked) when running via an xcopy deployment I see no open ports (you do not need to install SqlServerCE, simply placing the required dll in your private bin path (normally the same folder as the executable) is sufficient.
I don't know
As to the open ports the best way to check is simply to do an install with something like wireshark running.
Related
I am new to DBMS and MSSQL server and was studying about installing multiple instances of sql servers in one machine. what I failed to understand is why is an instance of sql server called a copy of sqlservr.exe executable when that is a software created instance where as the other is an OS service for my machine. I am confused big times.
I imagine you are referring to this article:
Database Engine Instances (SQL Server)
Windows Services work like this: You can use the same .exe for multiple entries in the "Services" table, as long as the "Service Name" in the list is unique.
So, if you want to run multiple SQL Server instances on the same machine, you will have multiple windows services with different names (in particular related to the instances names you choose during SQL Server installation) but they still rely on the sqlservr.exe file.
I think that the documentation you are reading talks about "copies of sqlservr.exe" just to let you know that there is no shared memory or state between different SQL Server Instance processes. So, everytime a new instance of sqlservr.exe is asked to the OS, it reads the file binary data and maps it to a different memory space.
Here you can find more detailed informations about that .exe:
sqlservr Application
I have been creating an access database for my assignment. I am using SQL Server 2014 for the datasource for the access tables. Now the problem is that according to the assignment
I need to make the db multiuser over network
it has to be an accde file
In short, how can I connect to SQL Server when I deploy the database on my college pc. And how to make the accde work on my school network where the SQL Server is not the one I am using at my personal machine.
It is a simple book entry database containing few tables including print button and picture of book attachment.
Use a DSN-less connection. Provide a function that changes the connection string on all linked tables.
See Linked table ms access 2010 change connection string
or Changing SQL connection information for DSN-less Access frontend
You don't want each user having to enter the server information into the frontend. So take your frontend to the school network, run the function to re-link all tables, then create the .accde, then distribute it.
If the sql server is on your same network, then all you have to do is link your tables to the production sql server. You then crate the accDE, and that can be deployed to any machine.
Access by “default” creates a DSN less connection. So if you follow the defaults when linking to sql server (use a FILE dsn), then once access links to those tables, access “converts” the DSN to a DSN less connection for you.
What this means is that you do not need any VBA re-linking code. When using a file dsn, access converts these to DSN less for you. Once linked, then Access ignores and does not use nor require the original DSN.
So your steps are:
Linking to the production SQL server on the network. Just make sure you use the “default” file dsn.
Once you are sure the accDB works with that production SQL server, you can then compile/create the accDE. That accde will now function on ANY workstation (and this work since access by default creates and uses and makes a DSN less connection for you).
You do NOT need any VBA re-link code.
You do NOT have to write some VBA code to create a DSN less connection (access does this automatic for you).
Of course, during this re-link process, your computer will have to be on the same network with the production SQL server you plan to link to.
If you were some off site worker, and you cannot be on the same network during the re-link process, then YES you would have to adopt some VBA code to re-link for you. However, if you can be on the same network during this re-link process, then at that point you can create the accDE file, and it can be distributed to any workstation on that network without further configuration.
About the only issue would be to ensure that you link to this production server using the standard and legacy “SQL Server Driver” as your linking choice. You can use the later “native 11” etc. drivers, but they are not installed by default on each version of windows and thus this ODBC driver may well not be installed on each workstation (but the standard SQL Driver is installed by default.
Again:
You do not need some VBA code or re-link code to create a DSN-less connection. Access by default when choosing a “file” DSN will create DSN-links for you – you thus don’t need any special re-link code, nor do you need some VBA re-link code to achieve DSN-less links.
I have made a program using visual basic 2010, which contains a database. When I copy my program across to another computer and attempt to debug it, I get the following error message:
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
Additional information: Login failed for user 'Aaron\Aaron'.
And the following line of code is highlighted within the form load sub:
Me.Table1TableAdapter.Fill(Me.Database1DataSet1.Table1)
When I publish the program it also fails to run on any computer other than the one I created it on.
Any help would be much appreciated as I'm still very new to programming, thank you.
If you're trying to access the database over the network, use:
server="HostMachineIP\Aaron" (e.g. "10.1.1.1\Aaron") and make sure firewall port 1433 is open.
If you're transferring the database to another system, set your connection string to: ".\Aaron" - the .\ references the local system.
There are lots of things that could be the issue, but for starters, you probably don't have the same user set up on your other computer that you had on your first one. That is probably why you are getting the error about Login failed for Aaron/Aaron.
Additionally, you may well have a database on the first computer that is not on the second. Transferring the program does not copy the database with it. So you should go into SQL Server on your first computer and compare it to SQL Server on your second one. Likely there are differences in users and databases that will cause problems.
From your description, it sounds like maybe you aren't using a "server" yet.
You won't have much luck if you are moving/copying the .mdf file. Your dev environment will allow this, but not other machines. It will work better if you install SQL Express on one of your machines and use it to host your .mdf (database file). That machine will be your "server".
Download SQL Server Express and install it
Download SQL Server Management Studio. Use it to attach your .mdf. Set permissions. Allow remote connections.
Check your windows firewall (on the server) to make sure port 1433 is open (SQL server communicates across a network on port 1433.
Each machine (except for the server) will need to authenticate to the server. I find this is easier when I map a drive to the server. On the server, make a folder on the hard drive called "temp", share it to the network. On each machine, explore the network, find your server, find the share (temp), map a drive to it.
Once you have done these things, then these other recommendations will work.
I am using SQL CE 3.5 for one of my project, the front end is WPF application which process the given files and dumps the data to SQL CE database.
Presently application and DB is on same machine.
Client wants that he should be able to run the application from any machine on the network but database should remain on shared location of Server.
User will select the path to SDF file in the Application and then when any file is processed application will dump the data to database.
My question is, if keep SDF file on network shared location and access it from any machine then does it will work fine or could give problem?
actually, it is not possible - SQL CE does not support network-hosted operations: everything related to the sdf-file (temp data) is recorded to the local machine, not network source, thus server is unable to process requests correctly.
You can use SQL Express Server that acts like data storage, for the local client the only thing you need is Microsoft Synchronization library 2.1 (it also works with SQL CE 4.0 SP1)
Summarising, create the SQL CE database, fill it with tables, index them, then port it to SQL Server express, add sync module to your app (in a separate thread ofc) and that's it.
Another solution is to use MS Access DB, which allows such mess, but it is incredibly slow not to mention no way to allow simultaneous writing to the db.
Relevant background-
I'm a noob working my brains out for over a year into trying to make a database in MS SQL Server 2008 Express with the end idea for the front end being Access. After tons of reading and slaving over my schemas and three major revisions I'm finally ready to connect it to Access and I'm just striking out all around. The Microsoft Access IN and OUT book says it has instructions for this but they're on the included cd in the bonus material which seems to be the only part of the cd that will not work. Everything I've found on the internet hasn't gotten me there. The best I think I've found was an answer on this site but even the list of things to do given as the answer have me hitting some walls that I just haven't the foggiest of how to get through.
I'm going to lay these out and mention what I have and haven't done with each.
Just for background I'm running Access 2007 on a Vista machine that I'm pretty sure is up to date on the service packs (I should have 7 in a few days, it's in the mail finally) and I'm running SQL Server 2008 Express with the management studio.
Here's the answer that I was referencing--
The answer was given by the user "Renaud Bompuis" at the following link
Connect Access 2007 to SQL Server 2008 Database
There should be no issue with connecting Access 2007 to a SQL Server 2008 database.
You need to make sure that:
1.
Your SQL Server 2008 database is accessible, ie that it isn't locked down and that it is accessible to the machine(s) where you will have your Access 2007 application.
A few things to check:
* In SQL Server 2008, go to Properties > Connections > Check "Allow remote connections to this server".
I checked and the check box is checked to allow remote connections. Since this is on the same machine I don't know if this is vital, but whether or not it is it's taken care of to the best of my understanding.
* Enable TCP/IP in the Configuration Manager.
didn't think this was necessary since it's on the same machine but I did it all the same.
* Make sure the firewall allows incoming connections on TCP port 1433.
This is one thing I didn't do since I really couldn't see how a firewall would get in the way if both instances (the SQL Server Express and Access 2007) are on the same machine under the same admin login. But if I'm wrong on this please tell me how to go about altering things.
* You can also start the SQL Server Browser Service so your SQL Server instance can be found.
Did this, even restarted the machine, still can't get Access, nor the ODBC, to pull up the SQL Server 2008 instance on the machine. Nothing.
2.
You have created an ODBC DSN (a System DSN) using Windows ODBC administration tool. If you're running on a 64 bit system, make sure that you're using the 32 bit version of ODBC to create your DSN, otherwise it will never be visible to Access which is a 32 bits application.
Went in there to make the system DSN and when I choose the SQL Server Native Client 10 thing and go to hit the drop down menu to choose the data source it pauses and then nothing comes up, nothing to choose from at all.
3.
Once you have created the ODBC link (and tested it works) on the machine where Access is installed, you can just link the tables: In Access 2007, in the External Data ribbon tab > import > More > ODBC Database.
Then select the DSN you create for your SQL Server 2008 database and chose which tables you want to link.
So clearly this last part I can't even try since I can't even get an ODBC link.
I have a feeling, being a self taught noob and all, that I'm probably missing something obvious to a professional or seasoned amateur but regardless of what my problem is it's driving me nuts. Having a good portion of the last year of my life put into this I'd really like to be able to make progress finally on the front end so that I can finally get some utility out of all my effort beyond just writing queries in SSMS.
Thanks in advance for any and all help anyone can give.
OK, so you're obviously having trouble creating the DSN. Have you tried using "SQL Server" or "SQL Native Client" instead of "SQL Server Native Client 10.0" as the driver? I've found a webpage with a few screenshots on creating an SQL Server DSN (scroll down to the section "Creating a ODBC DSN"), maybe they can give you some guidance.
If it all fails, could you provide a screenshot of the part of the DSN creation process where you get stuck?
I appreciate all yer'allz help. Even though I didn't really see much new and nothing directly helped me I did end up looking in the SQL Server Configuration Manager and the 'VIA' (whatever that means) was the only thing I hadn't enabled (since I hadn't read anything about it in all my investigations--I usually shy away from making modifications to settings that I don't have someone specifically telling me to modify) I hadn't previously touched it nor thought much of anything about the fact that it was the only thing I'd yet to enable.
Well I enabled it, restared services and YAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!
I'm now able to (and have successfully) created a ODBC DSN AND I've got Access connected to my database!!!!
I like this site!
Thank you all for caring and for presenting me stuff that led, however fumblingly, to a solution!
Be glad we are only connected through the internet otherwise I'd kiss ya!