Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Thursday, March 29, 2012

consolidate two data files

How can I combine two data files (i.e .mdf and .ndf). We had two data file in our old server due to disk limitation. In the new server we don't have such limitation so we like to consolidate the two file in one. What is the best way to accomplish that?
ThanksFollow this:
http://groups.google.com.au/group/microsoft.public.sqlserver.server/browse_thread/thread/d7fa8af9c5ca5ca/71636c29fdf2666c%2371636c29fdf2666csqlsql

Tuesday, March 27, 2012

Considerations... Backing up IIS 6 web files and SQL Server 2005 Express database

Anyone know of a good "free" way to back up web files and SQL Server 2005 Express Database?

I was able to use Windows Server 2003 Backup utility to back up the folder where the Databases were stored, as well as the web files, with no errors.

But I have heard a lot of discussion that you can't just simply backup SQL Server data files?

I'm wondering how sound the backup I've created is...

Any suggestions?

Try the link below to dowload the eval version of the full SQL Server 2005 it is good for 180 days so you have to buy the developer edition which is $60 or less later. Install it as a named instance and register the Express so you can use the backup and restore wizard to backup your databases. You don't need any third party tool to backup SQL Server if your databases are less than 1000. Hope this helps.

http://www.microsoft.com/sql/downloads/trial-software.mspx

Sunday, March 11, 2012

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properl

I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

I have two SQL Server instances installed.

1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

Hello,

Attach the files to your SQL server instance using for example the SQL management Studio and change your connectionstring to connect into this database.

|||

Well the thing is that I dont have a database created yet. I am trying to create a new database. If i create a database in SQL 2005 then my connectionstring will point to the database on sql server. I need the database to reside in the VS project like a stand alone .mdf file so that I can deply the database with my project.

Does that make sense? Thanks for your help.

|||

Hi,

You may open your Machine.Config file (the file is in %SystemRoot%\Microsoft.NET\Framework\ver. number\CONFIG ). Try to find the ConnectionString node, modify the setting and make it look like

<add name="LocalSqlServer" connectionString="data source=UserLT\SQL2005;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />

Thanks.

Connection to sql server files

I was trying to add a database
as a new item in solution explorer

But i am getting an error like this

Connection to sql server files (*.mdf)require SQL server 2005 to function properly.Please veryfy the instaltion of the component

what minght be the reason for this?

I have installed SQL server 2005 well and, controls like Datagrid view works fine in some other trials

Hope some one can help me

(NB:I have installed .net and sql server in diffrent partitions of my hard disk)

.net sujith

sujithukvl@.gmail.com:

I was trying to add a database
as a new item in solution explorer

But i am getting an error like this

Connection to sql server files (*.mdf)require SQL server 2005 to function properly.Please veryfy the instaltion of the component

what minght be the reason for this?

I have installed SQL server 2005 well and, controls like Datagrid view works fine in some other trials

Hope some one can help me

(NB:I have installed .net and sql server in diffrent partitions of my hard disk)

.net sujith

Why no one takes care of me :(

|||

It will be better to create your database programmatically like in the links below. Hope this helps.

http://support.microsoft.com/default.aspx?scid=kb;en-us;305079

http://www.functionx.com/csharp/adonet/Lesson04.htm

Sunday, February 19, 2012

Connection string for big uploading files

I have a webpage where I want to upload pdf files to my database (arround 2 MB). Putting them inside the database is the choice based on audit definitions the client has.

The problem is that for big file uploads, I get the "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."error.

I believe the solution is expanding the connection timeout time in the SQL connection. But I don't want to do that in web.config, as a small timeout is good for every page except this one.

What I was thinking about was something like, on button command:

- "create new connection string"

- use that connection string to upload the file using the datatables and tableadapters

- turn back to the default connection string.

How do I explicitly tell the system to "use THIS connection string on the next task" ?

Alternatively, another way of doing is also appreciated!

Doesn't sound like a database timeout. However, if it were, then you control the command timeout on the sqlcommand object, not the sqlconnection. It has nothing to do with the connection string.|||

How do you access the sqlcommand object? Because I do not explicitly declare any sqlcommand, open, close, etc; I declare a TableAdapter object, a DataTable Object and then access the query method of that datatable, so basically two lines to execute the query (that is actually in a tableadapter in app_code). How can one change the command timeout using this method?

|||No idea, I never use table adapters. IMHO they suck, and serve no real purpose other than to try and abstract out something that isn't that hard to begin with. If you want something done right...|||

In the Solution Explorer, go toyourDataSet.xsd->openyourDataSet.Designer.cs, then locate the TableAdapter class, you'll see it has a member like:

private System.Data.SqlClient.SqlCommand[] _commandCollection;

Then in some event (may be InitCommandCollection) you can set the property of the SqlCommands, for example:

private void InitCommandCollection() {
this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate," +
" ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, \r\n " +
" ShipPostalCode, ShipCountry\r\nFROM Orders";
this._commandCollection[0].CommandType = System.Data.CommandType.Text;
this._commandCollection[0].CommandTimeout = 6000;
}

Sunday, February 12, 2012

Connection provider for DBF file

Hi, I want to upload some DBF files to SQL server using Integration Service.
I already check every provider, but not found provider for DBF file.
Anyone can help me?

Hello,

When you create a data source, just use the provider "Microsoft Jet 4.0 OLE DB ..."

Then try a OLE DB Source or a Datareader source over the data source created.

Hope it helps

|||

Hi!

You can download the FoxPro and Visual FoxPro OLE DB data provider from msdn.microsoft.com/vfoxpro/downloads/updates. It works for all versions of Fox tables.

|||

Hi!

While the Jet OLE DB data provider will work for older Dbase IV formatted DBFs it will not work for Visual FoxPro tables. The FoxPro and Visual FoxPro OLE DB data provider works with all versions of FoxPro DBFs. As I said in my other post, it can be downloaded from msdn.microsoft.com/vfopxor/downloads/updates.

|||You're right.
Thanks a lot.