Wednesday, March 28, 2012
Mirroring - Have to run sp_change_users_login after failover
web application. The web appliation uses SQL Authentication to connect to the
database. The mirroring is set up with a witness, and the connection string
includes "Failover Partner=myfailoverserver;".
When I'm running on the primary database, the app works great. When I do a
manual failover, the app crashes with the following error: "Cannot open
database "mydb" requested by the login. The login failed.
Login failed for user 'myuser'".
If I then run "EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser';"
everything works fine again, untill I fail over back tot he primary server.
Then I have to run sp_change_users_login again.
The mirroring auto failover, isn't really auto failover if I have to
manually run this script whenever it fails over.
1) Is there a way to add to the failover script that is run whenever there
is an automatic failover?
2) Do I need to recode my app to just use windows authentication?
3) Are there any other solutions to this problem?
Drop the [SQL] logins on your mirror.
When you run the CREATE LOGIN script on that server to create the logins,
make sure that you specify the SID of that particular user that is within
the primary server.
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:030929C7-7486-4E19-B8E6-32074DD4E26F@.microsoft.com...
>I have mirroring set up and working on a database that is used for an
>ASP.NET
> web application. The web appliation uses SQL Authentication to connect to
> the
> database. The mirroring is set up with a witness, and the connection
> string
> includes "Failover Partner=myfailoverserver;".
> When I'm running on the primary database, the app works great. When I do a
> manual failover, the app crashes with the following error: "Cannot open
> database "mydb" requested by the login. The login failed.
> Login failed for user 'myuser'".
> If I then run "EXEC sp_change_users_login 'Update_One', 'myuser',
> 'myuser';"
> everything works fine again, untill I fail over back tot he primary
> server.
> Then I have to run sp_change_users_login again.
> The mirroring auto failover, isn't really auto failover if I have to
> manually run this script whenever it fails over.
> 1) Is there a way to add to the failover script that is run whenever there
> is an automatic failover?
> 2) Do I need to recode my app to just use windows authentication?
> 3) Are there any other solutions to this problem?
Mirroring - Have to run sp_change_users_login after failover
web application. The web appliation uses SQL Authentication to connect to the
database. The mirroring is set up with a witness, and the connection string
includes "Failover Partner=myfailoverserver;".
When I'm running on the primary database, the app works great. When I do a
manual failover, the app crashes with the following error: "Cannot open
database "mydb" requested by the login. The login failed.
Login failed for user 'myuser'".
If I then run "EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser';"
everything works fine again, untill I fail over back tot he primary server.
Then I have to run sp_change_users_login again.
The mirroring auto failover, isn't really auto failover if I have to
manually run this script whenever it fails over.
1) Is there a way to add to the failover script that is run whenever there
is an automatic failover?
2) Do I need to recode my app to just use windows authentication?
3) Are there any other solutions to this problem?Drop the [SQL] logins on your mirror.
When you run the CREATE LOGIN script on that server to create the logins,
make sure that you specify the SID of that particular user that is within
the primary server.
--
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:030929C7-7486-4E19-B8E6-32074DD4E26F@.microsoft.com...
>I have mirroring set up and working on a database that is used for an
>ASP.NET
> web application. The web appliation uses SQL Authentication to connect to
> the
> database. The mirroring is set up with a witness, and the connection
> string
> includes "Failover Partner=myfailoverserver;".
> When I'm running on the primary database, the app works great. When I do a
> manual failover, the app crashes with the following error: "Cannot open
> database "mydb" requested by the login. The login failed.
> Login failed for user 'myuser'".
> If I then run "EXEC sp_change_users_login 'Update_One', 'myuser',
> 'myuser';"
> everything works fine again, untill I fail over back tot he primary
> server.
> Then I have to run sp_change_users_login again.
> The mirroring auto failover, isn't really auto failover if I have to
> manually run this script whenever it fails over.
> 1) Is there a way to add to the failover script that is run whenever there
> is an automatic failover?
> 2) Do I need to recode my app to just use windows authentication?
> 3) Are there any other solutions to this problem?
Mirroring - Have to run sp_change_users_login after failover
T
web application. The web appliation uses SQL Authentication to connect to th
e
database. The mirroring is set up with a witness, and the connection string
includes "Failover Partner=myfailoverserver;".
When I'm running on the primary database, the app works great. When I do a
manual failover, the app crashes with the following error: "Cannot open
database "mydb" requested by the login. The login failed.
Login failed for user 'myuser'".
If I then run "EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser';"
everything works fine again, untill I fail over back tot he primary server.
Then I have to run sp_change_users_login again.
The mirroring auto failover, isn't really auto failover if I have to
manually run this script whenever it fails over.
1) Is there a way to add to the failover script that is run whenever there
is an automatic failover?
2) Do I need to recode my app to just use windows authentication?
3) Are there any other solutions to this problem?Drop the [SQL] logins on your mirror.
When you run the CREATE LOGIN script on that server to create the logins,
make sure that you specify the SID of that particular user that is within
the primary server.
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:030929C7-7486-4E19-B8E6-32074DD4E26F@.microsoft.com...
>I have mirroring set up and working on a database that is used for an
>ASP.NET
> web application. The web appliation uses SQL Authentication to connect to
> the
> database. The mirroring is set up with a witness, and the connection
> string
> includes "Failover Partner=myfailoverserver;".
> When I'm running on the primary database, the app works great. When I do a
> manual failover, the app crashes with the following error: "Cannot open
> database "mydb" requested by the login. The login failed.
> Login failed for user 'myuser'".
> If I then run "EXEC sp_change_users_login 'Update_One', 'myuser',
> 'myuser';"
> everything works fine again, untill I fail over back tot he primary
> server.
> Then I have to run sp_change_users_login again.
> The mirroring auto failover, isn't really auto failover if I have to
> manually run this script whenever it fails over.
> 1) Is there a way to add to the failover script that is run whenever there
> is an automatic failover?
> 2) Do I need to recode my app to just use windows authentication?
> 3) Are there any other solutions to this problem?
Monday, March 26, 2012
Mircosoft.ReportViewer.WebForms.dll fails to load
I've just deployed a website to a test server and when I hit a web page that uses the ReportViewer control, I get an error "Microsoft.ReportViewer.WebForms.dll failed to load...". I've searched all hard drives attached to the server and the DLL is not there. I understand that this should be part of the .NET 2.0 framework redistributable package and should live in the WINDOWS\assembly folder. It is not there.
The Add/Remove Programs dialog from the Control Panel shows the .NET 2.0 framework as installed. This is a windows 2000 server box running IIS 5.
Anyone got a clue as to why this DLL would be missing?
Thanks,
Mike
I am having similar issues. I've manually copied the Microsoft.ReportViewer.WebForms.dll from my development PC to my production server's Web app's Bin directory, but am unable to view the ReportViewer's icons such as Export, Print, etc. They're just red x's.
What is the best way to publish the Report Viewer?
|||The cause of this problem is because the ReportViewer is not installed on the Virtual (Production) Server. Install the ReportViewer by running ReportViewer.exe on your Virtual Server. You can most likely find the ReportViewer.exe on your development machine at C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\ReportViewer\ReportViewer.exe
Installation instructions(see link below) are easy to follow & unlike everything else you've probably been wrestling with, this installation should be painless.
http://msdn2.microsoft.com/en-us/library/ms251723(d=printer).aspx
Monday, March 12, 2012
million rows user table and growing
right now..
We would like to consider scaling this out as we grow to 5 -10 million users
and not have it in one table.
Every time a user logs on or changes profile,etc, we dont want to cause
contention or blocking on this table.. so whats the best way to go about
this ?
If i partition the table, whats the best way to go about partitioning it ?
Thanks> Every time a user logs on or changes profile,etc, we dont want to cause
> contention or blocking on this table.. so whats the best way to go about
> this ?
As long as you have appropriate indexing, I wouldn't expect performance or
concurrency problems regardless of table size. A few million rows really
isn't that large nowadays and, in my option, doesn't warrant partitioning.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <hassan@.test.com> wrote in message
news:%23ytph$8XIHA.4196@.TK2MSFTNGP04.phx.gbl...
> For our web site, we now have a million users and we have one user table
> right now..
> We would like to consider scaling this out as we grow to 5 -10 million
> users and not have it in one table.
> Every time a user logs on or changes profile,etc, we dont want to cause
> contention or blocking on this table.. so whats the best way to go about
> this ?
> If i partition the table, whats the best way to go about partitioning it ?
> Thanks|||Perhaps your company should consider hiring an experienced DBA' One that
can guide you proactively instead of reactively and successfully get you to
the level you wish to achieve.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Hassan" <hassan@.test.com> wrote in message
news:%23ytph$8XIHA.4196@.TK2MSFTNGP04.phx.gbl...
> For our web site, we now have a million users and we have one user table
> right now..
> We would like to consider scaling this out as we grow to 5 -10 million
> users and not have it in one table.
> Every time a user logs on or changes profile,etc, we dont want to cause
> contention or blocking on this table.. so whats the best way to go about
> this ?
> If i partition the table, whats the best way to go about partitioning it ?
> Thanks|||Focus on indexing strategy , statistics , as 1 million rows is not that
much.
--
Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com
"Hassan" <hassan@.test.com> wrote in message
news:%23ytph$8XIHA.4196@.TK2MSFTNGP04.phx.gbl...
> For our web site, we now have a million users and we have one user table
> right now..
> We would like to consider scaling this out as we grow to 5 -10 million
> users and not have it in one table.
> Every time a user logs on or changes profile,etc, we dont want to cause
> contention or blocking on this table.. so whats the best way to go about
> this ?
> If i partition the table, whats the best way to go about partitioning it ?
> Thanks
Friday, March 9, 2012
Migration Of MSSQL instance along with security permissions
This is the scenario. Basically i work for a web hosting company now we have taken over control of a competitor and would like to migrate there existing data to our own MSSQL server's in order to integrate them into our automatic system etc etc ...
The current system is running MSSQL7.
The system been copied to is MSSQL2K.
Objectives:
Retain all security accounts listed on the MSSQL7 system and use them on the MSSQL2K system. This includes all the logins that use standard MSSQL login's. (Reason : To ensure that all the customers ASP pages work after the DB's have been copied.)
Backup all the databases on the MSSQL7 and restore them to the MSSQL2K system. Unfortunately system is running on a different network with firewall's etc in between. What type of maintenance plan and how should i implement the requirement to keep all the login account's?
Any help greatly appreciated......
thxone of the option can be like take all backups on either hdd or tape then connect it to ur server copy it from previous one to new one.
to copy all login info etc u can write a script if u need the script i can send u next time (this will take the info to a cursor and one by one it wil update.)
as far as sql 7 database schema and 2k schema is concerned i dont think it will be a problem.
this is an intersting case pl update me|||Hi ranjan apologies for not replying sooner (did not know if anyone had replied). I agree when u state that u dont think either that the difference between porting to 2000 is going to cause an issue. I have restored all the databases now but am in need of a little help / inspiration on how to port over the login names. Perhaps you can help or have a script that performs this task. Regards the script u have for updating i presume its independent to the current logins that are on the SQL2K system at present. How is this done?
Wednesday, March 7, 2012
Migration from SQL Server 2000 to 2005
Before the migration, consider the following issues.
1. What is the Edition of SQL Server 2000?
2. What is the Edtiion of SQL Server 2005 you want to upgrade to?
3. What is the processor architecture? If it is IA64, then you must upgrade to 64-bit. If it is x64, then SQL Server 2000 has only 32-bit builds. At the same time, SQL Server 2005 has 64-bit builds. You cannot upgrade 32-bit SQL Server 2000 to 64-bit SQL Server 2005 directly.
4. What is the operating system running SQL Server 2000? If SQL Server 2005 editions requires a different operating system, is it acceptable to upgrad the operating system? For example, SQL Server 2005 Enterprise edition requires server operating systems such as Windows 2000 Advanced Server 2004, Windows Server 2003 Enterprise Edition SP1, and the coming Longhorn server.
5. Any special business and applicaiton logic?
Please also download the latest BOL from MSDN website for detailed information.
Once you decide to migrate, try side by side upgrade instead of in-site upgrade. SQL Server 2000 can be upgraded to SQL Server 2005 directly (if editions and processor architecture builds match). At the same time, SQL Server 2000 and SQL Server 2005 can be installed side by side successfully on the same machine if the resources allow. If resources allow, please follow the following recommendation.
1. Install SQL Server 2005 side by side with SQL Server 2000, i.e., not direct upgrade.
2. While SQL Server 2000 is still running, i.e., your application is still running, duplicate/copy data from SQL Server 2000 to SQL Server 2005.
3. Tune SQL Server 2005 and test SQL Server 2005.
4. When you think SQL Server 2005 is tested well and works well, switch to SQL Server 2005.
5. You may uninstall SQL Server 2000. This is optional.
Anyway, please back up your database before performing any major operations like this.
|||Well, luckily we'll be buying a new machine to eventually replace our existing database server. So we don't need to worry about actually "upgrading" anything currently in production. We'll just be migrating the actual databases to the new system.Our new system will be x64 running Windows Server 2003 and SQL Server 2005.
|||
Another great source of information in the Upgrade Portal
http://www.microsoft.com/sql/solutions/upgrade/default.mspx
This has pointer to lots of documents on Upgrading and it also points you to the Upgrade Advisor. If you run this tool against you SQL 2000 DB, SQL Batch Files and a SQL Trace file it can help determine if there is any potential incompatibilities.
Thanks
Michelle
Migration from SQL Server 2000 to 2005
Before the migration, consider the following issues.
1. What is the Edition of SQL Server 2000?
2. What is the Edtiion of SQL Server 2005 you want to upgrade to?
3. What is the processor architecture? If it is IA64, then you must upgrade to 64-bit. If it is x64, then SQL Server 2000 has only 32-bit builds. At the same time, SQL Server 2005 has 64-bit builds. You cannot upgrade 32-bit SQL Server 2000 to 64-bit SQL Server 2005 directly.
4. What is the operating system running SQL Server 2000? If SQL Server 2005 editions requires a different operating system, is it acceptable to upgrad the operating system? For example, SQL Server 2005 Enterprise edition requires server operating systems such as Windows 2000 Advanced Server 2004, Windows Server 2003 Enterprise Edition SP1, and the coming Longhorn server.
5. Any special business and applicaiton logic?
Please also download the latest BOL from MSDN website for detailed information.
Once you decide to migrate, try side by side upgrade instead of in-site upgrade. SQL Server 2000 can be upgraded to SQL Server 2005 directly (if editions and processor architecture builds match). At the same time, SQL Server 2000 and SQL Server 2005 can be installed side by side successfully on the same machine if the resources allow. If resources allow, please follow the following recommendation.
1. Install SQL Server 2005 side by side with SQL Server 2000, i.e., not direct upgrade.
2. While SQL Server 2000 is still running, i.e., your application is still running, duplicate/copy data from SQL Server 2000 to SQL Server 2005.
3. Tune SQL Server 2005 and test SQL Server 2005.
4. When you think SQL Server 2005 is tested well and works well, switch to SQL Server 2005.
5. You may uninstall SQL Server 2000. This is optional.
Anyway, please back up your database before performing any major operations like this.
|||Well, luckily we'll be buying a new machine to eventually replace our existing database server. So we don't need to worry about actually "upgrading" anything currently in production. We'll just be migrating the actual databases to the new system.Our new system will be x64 running Windows Server 2003 and SQL Server 2005.
|||
Another great source of information in the Upgrade Portal
http://www.microsoft.com/sql/solutions/upgrade/default.mspx
This has pointer to lots of documents on Upgrading and it also points you to the Upgrade Advisor. If you run this tool against you SQL 2000 DB, SQL Batch Files and a SQL Trace file it can help determine if there is any potential incompatibilities.
Thanks
Michelle
Monday, February 20, 2012
Migrating to SQL Server 2000 Standard to 2005 Express
was purely used by internal employees. At the time, it was cheaper to get a
per user license. Now we have application that is open to the public and so
we need to change the licensing mode to per processor mode. Right now, we
have a tight budget, so we are thinking about getting SQL Server 2005
Express. If performance is an issue, we may upgrade to other version later.
Looking at the http://msdn2.microsoft.com/en-us/library/ms143393.aspx, 2000
standard to 2005 express upgrade is not supported. Does that mean that if
I get a copy of backup of 2000 standard database and restore it to 2005
express, it will not work? If the upgrade works, will I able to use Upgrade
Advisor?
ThanksAFAIK, you *should* be able to restore your database to SQL Express.
I'd recommend doing a test migration onto a development server or
workstation and trying it out. You're going to want to migrate, instead
of upgrading, though...
JJ wrote:
> I am working for a small company. We have an in-house web application tha
t
> was purely used by internal employees. At the time, it was cheaper to get
a
> per user license. Now we have application that is open to the public and
so
> we need to change the licensing mode to per processor mode. Right now, we
> have a tight budget, so we are thinking about getting SQL Server 2005
> Express. If performance is an issue, we may upgrade to other version late
r.
> Looking at the http://msdn2.microsoft.com/en-us/library/ms143393.aspx, 200
0
> standard to 2005 express upgrade is not supported. Does that mean that i
f
> I get a copy of backup of 2000 standard database and restore it to 2005
> express, it will not work? If the upgrade works, will I able to use Upgra
de
> Advisor?
> Thanks
>
-Dave Markle
http://www.markleconsulting.com/blog|||The only thing I can think of that would prevent this is a database bigger
than 4GB. There might also be some performance differences because Express
won't use as many system resources as standard.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Dave Markle" <"dma[remove_ZZ]ZZrkle"@.gmail.dot.com> wrote in message
news:OX3yXomSHHA.4744@.TK2MSFTNGP02.phx.gbl...
> AFAIK, you *should* be able to restore your database to SQL Express. I'd
> recommend doing a test migration onto a development server or workstation
> and trying it out. You're going to want to migrate, instead of upgrading,
> though...
> JJ wrote:
>
> --
> -Dave Markle
> http://www.markleconsulting.com/blog
Migrating to SQL Server 2000 Standard to 2005 Express
was purely used by internal employees. At the time, it was cheaper to get a
per user license. Now we have application that is open to the public and so
we need to change the licensing mode to per processor mode. Right now, we
have a tight budget, so we are thinking about getting SQL Server 2005
Express. If performance is an issue, we may upgrade to other version later.
Looking at the http://msdn2.microsoft.com/en-us/library/ms143393.aspx, 2000
standard to 2005 express upgrade is not supported. Does that mean that if
I get a copy of backup of 2000 standard database and restore it to 2005
express, it will not work? If the upgrade works, will I able to use Upgrade
Advisor?
Thanks
AFAIK, you *should* be able to restore your database to SQL Express.
I'd recommend doing a test migration onto a development server or
workstation and trying it out. You're going to want to migrate, instead
of upgrading, though...
JJ wrote:
> I am working for a small company. We have an in-house web application that
> was purely used by internal employees. At the time, it was cheaper to get a
> per user license. Now we have application that is open to the public and so
> we need to change the licensing mode to per processor mode. Right now, we
> have a tight budget, so we are thinking about getting SQL Server 2005
> Express. If performance is an issue, we may upgrade to other version later.
> Looking at the http://msdn2.microsoft.com/en-us/library/ms143393.aspx, 2000
> standard to 2005 express upgrade is not supported. Does that mean that if
> I get a copy of backup of 2000 standard database and restore it to 2005
> express, it will not work? If the upgrade works, will I able to use Upgrade
> Advisor?
> Thanks
>
-Dave Markle
http://www.markleconsulting.com/blog
|||The only thing I can think of that would prevent this is a database bigger
than 4GB. There might also be some performance differences because Express
won't use as many system resources as standard.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Dave Markle" <"dma[remove_ZZ]ZZrkle"@.gmail.dot.com> wrote in message
news:OX3yXomSHHA.4744@.TK2MSFTNGP02.phx.gbl...
> AFAIK, you *should* be able to restore your database to SQL Express. I'd
> recommend doing a test migration onto a development server or workstation
> and trying it out. You're going to want to migrate, instead of upgrading,
> though...
> JJ wrote:
>
> --
> -Dave Markle
> http://www.markleconsulting.com/blog
Migrating to SQL Server 2000 Standard to 2005 Express
was purely used by internal employees. At the time, it was cheaper to get a
per user license. Now we have application that is open to the public and so
we need to change the licensing mode to per processor mode. Right now, we
have a tight budget, so we are thinking about getting SQL Server 2005
Express. If performance is an issue, we may upgrade to other version later.
Looking at the http://msdn2.microsoft.com/en-us/library/ms143393.aspx, 2000
standard to 2005 express upgrade is not supported. Does that mean that if
I get a copy of backup of 2000 standard database and restore it to 2005
express, it will not work? If the upgrade works, will I able to use Upgrade
Advisor?
ThanksAFAIK, you *should* be able to restore your database to SQL Express.
I'd recommend doing a test migration onto a development server or
workstation and trying it out. You're going to want to migrate, instead
of upgrading, though...
JJ wrote:
> I am working for a small company. We have an in-house web application that
> was purely used by internal employees. At the time, it was cheaper to get a
> per user license. Now we have application that is open to the public and so
> we need to change the licensing mode to per processor mode. Right now, we
> have a tight budget, so we are thinking about getting SQL Server 2005
> Express. If performance is an issue, we may upgrade to other version later.
> Looking at the http://msdn2.microsoft.com/en-us/library/ms143393.aspx, 2000
> standard to 2005 express upgrade is not supported. Does that mean that if
> I get a copy of backup of 2000 standard database and restore it to 2005
> express, it will not work? If the upgrade works, will I able to use Upgrade
> Advisor?
> Thanks
>
-Dave Markle
http://www.markleconsulting.com/blog|||The only thing I can think of that would prevent this is a database bigger
than 4GB. There might also be some performance differences because Express
won't use as many system resources as standard.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Dave Markle" <"dma[remove_ZZ]ZZrkle"@.gmail.dot.com> wrote in message
news:OX3yXomSHHA.4744@.TK2MSFTNGP02.phx.gbl...
> AFAIK, you *should* be able to restore your database to SQL Express. I'd
> recommend doing a test migration onto a development server or workstation
> and trying it out. You're going to want to migrate, instead of upgrading,
> though...
> JJ wrote:
>> I am working for a small company. We have an in-house web application
>> that was purely used by internal employees. At the time, it was cheaper
>> to get a per user license. Now we have application that is open to the
>> public and so we need to change the licensing mode to per processor mode.
>> Right now, we have a tight budget, so we are thinking about getting SQL
>> Server 2005 Express. If performance is an issue, we may upgrade to other
>> version later.
>> Looking at the http://msdn2.microsoft.com/en-us/library/ms143393.aspx,
>> 2000 standard to 2005 express upgrade is not supported. Does that mean
>> that if I get a copy of backup of 2000 standard database and restore it
>> to 2005 express, it will not work? If the upgrade works, will I able to
>> use Upgrade Advisor?
>> Thanks
>
> --
> -Dave Markle
> http://www.markleconsulting.com/blog