Showing posts with label source. Show all posts
Showing posts with label source. Show all posts

Tuesday, March 20, 2012

Added users to a logged shipped database

I have 2 sql server 2000 database that participate in log shipping.
Server A is the source database, which log ships to a database on
Server B. The database on Server B is in a warm stand by/read only
mode. Is there a way that I can add users to the database on Server
B, without having to add the users to the database in server A? I am
trying to use the database on Server B as a reporting only database
and add more users to have permissions to run reports.

Please let me know if anyone has any suggestions. Thank you."Justin" <justinmiyashiro@.hotmail.comwrote in message
news:b55a5933-55ee-401f-b78f-bb703953a3f9@.i29g2000prf.googlegroups.com...

Quote:

Originally Posted by

>I have 2 sql server 2000 database that participate in log shipping.
Server A is the source database, which log ships to a database on
Server B. The database on Server B is in a warm stand by/read only
mode. Is there a way that I can add users to the database on Server
B, without having to add the users to the database in server A? I am
trying to use the database on Server B as a reporting only database
and add more users to have permissions to run reports.
>
Please let me know if anyone has any suggestions. Thank you.


Add the users on Server A.

--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||Justin (justinmiyashiro@.hotmail.com) writes:

Quote:

Originally Posted by

I have 2 sql server 2000 database that participate in log shipping.
Server A is the source database, which log ships to a database on
Server B. The database on Server B is in a warm stand by/read only
mode. Is there a way that I can add users to the database on Server
B, without having to add the users to the database in server A? I am
trying to use the database on Server B as a reporting only database
and add more users to have permissions to run reports.


No, that is not possible. If you were to make modifications to the
database on server B, then it would not be possible to apply the logs from
server A. What it the changes in the log are not consistent with the
changes you made on server B.

I can think of two options to achieve what you are looking for:

1) Create the logins on both servers, and create the database users on
server A. Then drop the logins on server A to leave the database users
orphaned on server A, but functional on server B. This works best
with Windows logins. And it presumes that the users in question does
not need access to other databases on server A.

2) Create a second database on ServerB with views on all tables in
serverA. Make sure that the second database has the same owner as
the log-ship database. Enable cross-database ownership chaining on
server B, or at least for the two databases. Add the users to
this second database, and grant them SELECT permissions on the views.

--
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

Monday, March 19, 2012

add total row to file via script component

Hi, I have a flat file source going into a script component which manipulates some values and puts those values in a flat file destination. What I now need to do is total a column within the script component and add that value as a row to the destination. At the moment data from source looks something like

ABC, 3

DEF, 5

FGH, 6

I have a variable in script component holding the running total I now want to add that to destination as a row e.g.

ABC, 3

DEF, 5

FGH, 6

Total, 14

This is probably very easy but I don't now how to add the Total row via the component. At the moment all rows are manipulated in the ProcessInputRow sub of component and output column values are assigned here. How do I add the Total row as I need to do this once last input row is complete.

Thanks

You'll need to use an asynchronous output to accomplish this. You could add an async output in addition to the synchronous output you get by default, and just write the running total to it.

See this topic in Books Online:

"Creating an Asynchronous Transformation with the Script Component"

|||You could also just use a multicast and an Aggregate transform to accomplish the same thing.|||Great thanks, Asynchronous Transformation worked

add total row to file via script component

Hi, I have a flat file source going into a script component which manipulates some values and puts those values in a flat file destination. What I now need to do is total a column within the script component and add that value as a row to the destination. At the moment data from source looks something like

ABC, 3

DEF, 5

FGH, 6

I have a variable in script component holding the running total I now want to add that to destination as a row e.g.

ABC, 3

DEF, 5

FGH, 6

Total, 14

This is probably very easy but I don't now how to add the Total row via the component. At the moment all rows are manipulated in the ProcessInputRow sub of component and output column values are assigned here. How do I add the Total row as I need to do this once last input row is complete.

Thanks

You'll need to use an asynchronous output to accomplish this. You could add an async output in addition to the synchronous output you get by default, and just write the running total to it.

See this topic in Books Online:

"Creating an Asynchronous Transformation with the Script Component"

|||You could also just use a multicast and an Aggregate transform to accomplish the same thing.|||Great thanks, Asynchronous Transformation worked

Tuesday, March 6, 2012

Add linked server with remote source

How do i add linked server whoose source file is not located on server itself?
I want to create linked server which uses excel file as it's source, but
this file is located on my pc(named "mix")
I want to do something like this...
EXEC sp_addlinkedserver 'MikusExcelSource',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'\\mix\silo\2005 9 Sep_new.xls',
NULL,
'Excel 5.0'
GO
any ideas ?
Mikus wrote:
> How do i add linked server whoose source file is not located on server itself?
> I want to create linked server which uses excel file as it's source, but
> this file is located on my pc(named "mix")
> I want to do something like this...
> EXEC sp_addlinkedserver 'MikusExcelSource',
> 'Jet 4.0',
> 'Microsoft.Jet.OLEDB.4.0',
> '\\mix\silo\2005 9 Sep_new.xls',
> NULL,
> 'Excel 5.0'
> GO
> any ideas ?
Have you tried to add the linked server with the syntax you suggest?
There're no problems as such to add a linked server using an UNC path.
The only limitation that I've seen, is that if the files for the linked
server isn't placed on the server it self, you'll have to use this
linked server using e.g. QA via Remote Desktop to the server. E.g. if I
add a linked server on Server A having the files placed on Server B,
I'll have to connect to Server A with Remote Desktop and open up QA and
run my query. If I open QA on my own desktop and connect to server A,
I'll get an error if I try to use the linked server.
There might be ways around this issue, but I've never been able to find
a way to get around it.
Regards
Steen
|||This syntax work's and server is added, but when i try to see at the tables
(through SQL manager on my pc - mix) i get error - please look at the
screenshot:
http://www.svara-kontrole.lv/sql_srv_error.jpg
...
And i do not have permission to acces this server through RemDsktop
"Steen Persson (DK)" wrote:

> Mikus wrote:
> Have you tried to add the linked server with the syntax you suggest?
> There're no problems as such to add a linked server using an UNC path.
> The only limitation that I've seen, is that if the files for the linked
> server isn't placed on the server it self, you'll have to use this
> linked server using e.g. QA via Remote Desktop to the server. E.g. if I
> add a linked server on Server A having the files placed on Server B,
> I'll have to connect to Server A with Remote Desktop and open up QA and
> run my query. If I open QA on my own desktop and connect to server A,
> I'll get an error if I try to use the linked server.
> There might be ways around this issue, but I've never been able to find
> a way to get around it.
> Regards
> Steen
>
|||Mikus wrote:[vbcol=seagreen]
> This syntax work's and server is added, but when i try to see at the tables
> (through SQL manager on my pc - mix) i get error - please look at the
> screenshot:
> http://www.svara-kontrole.lv/sql_srv_error.jpg
> ...
> And i do not have permission to acces this server through RemDsktop
> "Steen Persson (DK)" wrote:
I think the error you get is due to the issue I descried. I've just
tried it myself, and if I look at the tables on my own desktop -
connected to the server where the linked server has been created- I
can't see the files and I get almost the same error message as you do.
If I log on to the server with RemoteDesktop, I can see the tables with
out any problems.
Unless somebody else know the solution to this issue, I think your only
option is to connect to the server in some way and then run your query
from there.
Regards
Steen

Add linked server with remote source

How do i add linked server whoose source file is not located on server itself?
I want to create linked server which uses excel file as it's source, but
this file is located on my pc(named "mix")
I want to do something like this...
EXEC sp_addlinkedserver 'MikusExcelSource',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'\\mix\silo\2005 9 Sep_new.xls',
NULL,
'Excel 5.0'
GO
any ideas ?Mikus wrote:
> How do i add linked server whoose source file is not located on server itself?
> I want to create linked server which uses excel file as it's source, but
> this file is located on my pc(named "mix")
> I want to do something like this...
> EXEC sp_addlinkedserver 'MikusExcelSource',
> 'Jet 4.0',
> 'Microsoft.Jet.OLEDB.4.0',
> '\\mix\silo\2005 9 Sep_new.xls',
> NULL,
> 'Excel 5.0'
> GO
> any ideas ?
Have you tried to add the linked server with the syntax you suggest?
There're no problems as such to add a linked server using an UNC path.
The only limitation that I've seen, is that if the files for the linked
server isn't placed on the server it self, you'll have to use this
linked server using e.g. QA via Remote Desktop to the server. E.g. if I
add a linked server on Server A having the files placed on Server B,
I'll have to connect to Server A with Remote Desktop and open up QA and
run my query. If I open QA on my own desktop and connect to server A,
I'll get an error if I try to use the linked server.
There might be ways around this issue, but I've never been able to find
a way to get around it.
Regards
Steen|||This syntax work's and server is added, but when i try to see at the tables
(through SQL manager on my pc - mix) i get error - please look at the
screenshot:
http://www.svara-kontrole.lv/sql_srv_error.jpg
...
And i do not have permission to acces this server through RemDsktop
"Steen Persson (DK)" wrote:
> Mikus wrote:
> > How do i add linked server whoose source file is not located on server itself?
> >
> > I want to create linked server which uses excel file as it's source, but
> > this file is located on my pc(named "mix")
> >
> > I want to do something like this...
> >
> > EXEC sp_addlinkedserver 'MikusExcelSource',
> > 'Jet 4.0',
> > 'Microsoft.Jet.OLEDB.4.0',
> > '\\mix\silo\2005 9 Sep_new.xls',
> > NULL,
> > 'Excel 5.0'
> > GO
> >
> > any ideas ?
> Have you tried to add the linked server with the syntax you suggest?
> There're no problems as such to add a linked server using an UNC path.
> The only limitation that I've seen, is that if the files for the linked
> server isn't placed on the server it self, you'll have to use this
> linked server using e.g. QA via Remote Desktop to the server. E.g. if I
> add a linked server on Server A having the files placed on Server B,
> I'll have to connect to Server A with Remote Desktop and open up QA and
> run my query. If I open QA on my own desktop and connect to server A,
> I'll get an error if I try to use the linked server.
> There might be ways around this issue, but I've never been able to find
> a way to get around it.
> Regards
> Steen
>|||Mikus wrote:
> This syntax work's and server is added, but when i try to see at the tables
> (through SQL manager on my pc - mix) i get error - please look at the
> screenshot:
> http://www.svara-kontrole.lv/sql_srv_error.jpg
> ...
> And i do not have permission to acces this server through RemDsktop
> "Steen Persson (DK)" wrote:
>> Mikus wrote:
>> How do i add linked server whoose source file is not located on server itself?
>> I want to create linked server which uses excel file as it's source, but
>> this file is located on my pc(named "mix")
>> I want to do something like this...
>> EXEC sp_addlinkedserver 'MikusExcelSource',
>> 'Jet 4.0',
>> 'Microsoft.Jet.OLEDB.4.0',
>> '\\mix\silo\2005 9 Sep_new.xls',
>> NULL,
>> 'Excel 5.0'
>> GO
>> any ideas ?
>> Have you tried to add the linked server with the syntax you suggest?
>> There're no problems as such to add a linked server using an UNC path.
>> The only limitation that I've seen, is that if the files for the linked
>> server isn't placed on the server it self, you'll have to use this
>> linked server using e.g. QA via Remote Desktop to the server. E.g. if I
>> add a linked server on Server A having the files placed on Server B,
>> I'll have to connect to Server A with Remote Desktop and open up QA and
>> run my query. If I open QA on my own desktop and connect to server A,
>> I'll get an error if I try to use the linked server.
>> There might be ways around this issue, but I've never been able to find
>> a way to get around it.
>> Regards
>> Steen
I think the error you get is due to the issue I descried. I've just
tried it myself, and if I look at the tables on my own desktop -
connected to the server where the linked server has been created- I
can't see the files and I get almost the same error message as you do.
If I log on to the server with RemoteDesktop, I can see the tables with
out any problems.
Unless somebody else know the solution to this issue, I think your only
option is to connect to the server in some way and then run your query
from there.
Regards
Steen

Add linked server with remote source

How do i add linked server whoose source file is not located on server itsel
f?
I want to create linked server which uses excel file as it's source, but
this file is located on my pc(named "mix")
I want to do something like this...
EXEC sp_addlinkedserver 'MikusExcelSource',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'\\mix\silo\2005 9 Sep_new.xls',
NULL,
'Excel 5.0'
GO
any ideas ?Mikus wrote:
> How do i add linked server whoose source file is not located on server its
elf?
> I want to create linked server which uses excel file as it's source, but
> this file is located on my pc(named "mix")
> I want to do something like this...
> EXEC sp_addlinkedserver 'MikusExcelSource',
> 'Jet 4.0',
> 'Microsoft.Jet.OLEDB.4.0',
> '\\mix\silo\2005 9 Sep_new.xls',
> NULL,
> 'Excel 5.0'
> GO
> any ideas ?
Have you tried to add the linked server with the syntax you suggest?
There're no problems as such to add a linked server using an UNC path.
The only limitation that I've seen, is that if the files for the linked
server isn't placed on the server it self, you'll have to use this
linked server using e.g. QA via Remote Desktop to the server. E.g. if I
add a linked server on Server A having the files placed on Server B,
I'll have to connect to Server A with Remote Desktop and open up QA and
run my query. If I open QA on my own desktop and connect to server A,
I'll get an error if I try to use the linked server.
There might be ways around this issue, but I've never been able to find
a way to get around it.
Regards
Steen|||This syntax work's and server is added, but when i try to see at the tables
(through SQL manager on my pc - mix) i get error - please look at the
screenshot:
http://www.svara-kontrole.lv/sql_srv_error.jpg
...
And i do not have permission to acces this server through RemDsktop
"Steen Persson (DK)" wrote:

> Mikus wrote:
> Have you tried to add the linked server with the syntax you suggest?
> There're no problems as such to add a linked server using an UNC path.
> The only limitation that I've seen, is that if the files for the linked
> server isn't placed on the server it self, you'll have to use this
> linked server using e.g. QA via Remote Desktop to the server. E.g. if I
> add a linked server on Server A having the files placed on Server B,
> I'll have to connect to Server A with Remote Desktop and open up QA and
> run my query. If I open QA on my own desktop and connect to server A,
> I'll get an error if I try to use the linked server.
> There might be ways around this issue, but I've never been able to find
> a way to get around it.
> Regards
> Steen
>|||Mikus wrote:[vbcol=seagreen]
> This syntax work's and server is added, but when i try to see at the table
s
> (through SQL manager on my pc - mix) i get error - please look at the
> screenshot:
> http://www.svara-kontrole.lv/sql_srv_error.jpg
> ...
> And i do not have permission to acces this server through RemDsktop
> "Steen Persson (DK)" wrote:
>
I think the error you get is due to the issue I descried. I've just
tried it myself, and if I look at the tables on my own desktop -
connected to the server where the linked server has been created- I
can't see the files and I get almost the same error message as you do.
If I log on to the server with RemoteDesktop, I can see the tables with
out any problems.
Unless somebody else know the solution to this issue, I think your only
option is to connect to the server in some way and then run your query
from there.
Regards
Steen

Friday, February 24, 2012

Add connction Fails in VS.NET with SQL Server Everywhere

When I try to use the "Data Source Configuration Wizard" (Menu: Data\Add New Data Source...) and I try to add a new Connection to the "Northwind.sdf" database using Microsoft SQL Server Mobile Edition it fails with

"Unable to find the requested .Net Framework Data Provider. It may not be installed."

What's really strange about this is that if I click the Test Connection" button it states "Test Connection Succeeded."

I've looked everywhere and I see that other have had the same problem but no one seem to know the solution.

jc3

This usually happens if you un-install .Net Fx and re-install. So please go to ADd Remove programs and do repair for Microsoft SQL Server 2005 Mobile Developer Tools. This will add some extra config entries which will help you.|||

Nope, unfortunately that was not the cause of the problem because I never un-installed (or re-installed) .NET FX, but here's what I did to figure it out...

1. I did a repair of Visual Studio but that didn't work.

2. I wrote a sample application that just opened a connection and loaded a dataset and that worked so this particular problem is strictly a Visual Studio issue.

3. I got on a friends machine whose "Data Source Configuration Wizard" worked and ran FileMon (from SysInternals) to see what the wizard was actually doing and noticed it was reading from Machine.config so I searched his Machine.config and noticed an entry for "SQL Server CE Data Provider" that my copy of Machine.config did not have.

4. Since I was using the latest CTP and he was using the default version that shipped with VS I didn't copy his entry but instead composed my own using one of the other as a template as well as using the GAC for PublicKeyToken, Version and other info.

So, to recap:
Apparently, Visual Studio 2005 uses the Machine.config when you are running the "Data Source Configuration Wizard" to generate a data connection for Server Explorer's Data Connections.

Here's a copy of my missing entry:
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Also, I actually never got a notification about your reply even though I had "Alert Me" set up. Strange, I only signed on to update this issue with what I did to fix it.

jc3

|||

this didn't work for me... no matter what I try, I cannot get the database to connect from the designer!! I've installed the RC1 but when I go to add a new connection, there's nothing there for the compact/mobile edition :( any ideas what's going on? that entry is in my machine.config, but instead of microsoft.sqlserverce.clinent it's system.data.sqlserverce which is the right name for the dll file...

-SelArom

|||1. Install VS2005
2. Install VS2005 SP1 Beta
http://www.microsoft.com/downloads/details.aspx?FamilyID=8d702463-674b-4978-9e22-c989130f6553&DisplayLang=en
3. Install SQL Server Ce
4. Install SQL Server CE tools

Then you can open up a project and add a .sdf file (say Northwind) when the Data Source Configuration Wizard will auto start.|||

tools will not install! it says that I don't have the right version to be updated?!! what is that all about? I did install vs 2005, then sp1 beta then ce... now as I try tools it gives me that error... wtf?

-SelArom

|||

okay here is the exact error message:

The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade path.

I don't know what else I can verify, as I have installed visual studio 2005 and SP1, then Sql Server Compact Edition RC1. So what gives?

-SelArom

|||

Has anyone been able to resolve the issue surrounding the above error message, when attempting to install the "SQL Server Everywhere Tools for Visual Studio."

I get the same error message attempting to install the beta Toolset. Note that I am attempting to install the Tools on top of the just-released Visual Studio 2005 Service Pack 1 (not the beta as is specified in the instructions).

Any words of wisdom would be very helpful.

Thanks, Rob V

|||Adding the entry in Machine.config works fine for me, thanks!|||

I faced the same issue, however in my machine.config the entry was not missing but preceeded by another one.

<add name="SQL Server Everywhere Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

<add name="SQL Server Compact Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Commenting or deleting the first one solves the problem.

Add connction Fails in VS.NET with SQL Server Everywhere

When I try to use the "Data Source Configuration Wizard" (Menu: Data\Add New Data Source...) and I try to add a new Connection to the "Northwind.sdf" database using Microsoft SQL Server Mobile Edition it fails with

"Unable to find the requested .Net Framework Data Provider. It may not be installed."

What's really strange about this is that if I click the Test Connection" button it states "Test Connection Succeeded."

I've looked everywhere and I see that other have had the same problem but no one seem to know the solution.

jc3

This usually happens if you un-install .Net Fx and re-install. So please go to ADd Remove programs and do repair for Microsoft SQL Server 2005 Mobile Developer Tools. This will add some extra config entries which will help you.|||

Nope, unfortunately that was not the cause of the problem because I never un-installed (or re-installed) .NET FX, but here's what I did to figure it out...

1. I did a repair of Visual Studio but that didn't work.

2. I wrote a sample application that just opened a connection and loaded a dataset and that worked so this particular problem is strictly a Visual Studio issue.

3. I got on a friends machine whose "Data Source Configuration Wizard" worked and ran FileMon (from SysInternals) to see what the wizard was actually doing and noticed it was reading from Machine.config so I searched his Machine.config and noticed an entry for "SQL Server CE Data Provider" that my copy of Machine.config did not have.

4. Since I was using the latest CTP and he was using the default version that shipped with VS I didn't copy his entry but instead composed my own using one of the other as a template as well as using the GAC for PublicKeyToken, Version and other info.

So, to recap:
Apparently, Visual Studio 2005 uses the Machine.config when you are running the "Data Source Configuration Wizard" to generate a data connection for Server Explorer's Data Connections.

Here's a copy of my missing entry:
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Also, I actually never got a notification about your reply even though I had "Alert Me" set up. Strange, I only signed on to update this issue with what I did to fix it.

jc3

|||

this didn't work for me... no matter what I try, I cannot get the database to connect from the designer!! I've installed the RC1 but when I go to add a new connection, there's nothing there for the compact/mobile edition :( any ideas what's going on? that entry is in my machine.config, but instead of microsoft.sqlserverce.clinent it's system.data.sqlserverce which is the right name for the dll file...

-SelArom

|||1. Install VS2005
2. Install VS2005 SP1 Beta
http://www.microsoft.com/downloads/details.aspx?FamilyID=8d702463-674b-4978-9e22-c989130f6553&DisplayLang=en
3. Install SQL Server Ce
4. Install SQL Server CE tools

Then you can open up a project and add a .sdf file (say Northwind) when the Data Source Configuration Wizard will auto start.|||

tools will not install! it says that I don't have the right version to be updated?!! what is that all about? I did install vs 2005, then sp1 beta then ce... now as I try tools it gives me that error... wtf?

-SelArom

|||

okay here is the exact error message:

The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade path.

I don't know what else I can verify, as I have installed visual studio 2005 and SP1, then Sql Server Compact Edition RC1. So what gives?

-SelArom

|||

Has anyone been able to resolve the issue surrounding the above error message, when attempting to install the "SQL Server Everywhere Tools for Visual Studio."

I get the same error message attempting to install the beta Toolset. Note that I am attempting to install the Tools on top of the just-released Visual Studio 2005 Service Pack 1 (not the beta as is specified in the instructions).

Any words of wisdom would be very helpful.

Thanks, Rob V

|||Adding the entry in Machine.config works fine for me, thanks!|||

I faced the same issue, however in my machine.config the entry was not missing but preceeded by another one.

<add name="SQL Server Everywhere Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

<add name="SQL Server Compact Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Commenting or deleting the first one solves the problem.

Add connction Fails in VS.NET with SQL Server Everywhere

When I try to use the "Data Source Configuration Wizard" (Menu: Data\Add New Data Source...) and I try to add a new Connection to the "Northwind.sdf" database using Microsoft SQL Server Mobile Edition it fails with

"Unable to find the requested .Net Framework Data Provider. It may not be installed."

What's really strange about this is that if I click the Test Connection" button it states "Test Connection Succeeded."

I've looked everywhere and I see that other have had the same problem but no one seem to know the solution.

jc3

This usually happens if you un-install .Net Fx and re-install. So please go to ADd Remove programs and do repair for Microsoft SQL Server 2005 Mobile Developer Tools. This will add some extra config entries which will help you.|||

Nope, unfortunately that was not the cause of the problem because I never un-installed (or re-installed) .NET FX, but here's what I did to figure it out...

1. I did a repair of Visual Studio but that didn't work.

2. I wrote a sample application that just opened a connection and loaded a dataset and that worked so this particular problem is strictly a Visual Studio issue.

3. I got on a friends machine whose "Data Source Configuration Wizard" worked and ran FileMon (from SysInternals) to see what the wizard was actually doing and noticed it was reading from Machine.config so I searched his Machine.config and noticed an entry for "SQL Server CE Data Provider" that my copy of Machine.config did not have.

4. Since I was using the latest CTP and he was using the default version that shipped with VS I didn't copy his entry but instead composed my own using one of the other as a template as well as using the GAC for PublicKeyToken, Version and other info.

So, to recap:
Apparently, Visual Studio 2005 uses the Machine.config when you are running the "Data Source Configuration Wizard" to generate a data connection for Server Explorer's Data Connections.

Here's a copy of my missing entry:
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Also, I actually never got a notification about your reply even though I had "Alert Me" set up. Strange, I only signed on to update this issue with what I did to fix it.

jc3

|||

this didn't work for me... no matter what I try, I cannot get the database to connect from the designer!! I've installed the RC1 but when I go to add a new connection, there's nothing there for the compact/mobile edition :( any ideas what's going on? that entry is in my machine.config, but instead of microsoft.sqlserverce.clinent it's system.data.sqlserverce which is the right name for the dll file...

-SelArom

|||1. Install VS2005
2. Install VS2005 SP1 Beta
http://www.microsoft.com/downloads/details.aspx?FamilyID=8d702463-674b-4978-9e22-c989130f6553&DisplayLang=en
3. Install SQL Server Ce
4. Install SQL Server CE tools

Then you can open up a project and add a .sdf file (say Northwind) when the Data Source Configuration Wizard will auto start.|||

tools will not install! it says that I don't have the right version to be updated?!! what is that all about? I did install vs 2005, then sp1 beta then ce... now as I try tools it gives me that error... wtf?

-SelArom

|||

okay here is the exact error message:

The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade path.

I don't know what else I can verify, as I have installed visual studio 2005 and SP1, then Sql Server Compact Edition RC1. So what gives?

-SelArom

|||

Has anyone been able to resolve the issue surrounding the above error message, when attempting to install the "SQL Server Everywhere Tools for Visual Studio."

I get the same error message attempting to install the beta Toolset. Note that I am attempting to install the Tools on top of the just-released Visual Studio 2005 Service Pack 1 (not the beta as is specified in the instructions).

Any words of wisdom would be very helpful.

Thanks, Rob V

|||Adding the entry in Machine.config works fine for me, thanks!|||

I faced the same issue, however in my machine.config the entry was not missing but preceeded by another one.

<add name="SQL Server Everywhere Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

<add name="SQL Server Compact Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Commenting or deleting the first one solves the problem.

Add connction Fails in VS.NET with SQL Server Everywhere

When I try to use the "Data Source Configuration Wizard" (Menu: Data\Add New Data Source...) and I try to add a new Connection to the "Northwind.sdf" database using Microsoft SQL Server Mobile Edition it fails with

"Unable to find the requested .Net Framework Data Provider. It may not be installed."

What's really strange about this is that if I click the Test Connection" button it states "Test Connection Succeeded."

I've looked everywhere and I see that other have had the same problem but no one seem to know the solution.

jc3

This usually happens if you un-install .Net Fx and re-install. So please go to ADd Remove programs and do repair for Microsoft SQL Server 2005 Mobile Developer Tools. This will add some extra config entries which will help you.|||

Nope, unfortunately that was not the cause of the problem because I never un-installed (or re-installed) .NET FX, but here's what I did to figure it out...

1. I did a repair of Visual Studio but that didn't work.

2. I wrote a sample application that just opened a connection and loaded a dataset and that worked so this particular problem is strictly a Visual Studio issue.

3. I got on a friends machine whose "Data Source Configuration Wizard" worked and ran FileMon (from SysInternals) to see what the wizard was actually doing and noticed it was reading from Machine.config so I searched his Machine.config and noticed an entry for "SQL Server CE Data Provider" that my copy of Machine.config did not have.

4. Since I was using the latest CTP and he was using the default version that shipped with VS I didn't copy his entry but instead composed my own using one of the other as a template as well as using the GAC for PublicKeyToken, Version and other info.

So, to recap:
Apparently, Visual Studio 2005 uses the Machine.config when you are running the "Data Source Configuration Wizard" to generate a data connection for Server Explorer's Data Connections.

Here's a copy of my missing entry:
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Also, I actually never got a notification about your reply even though I had "Alert Me" set up. Strange, I only signed on to update this issue with what I did to fix it.

jc3

|||

this didn't work for me... no matter what I try, I cannot get the database to connect from the designer!! I've installed the RC1 but when I go to add a new connection, there's nothing there for the compact/mobile edition :( any ideas what's going on? that entry is in my machine.config, but instead of microsoft.sqlserverce.clinent it's system.data.sqlserverce which is the right name for the dll file...

-SelArom

|||1. Install VS2005
2. Install VS2005 SP1 Beta
http://www.microsoft.com/downloads/details.aspx?FamilyID=8d702463-674b-4978-9e22-c989130f6553&DisplayLang=en
3. Install SQL Server Ce
4. Install SQL Server CE tools

Then you can open up a project and add a .sdf file (say Northwind) when the Data Source Configuration Wizard will auto start.|||

tools will not install! it says that I don't have the right version to be updated?!! what is that all about? I did install vs 2005, then sp1 beta then ce... now as I try tools it gives me that error... wtf?

-SelArom

|||

okay here is the exact error message:

The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade path.

I don't know what else I can verify, as I have installed visual studio 2005 and SP1, then Sql Server Compact Edition RC1. So what gives?

-SelArom

|||

Has anyone been able to resolve the issue surrounding the above error message, when attempting to install the "SQL Server Everywhere Tools for Visual Studio."

I get the same error message attempting to install the beta Toolset. Note that I am attempting to install the Tools on top of the just-released Visual Studio 2005 Service Pack 1 (not the beta as is specified in the instructions).

Any words of wisdom would be very helpful.

Thanks, Rob V

|||Adding the entry in Machine.config works fine for me, thanks!|||

I faced the same issue, however in my machine.config the entry was not missing but preceeded by another one.

<add name="SQL Server Everywhere Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

<add name="SQL Server Compact Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Commenting or deleting the first one solves the problem.

Add connction Fails in VS.NET with SQL Server Everywhere

When I try to use the "Data Source Configuration Wizard" (Menu: Data\Add New Data Source...) and I try to add a new Connection to the "Northwind.sdf" database using Microsoft SQL Server Mobile Edition it fails with

"Unable to find the requested .Net Framework Data Provider. It may not be installed."

What's really strange about this is that if I click the Test Connection" button it states "Test Connection Succeeded."

I've looked everywhere and I see that other have had the same problem but no one seem to know the solution.

jc3

This usually happens if you un-install .Net Fx and re-install. So please go to ADd Remove programs and do repair for Microsoft SQL Server 2005 Mobile Developer Tools. This will add some extra config entries which will help you.|||

Nope, unfortunately that was not the cause of the problem because I never un-installed (or re-installed) .NET FX, but here's what I did to figure it out...

1. I did a repair of Visual Studio but that didn't work.

2. I wrote a sample application that just opened a connection and loaded a dataset and that worked so this particular problem is strictly a Visual Studio issue.

3. I got on a friends machine whose "Data Source Configuration Wizard" worked and ran FileMon (from SysInternals) to see what the wizard was actually doing and noticed it was reading from Machine.config so I searched his Machine.config and noticed an entry for "SQL Server CE Data Provider" that my copy of Machine.config did not have.

4. Since I was using the latest CTP and he was using the default version that shipped with VS I didn't copy his entry but instead composed my own using one of the other as a template as well as using the GAC for PublicKeyToken, Version and other info.

So, to recap:
Apparently, Visual Studio 2005 uses the Machine.config when you are running the "Data Source Configuration Wizard" to generate a data connection for Server Explorer's Data Connections.

Here's a copy of my missing entry:
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Also, I actually never got a notification about your reply even though I had "Alert Me" set up. Strange, I only signed on to update this issue with what I did to fix it.

jc3

|||

this didn't work for me... no matter what I try, I cannot get the database to connect from the designer!! I've installed the RC1 but when I go to add a new connection, there's nothing there for the compact/mobile edition :( any ideas what's going on? that entry is in my machine.config, but instead of microsoft.sqlserverce.clinent it's system.data.sqlserverce which is the right name for the dll file...

-SelArom

|||1. Install VS2005
2. Install VS2005 SP1 Beta
http://www.microsoft.com/downloads/details.aspx?FamilyID=8d702463-674b-4978-9e22-c989130f6553&DisplayLang=en
3. Install SQL Server Ce
4. Install SQL Server CE tools

Then you can open up a project and add a .sdf file (say Northwind) when the Data Source Configuration Wizard will auto start.|||

tools will not install! it says that I don't have the right version to be updated?!! what is that all about? I did install vs 2005, then sp1 beta then ce... now as I try tools it gives me that error... wtf?

-SelArom

|||

okay here is the exact error message:

The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade path.

I don't know what else I can verify, as I have installed visual studio 2005 and SP1, then Sql Server Compact Edition RC1. So what gives?

-SelArom

|||

Has anyone been able to resolve the issue surrounding the above error message, when attempting to install the "SQL Server Everywhere Tools for Visual Studio."

I get the same error message attempting to install the beta Toolset. Note that I am attempting to install the Tools on top of the just-released Visual Studio 2005 Service Pack 1 (not the beta as is specified in the instructions).

Any words of wisdom would be very helpful.

Thanks, Rob V

|||Adding the entry in Machine.config works fine for me, thanks!|||

I faced the same issue, however in my machine.config the entry was not missing but preceeded by another one.

<add name="SQL Server Everywhere Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

<add name="SQL Server Compact Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Commenting or deleting the first one solves the problem.

Thursday, February 16, 2012

Add a new data source to a SQL Server Compact Edition

I have installed SQL Server 2005 CE on my computer, but when I try to add a data connection to a CE database in Visual Studio 2005, I cannot find the option "SQL Server 2005 Combact Edition". Why?

Hi,

see this here: http://img366.imageshack.us/img366/555/untitledph0.jpg
-Jens.

|||I have the same issue. I install the SQL compact framework runtime, SDK, and VS2K5 components but the option is never listed in the potential data sources for any project. I can create as many SQL server, SQL server express, or Access databases as I want, but the option for the Compact Edition just isn't listed.|||Hi,

I face the exactly the same problem. Have anyone found the solution to this?
thanks.

regards,
TY|||Hi,

Finally i got the problem fixed. Seem like there are some name conflict within the VS2005 for the Mobile Edition and Compact Edition. Just need to install the VS2005 SP1 all those problem will automatic fixed.
thanks.

regards,
Tze Yang

Add a new data source to a SQL Server Compact Edition

I have installed SQL Server 2005 CE on my computer, but when I try to add a data connection to a CE database in Visual Studio 2005, I cannot find the option "SQL Server 2005 Combact Edition". Why?

Hi,

see this here: http://img366.imageshack.us/img366/555/untitledph0.jpg
-Jens.

|||I have the same issue. I install the SQL compact framework runtime, SDK, and VS2K5 components but the option is never listed in the potential data sources for any project. I can create as many SQL server, SQL server express, or Access databases as I want, but the option for the Compact Edition just isn't listed.|||Hi,

I face the exactly the same problem. Have anyone found the solution to this?
thanks.

regards,
TY
|||Hi,

Finally i got the problem fixed. Seem like there are some name conflict within the VS2005 for the Mobile Edition and Compact Edition. Just need to install the VS2005 SP1 all those problem will automatic fixed.
thanks.

regards,
Tze Yang

Add a field to target table?

I would like to add a field to a table that is the target table in a
transactional replication. The source table does not have this field (and
never will). Can it be done without interfering with the existing replication?
Thanks in advance,
/Anders
nope.
You will probably have to either create a custom sync object, replicate an
indexed view which looks like your table on the subscriber, or do a nosync
and edit the stored procedures for the different schema on the subscriber.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"AndersBj" <AndersBj@.discussions.microsoft.com> wrote in message
news:6DA74EBF-3994-42E8-BBE4-B4261C1FA334@.microsoft.com...
> I would like to add a field to a table that is the target table in a
> transactional replication. The source table does not have this field (and
> never will). Can it be done without interfering with the existing
replication?
> Thanks in advance,
> /Anders
|||Thanks for your answer. After I posted this question I did a small test by
setting up a transactional replication between two databases on the same SQL
server.
The publisher in db A had the following fields in table X:
ID, name, email
The subscriber in db B had the following fields in table X:
ID, name, email
I then added a field to the subscriber table X, to make it look like this:
ID, name, email, age
This worked without any problems, new items replicated from db A to db B
just left age being null. Can this little test of mine prove that the concept
works or is there something else I should consider?
Thank you,
/Anders
"AndersBj" wrote:

> I would like to add a field to a table that is the target table in a
> transactional replication. The source table does not have this field (and
> never will). Can it be done without interfering with the existing replication?
> Thanks in advance,
> /Anders
|||Hmm, did some further testing and realized that if a new snapshot ever should
be required, my changes on the table in db B would be overwritten... so I
guess this isn't a good solution after all...
"AndersBj" wrote:
[vbcol=seagreen]
> Thanks for your answer. After I posted this question I did a small test by
> setting up a transactional replication between two databases on the same SQL
> server.
> The publisher in db A had the following fields in table X:
> ID, name, email
> The subscriber in db B had the following fields in table X:
> ID, name, email
> I then added a field to the subscriber table X, to make it look like this:
> ID, name, email, age
> This worked without any problems, new items replicated from db A to db B
> just left age being null. Can this little test of mine prove that the concept
> works or is there something else I should consider?
> Thank you,
> /Anders
>
> "AndersBj" wrote:
|||Anders,
on the subscriber you could have the extra column, ensuring it is recreated
is easy is done using @.creation_script argument of sp_addarticle. How to
ensure the data isn't lost? Use an instead-of trigger on the subscriber to
input the changes to the extra column into an audit table to ensure they're
not lost.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thank you, I will try this as soon as possible.
/Anders
"Paul Ibison" wrote:

> Anders,
> on the subscriber you could have the extra column, ensuring it is recreated
> is easy is done using @.creation_script argument of sp_addarticle. How to
> ensure the data isn't lost? Use an instead-of trigger on the subscriber to
> input the changes to the extra column into an audit table to ensure they're
> not lost.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>

Monday, February 13, 2012

ADD A COLUMN AND POPULATE IT WITH A SINGLE VALUE FROM A USER VARIABLE

Hi !

I have one Excel source with ... say 2 columns, I have an SQL Server destination with 3 columns.

I want the third column to be populated with a single value stored in a User::Variable.

Can someone help !

Jacques...

Just add a Derived Column transformation and assign your User::Variable to the derived column.

That's it.

|||

Thanks Sbastien !

Jacques