View Complete Post
I tried two steps below separately: restricted user ran for 30 minutes then I stopped the execution; They obviously could not run simultaneously. I only want to operate at the database and not the server level. Our other key db is already in the desired
collation. We'd like to have equijoins work on tables with the same collation sequences, and not have to use ETL or individual ALTERs for each table involved.
Second point: is CP1 below a 2000 only collation? That appears to be a patently false assumption in another forum posting. It appears to be a valid 2008 R2 collation is the point.
ALTER DATABASE DBNAME
SET RESTRICTED_USER WITH NO_WAIT;
COLLATE SQL_Latin1_General_CP1_CI_AS ;
I am using Visual Studio 2008 Express.
I did this simple test:
I created a new Web project with a simple page that has a Log In. There were no databases in App_Data.
I used the configuration tool to create a Role and User.
I refreshed the project folder and behold AspNetDB.mdf has appeared in the App_Data folder.
I have checked the Web.Config file and there is NO Connection string to this database.
So how do I move the Roles/Users application data storage away from AspNetDB.mdf to my own database ??!!
I was blocked by an issue of document version number. The customer wants to move a document from one document library to another. After the document is moved, version number should be kept the same and metadata values of each version should also be kept.
File.MoveTo(string newUrl) method can move file and keep the same version number but lose the metadata in previous versions. Only the latest version has metadata values. Also this method cannot move file cross site collections.
Following is my solution:
1. Upload all the versions along with metadata to the new location and then delete the old file.
2. Update document version number in database directly.
Finally the solution works well, but I don't know if step2 will impact any other default logic in SharePoint system. Below is the logic to update version number.
SqlConnection cn = new SqlConnection(connStr);
cmd = cn.CreateCommand();
Hi,I have recently started to learn Dynamic Data Web application.
I have built a Dynamic data Website with LINQ data access layer. When the LINQ data context was built over an existing SQL2005 database, the connection string for that database was correctly, automatically, placed into the Settings and .edmx Code for the project. It works, but it's a "static" connection string.
I would like to be able to use this one LINQ data access layer against both test and production databases without having to manually change and recompile the project's connection string each time. Is there a way to pass/change the User connection string to the LINQ data access layer at Run Time so that destination database changes? Ot in Other words How can user can choose a database from a list of databases.Thanks,Vinod
I am in the process of deploying an website developed in ASPNet 2.0 and using the login control and membership provider features. The site was deployed fine and was working perfectly till I changed the database name and user name to access the database. I changed the accordingly in the web.config to point to the new database. Everyting is working file except when the user tries to login into the website.
The error log says that login failed because it is trying to open the old database.
Any idea how I can solve the issue? Thanks for your help.
I need to change the owner of a bunch of databases, and I do not want to use sp_changedbowner as it is deprecated for the next sql releases. I there a way to do this in an Alter Database statement?
Any help would be appreciated
I have a data access layer in my application where I put all my *.xsd files (strongly typed datasets) that are autogenerated using Visual Studio 2010.
To be able to change target database I do the following manually in Visual Studio. Then I recompile and publish to web server.
1. Change database namn in connectionstring in Settings file under Properties in my DAL class library.
2. Find and replace database namn in all occureances of "DbObjectName="DBNAME.dbo.".
3. Find and replace database namn in all occureances of "DataSourceName="DBNAME.dbo.".
This seems to work but is not an optimal procedure so my question is:
There must be a better way, can I do this programmatically?
Best regards, Janhe
how to change the database while using ADO.Net Entity Framework?
I have two identical databases. I want to change the db. Can i change it through web.Config?
Like LINQ to SQL ?