Is it possible to ceate a DSn to my FTP Account - sql

i using sql2005, my hosting company allow me to use 300mb for my sql server. i wand to increase my sql database size
but i have 300GB is available in my FTP account.
Is It possible to create a DNS (some thing like MS ACCESS below) to my FTP account
<%
ConnStringHB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("newdb2.mdb")&";Persist Security Info=False"
%>
hoping ur support

Since you're using SSME, that implies SQL Express.
If SQL Express is running on the same machine as your FTP folder, and if the SQL Server identity has access to that folder, then you can either use SSME to attach to an MDF file in the FTP folder, or use the AttachDbFilename property in your connection string to do it automatically.
However, keep in mind that SQL Express only supports a database size up to 4GB maximum -- so you still wouldn't be able to use the full 300GB, even in the best of circumstances.

Unfortunately, no. FTP is a protocol for transferring files, not for random access on files, which would be required for a database with reasonable performance.

Related

SQL Server encrypt mdf file

I have a database SQL server ,so I have 2 files (mdf and log).
how to protect mdf file from attach
SQL Server Transparent Data Encryption can prevent people from using the files elsewhere unless they have the appropriate certificates.
But if they've gained access to the server to the point where they can access those files directly, you have to consider the possibility that it's completely compromised.

How to share sql server 2008R2 database

I want to share my SQL Server 2008 R2 database between some computers on the same network without using a Server. How can I do so? I mean i just want two users access the same Database through A network or LAN. Both can use database,update database,delete data from database
is it possible ?
The file: mdf MS SQL can not be shared directly.
Although, once installed MS SQL any user with privileges on the database can access it.
It is not necessary to share the MDF file. MS SQL is responsible "sharing" the users enter data accessing it.
Greetings.
SQL Server can only be installed on a Windows Server system (except for the Developer's edition, and SQL Express).
However, all versions (except CE) can be shared among multiple clients. Just start up the server, make sure that the TCP protocol is enabled (using the SQL Server Configuration Tool), and that your Windows Firewall is not blocking port 1433.
A server just happens to be a term used for otherwise a "normal" computer. The designation server usually means that it is dedicated for a certain task. Technically speaking, any computer can be a server--even your own workstation while you are using it for other tasks. So, just put the database on one of the user computers which is on the network (hence accessible to desired users on the network) and go for it.... Good luck!

Can SQL Server Express LocalDB be connected to remotely?

I am looking into using the new SQL Server Express LocalDB (I think it is code named "Denali") for a desktop application.
It is currently running with SQL Compact, but the user is wanting to share the database between multiple PCs on a network. Unfortunately this is not something that SQL Compact can do, so I am investigating other solutions.
The client requires the ability to send database files easily to other sites or to back them up to a flash disk, so I am avoiding going to SQL Express because there is quite a bit of "administrator" knowledge required to backup and restore.
So, my questions is, does the new SQL Express LocalDB support remote connections to the database over a network and/or through a shared network folder with the mdf file in it?
LocalDB does support supplying a path for an attached local DB in it's connect string (AttachDbFileName) hence the shared network folder option.
NOTE: This question pertains to "LocalDB" the new version of SQL Express 'Denali' and not to SQL Server Express 2008 or prior.
See article here announcing LocalDB's release: http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx
No, SQL Server Express LocalDB doesn't accept remote connections.
The idea with shared network folder might work, but only if you are able to make sure the LocalDB instance is shutdown before you try to copy the file. Also keep in mind that only one LocalDB instance can have any given database file open at the same time. and don't forget about the log files!
Additional security warning: unlike SQL Server Compact databases, SQL Server Express databases (including LocalDB ones) are not designed as secure data exchange format. For instance, they can contain malicious code in .NET assemblies embedded in them. So you should never open databases from untrusted source.
Maybe providing the customer with a simple tool that automates the backup process would be a better idea?
This isn't a fresh thread, but I would like to share my experience with SQL Server Express database LocalDB.
I have a WPF C# project using SQL database with LocalDb Engine. It is working fine no problem, I can use the database with the WPF app. I wanted this app to work on network with more PCs.
On the network another PC can use the database from my PC using UNC path in the connection string.
It seemed to me the remote connection is working. However when the remote PC is connected, I am not able to use the database with my local WPF app. If I run my app first the remote PC could not connect. So this tells me that the remote connection is working, but the multiple connection is not allowed.
OK, I didn't give up and I run the app from my PC twice and I saw it is working which tells me that the same SQL LocalDB engine can handle multiple connections locally only.
I hope this experience will help someone. Thanks.
In short, yes it can. Here is a tutorial on how to configure it.
Also, here is another post with a potential issue that might occur.
Both explain how to configure SQL Server Express to accept Remote Connections.

Why cant I create a database with mdf file?

I have a feature in visual studio which I have never really understood.
I am able to 'right-click' on the App_Data folder and then I am able to select 'Sql Server Database'. I dont really understand how I can create a db using just an mdf file? I thought the sql service was responsible for manipulating these files? And that you have to create the db using the 'sql management studio' interface?
Im confised as to how we can essentially just have a lone file and run a db from it for a website?
You're application is still connecting through the SQL Server service but it can instruct the service to attach to a specific mdf file at runtime through a connection string. e.g.:
"Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;"
All SQL Server databases are represented as one (or more) .mdf files and usually .ldf files as well (ldf is the log file, mdf is the data file.) An .mdf file is a file but it is highly structured and maintained by SQL Server. The way SQL Server uses this file is very different from serving up CSV data, as a simple example. SQL Server breaks the file into pages and serves the requests for reads and writes via this paging system. It is indeed like a file system within a file system. If you think about it it does all make sense. The data has to get persisted to disk and that disk persistence has to come in the form of a file or files.
When you installed Visual Studio you also installed SQL Server Express. This gives you the ability to create and use SQL Server databases.
If you were to deploy your application you would then also need to have a SQL Server (Express) install on the web-server you were using (at least because you don't want to use your development database server in production).

protecting sql server database file

what is the recommendations should i do to prevent anyone from hacking or getting the sql server data base file (MDF File) ?
Note : i use sql server 2005
Some simple recommendations:
Do not expose access to your database server to the internet. It should be behind a firewall that only allows the web server to access it over a particular port (not the default).
Do not allow remote desktop or any other type of similar access from external connections. For internal connections, ensure that the passwords follow some type of policy. For example, require numbers, extended characters, etc.
Keep the database files in the normal data directory for sql server (file security is already set up for you).
Use transparent database encryption: http://msdn.microsoft.com/en-au/magazine/cc163771.aspx#S5 and How to protect the sql server 2005 MDF file
Make sure file sharing is turned off.
Make sure the only people who can access that server are the ones responsible for it.
Read up on sql injection to prevent other access mechanisms.
Use Active Directory security for database user accounts.
Use SSPI for the db connections so that you don't have a username/password stored in your web.config
Make sure that the network connection between your web and database server is encrypted via kerberos.
The same way you would protect any other file on your server.
I'd use a firewall and block every port than isn't needed.