Showing posts with label express. Show all posts
Showing posts with label express. Show all posts

Sunday, March 25, 2012

Copy databases from SQL 2005 server to SQL Express

Two Windows 2003 server,
one with SQL 2005 server,
another with SQL Express.

Is it possible to copy databases from SQL 2005 to SQL Express?

Thanks.Thanks (Thanks@.work.com) writes:

Quote:

Originally Posted by

Two Windows 2003 server,
one with SQL 2005 server,
another with SQL Express.
>
Is it possible to copy databases from SQL 2005 to SQL Express?


Yes, but I don't think you can use the Copy Database Wizard, but you will
have to do it by hand. Which is not very difficult anyway.

On source machine backup database, and make note of the logical
filenames. (You see these with sp_helpdb).

On target machine to do:

RESTORE db FROM DISK = 'pathgoeshere'
WITH MOVE 'logicalfilename1'
TO 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\db.mdf',
WITH MOVE 'logicalfilename2' TO
TO 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\db.ldf',
REPLACE

I've used MSSQL.2 for the target, but you use the number for your
Express instance. You find out which is which by looking around in
the directories.

This does not migrate logins, and mappings user and logins are likely
to be out of whack. You can use sp_change_users_login to fix.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thanks.

Same system setup as before.
Computer A with SQL 2005
Computer B with SQL Express

Is it possible to connect the SQL Express in B from the A using the SQL
2005?

I tried it, but failed.

If I can do this, that means I can use Import function in SQL 2005 to import
Access databases into SQL Express.|||Am_I_right (Am_I_right@.world.com) writes:

Quote:

Originally Posted by

Same system setup as before.
Computer A with SQL 2005
Computer B with SQL Express
>
Is it possible to connect the SQL Express in B from the A using the SQL
2005?
>
I tried it, but failed.


How did you try? How did it fail?

You can always set up a linked server, but it's unclear to me if that
is what you tried.

Quote:

Originally Posted by

If I can do this, that means I can use Import function in SQL 2005 to
import Access databases into SQL Express.


No, that is what you can do with a linked server. You could however
import you Access database into SQL 2005 non-Express, and then
copy the database with backup/restore as I described in my previous
post.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns9874F08E810F0Yazorman@.127.0.0.1...

Quote:

Originally Posted by

Am_I_right (Am_I_right@.world.com) writes:

Quote:

Originally Posted by

>Same system setup as before.
>Computer A with SQL 2005
>Computer B with SQL Express
>>
>Is it possible to connect the SQL Express in B from the A using the SQL
>2005?
>>
>I tried it, but failed.


>
How did you try? How did it fail?
>


Computer A and Computer B are linked with network cable through a network
switch.
Both using MS Win 2003.
Thanks.

Quote:

Originally Posted by

You can always set up a linked server, but it's unclear to me if that
is what you tried.
>

Quote:

Originally Posted by

>If I can do this, that means I can use Import function in SQL 2005 to
>import Access databases into SQL Express.


>
No, that is what you can do with a linked server. You could however
import you Access database into SQL 2005 non-Express, and then
copy the database with backup/restore as I described in my previous
post.
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

|||(Thanks@.work.com) writes:

Quote:

Originally Posted by

"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns9874F08E810F0Yazorman@.127.0.0.1...

Quote:

Originally Posted by

>Am_I_right (Am_I_right@.world.com) writes:

Quote:

Originally Posted by

>>Same system setup as before.
>>Computer A with SQL 2005
>>Computer B with SQL Express
>>>
>>Is it possible to connect the SQL Express in B from the A using the SQL
>>2005?
>>>
>>I tried it, but failed.


>>
>How did you try? How did it fail?


>
Computer A and Computer B are linked with network cable through a network
switch.
Both using MS Win 2003.


Just because you connect the computers with a network cables does not
mean that the two SQL Servers are connected. You must also set up a
linked server. Although it depends on what you want to do. Linked servers
are needed only if you want to access tables on server from the other.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||I have tried your method, but could not work on my machine.
Sorry, I am actually have zero knowledge on SQL

Set up SQL sever is ok, import Access to SQL is also oK for me.
but couldn't figure out how to import Accees into SQL Express.
either directly or through another SQL 2005 server.

Next I am going to try import Access into MySQL by using Premiumsoft
Navicat.
If that work, I will decide to use MySQL, because it is open source and
lower cost.

Tuesday, March 20, 2012

Copy database with full-text index

Hi,

Can anyone please explain the proper precedure for copying a SQL Express database between two instances?

I am accessing the database without problems from a local web application. And I want to copy the database to a SQL Express instance on another server, running the same web application.

I run into two problems every time I copy:

1) Orphaned users. I have to drop the database users and the re-map the server users to database users.

2) The full-text indexes are not available after copy, so I have to drop and re-create the indexes and the catalog.

And I suspect there's an easier way..

Regards,
Jens Erik

Hi Jens,

The behavior with users is expected. Users and Logins are indelibly linked and only the Users are stored in the database. When you move a database to production, you have to create the appropriate Logins on the new server and then link them to the Users in your database.

Full-text indexes are another odd case. These indexes are stored outside of the database as they are created by an external process. Again, just copying the mdf file will not copy and move the Full-text index. Backup/Resore does handle the Full-text index, so you should consider that option. There is more information about this in BOL. Check out http://msdn2.microsoft.com/en-us/library/ms190436.aspx.

Mike

Copy database with full-text index

Hi,

Can anyone please explain the proper precedure for copying a SQL Express database between two instances?

I am accessing the database without problems from a local web application. And I want to copy the database to a SQL Express instance on another server, running the same web application.

I run into two problems every time I copy:

1) Orphaned users. I have to drop the database users and the re-map the server users to database users.

2) The full-text indexes are not available after copy, so I have to drop and re-create the indexes and the catalog.

And I suspect there's an easier way..

Regards,
Jens Erik

Hi Jens,

The behavior with users is expected. Users and Logins are indelibly linked and only the Users are stored in the database. When you move a database to production, you have to create the appropriate Logins on the new server and then link them to the Users in your database.

Full-text indexes are another odd case. These indexes are stored outside of the database as they are created by an external process. Again, just copying the mdf file will not copy and move the Full-text index. Backup/Resore does handle the Full-text index, so you should consider that option. There is more information about this in BOL. Check out http://msdn2.microsoft.com/en-us/library/ms190436.aspx.

Mike

Monday, March 19, 2012

Copy database from SQL Server Standard to SQL Server Express

Hello,

I am currently faced with a problem of copying a database from SQL Server 2000 to SQL Server 2005 Express using the SMO classes. I am using VB.NET and i'm just trying to take an exact copy from the server. Any ideas on how I would do this in code?

Any links would be great.

Thanks.

Rob

Try this code, it should solve your problem:

Dim srv As Server
Dim srvConn As ServerConnection
srv = New Server("MyServer")
srvConn = srv.ConnectionContext
srvConn.LoginSecure = True

Dim db As Database

db = srv.Databases("AdventureWorks")
Dim strDBName As String
strDBName = "TestDatabase"

'Define a Transfer object and set the required options and properties.
Dim xfr As Transfer
xfr = New Transfer(db)
xfr.CopyAllObjects = True
xfr.CopyAllUsers = True
xfr.Options.WithDependencies = True
xfr.Options.ContinueScriptingOnError = True
xfr.DestinationDatabase = strDBName
xfr.DestinationServer = srv.Name
xfr.DestinationLoginSecure = True
xfr.CopySchema = True
'Script the transfer.
xfr.TransferData()

|||

I've tried that code, still no luck.

My current code is the below,

LocalSqlServer2005Connection.Connect()
Dim localDb As New Database(LocalSqlServer2005, "CopyOfDb")
localDb.Create()
Dim xfr As New Transfer(db)
xfr.CopyAllTables = True
xfr.Options.WithDependencies = True
xfr.Options.ContinueScriptingOnError = True
xfr.DestinationDatabase = "CopyOfDb"
xfr.DestinationServer = LocalSqlServer2005.Name
xfr.DestinationLoginSecure = True
xfr.CopySchema = True
'Script the transfer. Alternatively perform immediate data transfer with TransferData method.
xfr.TransferData()

This throws

Invalid access to memory location. (Exception from HRESULT: 0x800703E6)

However if I remove xfr.TransferData() and replace it with xfr.ScriptTransfer() then just a empty database is created with no data.

|||

Hello Guys,

I've managed to fix the problem now, the error caused was because I never had Service Pack 1 installed for SQL Server Express. if you are having the same problem go to http://msdn.microsoft.com/vstudio/express/sql/download/ and download service pack 1 then try.

Least it works now 4 hours later :-)

Rob

Copy database from remote server to local?

My domain host hosts my MS SQL 2000 database. I am able to connect to it
from my workstation using the MS SQL Server Management Studio Express
application. I want to copy from the remote server, modify it, and upload it
back to my domain host.
I don't see any method of copying the remote database to my local machine.
Help?Hi,
u can backup the database to the remote server or mirror the backup
to remote location.
u should have permission on the shared folder of the remote server.
for mirroring see help
HTH
from
Doller|||Hi,
u can backup the database to the remote server
u should have permission on the shared folder of the remote server.
HTH
from
Doller|||"doller" <sufianarif@.gmail.com> wrote in message
news:1145437778.697809.321740@.z34g2000cwc.googlegroups.com...
> Hi,
> u can backup the database to the remote server
> u should have permission on the shared folder of the remote server.
I am able to generate the backup on the remote server, but I have no access
to actually download the backup once generated.
I do have a local MS SQL 2005 server, but I can't see any method to backup
from the remote server to the local server.|||BACKUP is executed by SQL Server, so the backup file will be generated by SQL Server. Either direct
the file to the desired location when you do the backup (UNC path) or do it locally and then grab
the file (COPY, FTP etc).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Noozer" <dont.spam@.me.here> wrote in message news:6SC1g.41524$P01.35165@.pd7tw3no...
> "doller" <sufianarif@.gmail.com> wrote in message
> news:1145437778.697809.321740@.z34g2000cwc.googlegroups.com...
>> Hi,
>> u can backup the database to the remote server
>> u should have permission on the shared folder of the remote server.
> I am able to generate the backup on the remote server, but I have no access to actually download
> the backup once generated.
> I do have a local MS SQL 2005 server, but I can't see any method to backup from the remote server
> to the local server.
>
>

Thursday, March 8, 2012

Copy Data from Access to SQL Express in Code?

I have tried the upsize wizard from access 2000 and access 2003 and get records transfer in 90% of the tables I have data stored an 89 meg MS access database (2003) on an XP machine. I can use, compact and copy etc in MS Access without problem.

With the upsize, I get No errors, just does not reliably move ALL data. I have run it multiple times and occasionally get some data in these tables, but never all data in a few tables and inconsistent.

========================================

So I have written code to copy the data from the access database and move it field by field into an Upsized database that was structure only, no data.

I have ONLY one Identity field (autonumber in MS access) that is the Key Relationship number to all other tables.

1 questions and one "bug" report need solutions to both.

Question: How can I copy the value from the MS access autonumber field to the identity field. (Some of the autonumber rows have been deleted so not always sequentiall) (I can do this moving data in code between to MS access databases that have autonumber fields)

=========================

I tied an elaborate write around to addNEW and then read the data in the newly created row. Reading the Identity field, I look up that number in the MS access database. Then I copy the ACCESS data to the Newly created table row in SQL Exress and update.

It works fine for about 30 record updates, then the Identify field stops giving me the correct sequence for the Identity field value. Makes it impossible to make sure all of my Access rows get copied. Tried transactions but not supported with the ADODB configuration, but doubt that would help.

Example data returned in the SQL Express recordset, when I read the Identify field back I get

1,2,3 etc 31, 33, 32 (out of sequence) then it (my code) can't figure out the out of sequence and end up with the next identity value at 41.

The only info I found was that it could be a cursorlocation problem, what do you recommend?

?Is there a way in code to change the identity field to string, then copy the data and change back to identity field again?

As you are just loading the data I would set the field in the SQL Express system to just an int then load the data back in. Once complete change the filed back to an identity field and start the numbers off on the next availible number.

|||

I tried that, but it will NOT let me set the identity field. It generates it.

It works with Access but NOT SQL EXPRESS, if I hit the ADDNEW and then set the identify field and update it errors.

|||

Hey TurboDoc,

You should be able to insert data into your Identity field by setting the IDENTITY_INSERT option. Check out SQL BOL for more information on that. I think that will be more straight forward than trying to create blank records in SQL and then matching up the Identity values.

Hope this helps,

Mike

Copy data from 2000 to 2005 using Express Edition

Hi all

I am using Windows XP Prof, SP2 and having Sql Server 2000, SP4 and SQL Server 2005 Express Edition with Advanced Services SP1, and SQL Server 2005 Express Edition Toolkit SP1 installed. The toolkit is the one which created me the DTS folder in the root with this applicattion:

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSWizard.exe

I start now this Wizard and choose from Sql server - which is my 2000 version and to my sql express version, id/pw or windows authentication. I receive then the message:

Cannot continue for the following reason:

1) You have chosen a server that does not contain any packages.

2) The server you have chosen is neither a sql server 2000 nor sql server 7

The SSIS Migration Wizard can only load packages from those servers.

Nice. I am having Sql server 2000 and want to go to 2005.

What I am doing from ? Do I need to create some packages on Sql server 2000 to be able to proceed this task ?

Regards

Chrs

hi,

while SQL Server 2005 SSIS supports for sure older SQL Server versions, probably the DTS wizard is not supported for SQL Server 2005 scenarios, as lot of changes has occured in the metadata of SQL Server's handling...

you have to migrate your data to SQLExpress "the hard way", that's to say without designer support..

you can so use INSERT ... SELECT statements to move data from a linked SQL Server 2000 server (http://msdn2.microsoft.com/en-us/library/ms190479.aspx) or the like...

regards

|||

I finaly removed the express edition and downloaded the trial version. Here all is working fine. I will get the developer edition to test my issues and to learn more about the server. I think the express edition is really only for users with a small db and only connecting with a application, but nothing to learn or really work with.

Regards

|||

You can also just simply detach your file from SQL 2000 and then attach it to SQL 2005. The file will automatically be upgraded and you can start using it.

Mike

Wednesday, March 7, 2012

copy a table with sql2005

Using managment studio, how can i copy a table and his records, from a
server (2005) to another server (express) ?
I know how to create a script with table structure, but not with data into..
thanks
MauroSome options here: http://www.karaszi.com/SQLServer/info_generate_script.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Mauro Miotello" <sviluppo@.ashnet.it> wrote in message news:e1k0kk$9q2$1@.nnrp.ngi.it...
> Using managment studio, how can i copy a table and his records, from a
> server (2005) to another server (express) ?
> I know how to create a script with table structure, but not with data into..
> thanks
> Mauro
>

copy a table with sql2005

Using managment studio, how can i copy a table and his records, from a
server (2005) to another server (express) ?
I know how to create a script with table structure, but not with data into..
thanks
MauroSome options here: http://www.karaszi.com/SQLServer/in...rate_script.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Mauro Miotello" <sviluppo@.ashnet.it> wrote in message news:e1k0kk$9q2$1@.nnrp.ngi.it...[vbco
l=seagreen]
> Using managment studio, how can i copy a table and his records, from a
> server (2005) to another server (express) ?
> I know how to create a script with table structure, but not with data into
.
> thanks
> Mauro
>[/vbcol]

Saturday, February 25, 2012

Copy a SQL 2000 Server database into SQL 2005 Express

I have a database in SQL 2000 that I would like to move to SQL 2005 Express.
I could re-create all of the tables from scratch. Is there an easier way to
copy this database into SQL 2005 Express from SQL 2000 sever. I do not care
about the data, just the design.
Thanks,
Tim
Detach the database from SQL Server2000, copy *.mdf/*.ldf to the computer
where SQL Server2005 installed, attach the files to SQL Server2005.
"dbguru316" <dbguru316@.discussions.microsoft.com> wrote in message
news:18CEF436-E753-44CE-BA56-3AB09D32F248@.microsoft.com...
>I have a database in SQL 2000 that I would like to move to SQL 2005
>Express.
> I could re-create all of the tables from scratch. Is there an easier way
> to
> copy this database into SQL 2005 Express from SQL 2000 sever. I do not
> care
> about the data, just the design.
> Thanks,
> Tim

Copy a SQL 2000 Server database into SQL 2005 Express

I have a database in SQL 2000 that I would like to move to SQL 2005 Express.
I could re-create all of the tables from scratch. Is there an easier way to
copy this database into SQL 2005 Express from SQL 2000 sever. I do not care
about the data, just the design.
Thanks,
TimDetach the database from SQL Server2000, copy *.mdf/*.ldf to the computer
where SQL Server2005 installed, attach the files to SQL Server2005.
"dbguru316" <dbguru316@.discussions.microsoft.com> wrote in message
news:18CEF436-E753-44CE-BA56-3AB09D32F248@.microsoft.com...
>I have a database in SQL 2000 that I would like to move to SQL 2005
>Express.
> I could re-create all of the tables from scratch. Is there an easier way
> to
> copy this database into SQL 2005 Express from SQL 2000 sever. I do not
> care
> about the data, just the design.
> Thanks,
> Tim|||Hi,
Backup SQL Server 2000 database, and restore it
regards
Vt
Knowledge is power;Share it
http://oneplace4sql.blogspot.com
"Norman Yuan" <NotReal@.NotReal.not> wrote in message
news:u3OaRrimHHA.4316@.TK2MSFTNGP06.phx.gbl...
> Detach the database from SQL Server2000, copy *.mdf/*.ldf to the computer
> where SQL Server2005 installed, attach the files to SQL Server2005.
> "dbguru316" <dbguru316@.discussions.microsoft.com> wrote in message
> news:18CEF436-E753-44CE-BA56-3AB09D32F248@.microsoft.com...
>>I have a database in SQL 2000 that I would like to move to SQL 2005
>>Express.
>> I could re-create all of the tables from scratch. Is there an easier way
>> to
>> copy this database into SQL 2005 Express from SQL 2000 sever. I do not
>> care
>> about the data, just the design.
>> Thanks,
>> Tim
>

Copy a SQL 2000 Server database into SQL 2005 Express

I have a database in SQL 2000 that I would like to move to SQL 2005 Express.
I could re-create all of the tables from scratch. Is there an easier way to
copy this database into SQL 2005 Express from SQL 2000 sever. I do not care
about the data, just the design.
Thanks,
TimDetach the database from SQL Server2000, copy *.mdf/*.ldf to the computer
where SQL Server2005 installed, attach the files to SQL Server2005.
"dbguru316" <dbguru316@.discussions.microsoft.com> wrote in message
news:18CEF436-E753-44CE-BA56-3AB09D32F248@.microsoft.com...
>I have a database in SQL 2000 that I would like to move to SQL 2005
>Express.
> I could re-create all of the tables from scratch. Is there an easier way
> to
> copy this database into SQL 2005 Express from SQL 2000 sever. I do not
> care
> about the data, just the design.
> Thanks,
> Tim|||Hi,
Backup SQL Server 2000 database, and restore it
regards
Vt
Knowledge is power;Share it
http://oneplace4sql.blogspot.com
"Norman Yuan" <NotReal@.NotReal.not> wrote in message
news:u3OaRrimHHA.4316@.TK2MSFTNGP06.phx.gbl...
> Detach the database from SQL Server2000, copy *.mdf/*.ldf to the computer
> where SQL Server2005 installed, attach the files to SQL Server2005.
> "dbguru316" <dbguru316@.discussions.microsoft.com> wrote in message
> news:18CEF436-E753-44CE-BA56-3AB09D32F248@.microsoft.com...
>

Friday, February 24, 2012

Coonection to SQL Server 2005 Express

What is the proper connection string for SQL Server 2005 Express on XP?
I want to connect to the master database by VBScript as the following:
Dim computer : computer = CreateObject("WScript.Network").ComputerName
Dim connectionString:connectionString = "Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Master;Data
Source=" + computer
Dim connection
Set connection= CreateObject("ADODB.Connection")
With connection
.Provider = "SQLOLEDB"
.ConnectionString = connectionString
.Open
End With
It works on MSDE. But I got a "[DBNETLIB][ConnectionOpen (Connect()).]SQL
Server does not exist or access denied. " error for SQL Express. I have the
TCP/IP enabled for SQL Server Express too.
Thanks.
take help from KBA
http://support.microsoft.com/default...;EN-US;Q328306 and
http://www.connectionstrings.com/ for all types of connection strings.
--
Satya SKJ
Visit http://www.sql-server-performance.com for tips and articles on
Performance topic.
"Roy" wrote:

> What is the proper connection string for SQL Server 2005 Express on XP?
> I want to connect to the master database by VBScript as the following:
> Dim computer : computer = CreateObject("WScript.Network").ComputerName
> Dim connectionString:connectionString = "Provider=SQLOLEDB.1;Integrated
> Security=SSPI;Persist Security Info=False;Initial Catalog=Master;Data
> Source=" + computer
> Dim connection
> Set connection= CreateObject("ADODB.Connection")
> With connection
> .Provider = "SQLOLEDB"
> .ConnectionString = connectionString
> .Open
> End With
> It works on MSDE. But I got a "[DBNETLIB][ConnectionOpen (Connect()).]SQL
> Server does not exist or access denied. " error for SQL Express. I have the
> TCP/IP enabled for SQL Server Express too.
> Thanks.

Coonection to SQL Server 2005 Express

What is the proper connection string for SQL Server 2005 Express on XP?
I want to connect to the master database by VBScript as the following:
Dim computer : computer = CreateObject("WScript.Network").ComputerName
Dim connectionString:connectionString = "Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Master;Data
Source=" + computer
Dim connection
Set connection= CreateObject("ADODB.Connection")
With connection
.Provider = "SQLOLEDB"
.ConnectionString = connectionString
.Open
End With
It works on MSDE. But I got a "[DBNETLIB][ConnectionOpen (Connect())
.]SQL
Server does not exist or access denied. " error for SQL Express. I have the
TCP/IP enabled for SQL Server Express too.
Thanks.take help from KBA
http://support.microsoft.com/defaul...b;EN-US;Q328306 and
http://www.connectionstrings.com/ for all types of connection strings.
--
--
Satya SKJ
Visit http://www.sql-server-performance.com for tips and articles on
Performance topic.
"Roy" wrote:

> What is the proper connection string for SQL Server 2005 Express on XP?
> I want to connect to the master database by VBScript as the following:
> Dim computer : computer = CreateObject("WScript.Network").ComputerName
> Dim connectionString:connectionString = "Provider=SQLOLEDB.1;Integrated
> Security=SSPI;Persist Security Info=False;Initial Catalog=Master;Data
> Source=" + computer
> Dim connection
> Set connection= CreateObject("ADODB.Connection")
> With connection
> .Provider = "SQLOLEDB"
> .ConnectionString = connectionString
> .Open
> End With
> It works on MSDE. But I got a "[DBNETLIB][ConnectionOpen (Connect(
)).]SQL
> Server does not exist or access denied. " error for SQL Express. I have th
e
> TCP/IP enabled for SQL Server Express too.
> Thanks.

Tuesday, February 14, 2012

Converting SQL express 2005 to MSSQL 2005 Database

Hello, im shure this must have been up before and i apologize for that. But i wonder if there is a way to convert the SQL server express databases to MSSQL 2005 databses?

You should be able to open a SQL Express database in SQL2005.

|||

Yes but that is not what i meant, i mean that the MSSQL Express DB dont seems to be working on my webhost so i assume i need to convert the db to a MSSQL 2005 not express edition, the error i keep getting now is:

Server Errorin'/' Application.------------------------An error has occurredwhile establishing a connection to the server. When connecting to SQL Server 2005,this failure may be caused by the fact that under thedefault settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack tracefor more information about the error and where it originatedin the code. Exception Details: System.Data.SqlClient.SqlException: An error has occurredwhile establishing a connection to the server. When connecting to SQL Server 2005,this failure may be caused by the fact that under thedefault settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identifiedusing the exception stack trace below. Stack Trace: [SqlException (0x80131904): An error has occurredwhile establishing a connection to the server. When connecting to SQL Server 2005,this failure may be caused by the fact that under thedefault settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734979 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102 ------------------------Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

And the thing is im not even shure i get this error because of my SQL Express DB or if it is caused by something else. Sorry if my english is bad so if u dont get what i mean just tell me :)

|||

Hi,

You may convert your SQLExpress database to SQLServer 2005 on your local side by aspnet_regsql first. The database can be added into some management tools such as "SQLServer Management Studio". And then, you can connect to your remote SQLServer, export the lcoal database onto the one on your server. Also, you can backup the database on your local first and restore it on your server side.

Thanks.