Hello everyone, I have created my web application in VS 2005 using asp.net 2.0 and the built in sql .mdf database creater that comes with visual studio. After I developed my website, I then wanted to move it to one of our servers on the network, which I did without a problem. The website works fine but here is my challange. I need users to be able to connect to the database via login script and the script inserts computer data into the database. So I figured I need to attach the Database to SQL Server 2005. When I try to do this it gives me this database is in use. So I stop the website in IIS, and it allows me to add the database into the SQL Server. Once I do this, and start the website again, the website no longer works and I get a bunch of database errors, that do not get fixed untill I re-copy the website to the server.
Is there a way to just connect to a .mdf file on the network that is not attached to a sql server, through a connection string in a login script? Maybe there is something else I need to do to the database before copying to the server? Or should I re-programm the website with a newly created database in SQL Server, and use that as the datasource?
At one of my accounts I'm using SQL 2008r2 and SSIS in an DWH solution. Today I wanted to created a dynamic sql statement in one of the packages. The dynamic part is in the where-clause a sql query I use. I want to set the values for this clause dynamically. Therefor I created a user variable (named 'Filter') which should get it´s value at run-time.
/DTS "MSDBProdMy Package" /SERVER "My-Server" /CHECKPOINTING OFF /REPORTING EW /SET "Package.Variables[User::Filter].Properties[Expression]";" where [Starting Date] < '2008-09-01 00:00:00.000' "
However when I execute this package with dtexecui it doesn not use the value specified after the /SET parameter, but instead uses the value specifiied at design time. I get the same when I add the execution of ths pacakage as a sql server job step (type SSIS). I would expect that value specified after the /SET parameter would overwrite the valus specified at design time, but I don't see that happening.
Attempting to link Access 2003 to SQL 2005, there is something keeping from doing so.
1 I setup the instance as sqlexpress.
2 I have a database shell there also.
3 It connects when I start the instance service.
4 My remote connections are configured to handle TCP/IP & Named Pipes.
Not in this order, but you get the idea. Now that I have these in place, I went first to the Access 2003 database to link the tables to this. When I came accross trouble in the form of need for a DSN to the domain for the things I created above.
In attempting to create one that looked functional, I came back to the same step. But, unsuccessful to link the tables again because browsing to that domain does not even show that particular file. This is the problem.
I do believe that once I am able to select a DSN, I will have a "healthy baby connection". I will then be the proud father of my first Server-side database setup!!!! But I am trying to get over these labor pains.
Hi guys how are you doing? I was wondering how should I set the values in these two variables without making the select, I mean just set, I think that if I select two times it takes much longer is that true?
declare @user_id int, @creation datetime
select @user_id = user_id, @creation = creation from solarUsers
I need to connect my Local Database from SQL Server to the Web Database. I need to know what all things to be done for completing this process. Some one please please help me with this.
Ad if this information is not enough, please do ask me any question regarding this and iam ready to answer them.
One more thing, iam not that familiar with SQL Server 2000 but i can manage to do things.
I am learning dotnet thru Microsoft Official Curriculum and I got stuck up at one point. That is I couldn't configure the required databases according to the sql server I have installed and configured. I created a doctors database and while configuring using the below code I couldn't know what is 'ASPNET' in "SELECT @s = @@servername + 'ASPNET'" Also what is 'webuser'
I see that a .rds file was created as a result of me defining a shared data source. So are they meant to be shared across projects only within the same solution, across solutions perhaps with references, system wide etc?
...anywhere in the folder structure a person must be set up as a Content Manager at the Reporting Services ROOT (and at every level of the folder hierarchy down to the level that they are moving/renaming)?
Sure, you can remove them from the role in other folders where they should not be moving or renaming objects, but it seems you still have to have them at the root (and down the chain), which gives them far more capabilities than you might intend.
Hello, I have specified a default database in my web.config like this: <dataConfiguration defaultDatabase="scsLocal"/> <connectionStrings> <add name="scsLocal" connectionString="server=DRLSWARTEBRV;database=SCS;uid=******;password=******;" providerName="System.Data.SqlClient"/> </connectionStrings> Now I would like to configure a SQLDataSource control to use this default database, yet it prompts me for a connectionstring. I know I can program it in the code behind file (if I ommit connection string, it will use the default), but then I can make no use of the wizard for configuring the SQLDataSource which would safe me a lot of coding. Is there a way to configure the SQLDataSource to use the default database that is specified in the web.config? Thanks! Veerle
I didn't know exactly which forum to post this in, so if I need to post it into another one, please let me know. Also, I have absolutely no SQL or DB experience. I am learning as I go.
The Situation: I created a virtual network for my company which included MS CRM, which uses SQL Server 2005. Everything was working fine until today. My company asked me to make a change to the domain name, as we are changing company names. I followed the processes through microsoft's documentation that I found online. The rename went fine. Since then, we can no longer access CRM. When I run the environment checks, it gets hung up on the SQL Server components. It says that it can't confirm the MSSQLSERVER service is running (it is) and it can't connect to the database. As best as I can tell, the database is looking for the old domain name, which doesn't exist. How do I edit or configure the existing database to reflect the new domain name. It's important to do this as we have data in that database that we need to access. Any help in this matter is very much appreciated!!!
Alter failed for Database 'databasename'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Alter+Database&LinkId=20476
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The server network address "TCP://Mirrorserver.domainname.local:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=1418&LinkId=20476
I am trying to configure a connection manager for a database that is still using SQL Server 6.5 But it is not working properly. I put the server name, user name and pass word, I select the Native OLE DBMicrosoft OLE DB Provider for SQL Server as my provider.
When I click Test Connection it says the connection is fine but then the drop down list for the list of databse names hows nothing!
I have been trying to configure SQL Server 2005 Report Services. Every time I create the ReportServer database, the systems asks me if I want to "update" the database. It allows me no other option. When I click "apply", I get the message that the database version does not match my installation version. Does anybody have any insight into what happening with the configuration? What's more, do you have a solution?
I have created profiles in my database as mentioned below. now i want to delete the profile created in database. can some one tell me how to proceed furthur.
i need to delete them permenantly. EXECUTE msdb.dbo.sysmail_add_account_sp @account_name = 'MyMailAccount', @description = 'Mail account for Database Mail', @email_address = 'makclaire@optonline.net', @display_name = 'MyAccount', @username='makclaire@optonline.net', @password='abc123', @mailserver_name = 'mail.optonline.net' ----------------------------------------------------- EXECUTE msdb.dbo.sysmail_add_profile_sp @profile_name = 'MyMailProfile', @description = 'Profile used for database mail' --------------------------------------------------------EXECUTE msdb.dbo.sysmail_add_profileaccount_sp @profile_name = 'MyMailProfile', @account_name = 'MyMailAccount', @sequence_number = 1
I am struggling with configuring SSB network routes to a mirror database. What I want to accomplish is to configure a SSB application to work in a database mirroring setup but I am not looking for a load balancing solution.
According to SQL Server 2005 Books Online (http://msdn2.microsoft.com/en-us/library/ms166090.aspx) the typical routing configuration for a service hosted by a mirrored database is set by specifying the 'mirror_address' field but leaving the 'broker_instance' field empty (i.e. NULL) in the sys.routes table (see Example 3 in link above). I haven't seen how this is possible because if you specify the MIRROR_ADDRESS parameter in the CREATE/ALTER ROUTE command then you must also specify the BROKER_INSTANCE parameter.
I haven't found a way to set the mirror_address field to a valid value and the broker_instance field as NULL, is this possible? If not I must set the broker_instance as the guid of my broker instance but my understanding is that it should primarily be used for load balancing configuration. My preference would be to not set the BROKER_INSTANCE parameter, is this possible?
- Microsoft SQL Server 2005 Standard Edition running on Microsoft Windows Server 2003 Standard Edition - Client Service for Netware installed. - Access 2000 database in a Novell Directory Services (NDS) Environment - SQL Server service running under local Administrator account.
Linked server configured as follow:
Linked server: MyDB Provider: Microsoft Jet 4.0 OLE DB Provider Product name: Access 2000 Data Source: UNC path to my Access database
Security: Admin with no password (default Access behaviour)
I can connect to my access database by following the next steps:
- Open Management studio on the SQL Server itself (where I'm logged in as Administrator) - Connect using Windows Authentication (Administrator) - Create a new query, run EXEC sp_tables_ex 'MyDB'
This will return all the tables from the Access database.
I can also make a view pointing to MyDB...MyTable.
Enough prove to me It can work....
So far so good
But now the tricky part.
When I login as 'sa', I can't connect and will receive the following message:
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "MyDB" returned message "'Full UNC to my access database' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.".Msg 7303, Level 16, State 1, Procedure sp_tables_ex, Line 41Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "MyDB".
(In real life I want to connect to my SQL 2005 Server from a ASP.NET (2.0) application using SQL authentication, but as long as I can't get the above working this is not important for now)
Could some help me out an tell me why this wont run.
I think I got an error at the bottom
USE InfoPathBudget GO UPDATE TOSS SET ytdexpenses = SUM(monthlyExpenses) SET ytdBudgeted = SUM(monthlyBudgeted) SET ytdCapitalExpenses = SUM(monthlyCapitalExpenses) SET ytdCapitalBudgeted = SUM(monthlyCapitalBudgeted)
I got this when I ran it Server: Msg 157, Level 15, State 1, Line 2 An aggregate may not appear in the set list of an UPDATE statement.
I have read many tutorials and articles on how to connect with ADO.net and thought I had it right, but I don't so I'd appreciate any help and guidance you can give me.
This connection works: Dim ConnString As SQLConnection ConnString = ("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database1Names.mdf;Integrated Security=True;User Instance=True")
but this one does not work. Why doesn't it work? Dim ConnString As SQLConnection ConnString = ("Server=(local).SQLExpress; Database = Database1Names.mdf;Data Source = Trusted_Connection = True") This code I copied from the tutorials I've read so I'm very confused why it won't work. the one that does work is nothing like this one!! The first connection is the one I got from the property window of the dataset I'm using XP Pro, VB.net express 2005 and SQL Express. I don't have any passwords on my laptop As a beginner, what confuses me is that the tutorials I read say one thing, yet the code that works is completely different. Any help will be greatly appreciated. Thanks Regards, Steve
Hi, I'm getting ready to deploy an ASP.NET application to a server that does not support SQL Express, but does support MS Access and SQL Server. Is there any easy way to convert my SQL Express code to either Access or regular SQL Server code, without having to change very much code in my application. I really like the integration that SQL Express has with Visual Web Developer, and would like to be able to keep that sort of integration if at all possible. Thanks,Drew
I just got a new computer from work for Home use, and I need to figure out what would be the best way to transfer databases I create at home to work? I have a zip 250 disk, but what would be the best method?, What files need to be copied, what does it all entail?
I am using Database Maintenance Plan to run backups. But I am quite short in disk space. So I declared to remove previous backups to release disk space. Still have problem when writing backup file onto the hard drive. I suspect that SQL first tries to complete backup and put in on the disk and only after that removes old file. Could not find any tips in BOL or elsewhere in what order this all goes - backup - then removal or removal - then backup. If anyone know I would be very happy for the rest of my life. Thanks.
I'm trying to use schedulled task to automate restore and i keep getting the error database in use, it is set to dbo only and single user, and it has me as the user that has the lock, i have tried to kill it but it won't go, i have even started and stopped the server. any ideas?
I tried to create a simple application based on the Sql Server CE samples and, as is typical when I play with databases, the program failed. In this case it failed to even load. The program has a form and a data source that I dropped onto the form. When I run the program the program breaks at this line:
Code Snippetthis._connection = new global::System.Data.SqlServerCe.SqlCeConnection();
The error is:
An unhandled exception of type 'System.DllNotFoundException' occurred in System.Data.SqlServerCe.dll Additional information: Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
My first attempt at 'fixing' this was simply to copy the requisite DLLs to my bindebug folder. I found the DLLs here: C:Program Files (x86)Microsoft SQL Server Compact Editionv3.5 and copied these - sqlcecompact35.dll, sqlceca35.dll, sqlceme35.dll, sqlceoledb35.dll, sqlceqp35.dll and sqlcese35.dll, sqlceer35EN.dll - to my bindebug folder.
Now instead of the first error, I get this error:
An unhandled exception of type 'System.BadImageFormatException' occurred in System.Data.SqlServerCe.dll Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
I am running Vista Business (x64) and using (the desktop version of) Sql Server Compact Edition 3.5 with Visual Studio 2008 Standard Edition. The test 'program' is written in C#. (Incidentally I can play with the database with no problems in Visual Studio 2008's server explorer. I can look at data, add data, etc.)
I am having trouble getting database mail to work. I have tried many things, but can't make it work.
Initially, I setup IIS opn the same box as a virtual SMTP server. I set it up to relay to 127.0.0.1. In sql server, I setup database mail to point to localhost, with no authentication. After the setup, when I test the email it works fine.
I created a job that will fail every time. I setup myself as the notify party on the job. When I run the job, it fails. I get no email. The job log has the following error (notice failed to notify):
Message The job failed. The Job was invoked by User xxxxAdministrator. The last step to run was step 1 (test 1). NOTE: Failed to notify 'Dan Jones' via email.
In the SQL Server log, I see:
[264] An attempt was made to send an email when no email session has been established
Also:
Message [260] Unable to start mail session (reason: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException: Mail configuration information could not be read from the database. ---> System.Data.SqlClient.SqlException: profile name is not valid at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) a)
This is my preferred configuration, but I couldn;t make it work, so I tried another...
I tried to setup mail through my mail service provider. I entered the IP in sql server. When I test it, I get the following error:
Date 11/19/2007 8:16:06 AM Log Database Mail (Database Mail Log)
Log ID 24 Process ID 3176 Last Modified 11/19/2007 8:16:06 AM Last Modified By NT AUTHORITYSYSTEM
Message 1) Exception Information =================== Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException Message: Could not retrieve item from the queue. Data: System.Collections.ListDictionaryInternal TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Controller.ICommand CreateSendMailCommand(Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DBSession) HelpLink: NULL Source: DatabaseMailEngine
StackTrace Information =================== at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession) at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateCommand(DBSession dbSession) at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db) at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)
On the same box, I used telnet to step through thge SMPT mail send process. It worked fine, indicating no firwewall, router or other issues.
I am of the opinion that Database mail is defective. This post is similar to another I have done, but no usefull responses have been made. I am hoping that sonmeone will provide some useful information here
This is running on Windows 2003 Standard, and on SQL Server workgroup edition. I have a second backup server similary configured that behaves exactly the same.
i followed all the instruction to add the database of the adventure works to the database server. but when i attach the database from the managment sql server this error comes
Couldnt find row in sysindexes for database ID 8, object ID1 ..........etc
and couldnt open new database 'adventureworks'. create database is aborted.
please i need a qucik help. cuz i tried the msdn and i failed.
I have just tried to install MSDE and tried to make that work with Quickstart, however after several tries, I gave up, because everytime I installed MSDE it still does not want to work with Quickstart, can anyone please tell me how to do just that ?
I wonder some people in this forum complained about it as well. I wonder why it is so hard. And do I have to employ a DBA to do just that ^_^
I realized that MSDE that comes with VS.net 2002 CD was a lot easier to install and configure than the MSDE sp3
I am using Windows XP, VS.net 2003, ASP.net V1.1 and MSDE Sp3
hi, i hope this is the correct forum?i have developed a small asp.net 2.0 web site with vwd using sqlExpress which appears to just bean data file and a log file in my app_data directory. there are two databases, the users one that is created by the login manager and my own that i created to store data. this all works fine on my laptop. i have an xp-pro machine setup with IIS and the frontpage web extentions, i have also installed the .net framework v2.0 on it and done all the windows updates. i have given app_data read/write access for the aspnet and network service users.i used the copy site feature of vwd to install on the xp box and although the site seems to workwhen it needs to bind a gridview to my sqldatasource it gives an error Cannot open user default database. login failed.Loginfailed for user 'rlxpaspnet'Any ideas? i have googled and tried all sorts, but to no avail, so i throw my self on your mercy!Cheers,russ
Since VWD Express doesn't support Publish Website, I used 'Copy Website' to deploy my local site to the hosting server. The static page works fine, but when it gets to accessing database, I kept getting the following error: An attempt to attach an auto-named database for file I:DataWebdnh.sklingling_15726c71-b2bf-479f-bcc3-b7ae43318f3cwwwApp_DataPersonal.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. Anyone has the same experience? How to resolve this? Thanks,
I downloaded the Northwind database install script (SQL2000SampleDb.msi) and ran instnwnd.sql in my SQL Server Management Studio Express. I got the following error messages:
Msg 5105, Level 16, State 2, Line 1
A file activation error occurred. The physical file name 'northwnd.mdf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
The database 'Northwind' does not exist. Use sp_helpdb to show available databases.
Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
The database 'Northwind' does not exist. Use sp_helpdb to show available databases.
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'Northwind'. No entry found with that name. Make sure that the name is entered correctly.
Msg 3726, Level 16, State 1, Line 2
Could not drop object 'dbo.Customers' because it is referenced by a FOREIGN KEY constraint.
Msg 3726, Level 16, State 1, Line 2
Could not drop object 'dbo.Employees' because it is referenced by a FOREIGN KEY constraint.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Employees' in the database.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'LastName' already exists on table 'dbo.Employees'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'PostalCode' already exists on table 'dbo.Employees'.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Customers' in the database.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'City' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'CompanyName' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'PostalCode' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'Region' already exists on table 'dbo.Customers'.
(1 row(s) affected)
............................................etc.
Please help and advise me how to get the Northwind database installed in my SQL Server Management Studio Express.