I recently migrated a database from server A to server B. The backup jobs I am trying to build on server B are failing because of the following error: -------------- [Microsoft SQL-DMO] Error 21776: [SQL-DMO]The name 'WinDat' was not found in the Databases collection. If the name is a qualified name, use [] to separate various parts of the name, and try again. -------------
How do I add this database to the databases collection so it will be recognized?
Till yesterday every thing was fine....after i installed visual studio...god knws wat happnd dat it was not working, i did everything again but noe using my asp.net forms i am unable to write/edit/update the database, though i can view the same.....can any one suggest was might b d problem.
(i have set permissions for IUSER bot Read and Write)
this is sanjeev, i have SSIS package, using my c# program i want to add one execute package task to this package's sequence container.
it is creating the new package with out any probelm. but when i opened the package and try to move the newly created exeute package task it is giving the following error.
the element cannot be found in a collection. this error happens when you try to retrieve an element from a collection on a container during the execution of the package
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
I Enabled Data Collection on one of the server and planned to make it as Centralised Management Data Warehouse I configured data collection on it and can view reports. Next, I went to other server and configured "Set up data collection" to use my first instance as the centralised Database. But the issue is I can only see reports of first server. Am I missing something here.
I did exactly as explained in this video [URL] .....
Hi All, i have some views in my database, and these views are having some columns,i want to know particular column name to be there in particular view. For example ,just like functionality of sp_search_code 'Keyword'. like this i want to search in views . or else please let me know sp_search_code 'Keyword'. was used for views also. Thanks and Regards, G.JaganMohanrao.
This is the error that I am getting after an unsuccessful database attachment.
Error 21776: [SQL-DMO] The name 'XXXX' was not found in the Database collection. If the name is a qualified name, use [] to separate various parts of the name, and try again.
i am new at T-SQL and am trying to delete entries in a column that are not integers. i have the following code. why does it not work.
T-SQL
select invoicenumber from [control register] where convert(int, invoicenumber) like '%' if @@error > 0 begin delete from [control register] where invoicenumber = invoicenumber end go
gives me the error in Query analyser:
Server: Msg 245, Level 16, State 1, Line 1 Syntax error converting the nvarchar value '10-3-05' to a column of data type int.
@@error is supposed to pick up the error. why is it not.
please could you reply urgently at chris@captivedesign.co.za
I can add two reportitem controls, ie reportitems!begbal.value + reportitems!deposits.value, without a problem. However, when I add the 3rd reportitem control to the expression, ie + reportitems!withdrawals.value, some really funky arithmetic occurs. All of these controls I am referring to are in the same group footer.
can someone tell me why this sql statement doesnt work?
SQL = "SELECT (Count(department_id) as 'totals' FROM nonconformance WHERE department_id = '7'),(Count(department_id) as 'totals2' FROM nonconformance WHERE department_id = '1') FROM nonconformance"
Hi All, This is reletaed to SQL Server 2005. I have a backup file that does not have any .bak extension and I am trying to restore it against a already existing DB. Thats the first time I am dealing with a backup that does not have a .bak extension and I dont know how to restore it.
The .bak backups are easy to restore and I restore it in SQL 2005 managment studio with the following steps; a) I right clicking on the existing database (where I want it to be restored) and b) then click Tasks , c) click Restore, and d) click Database, and e) then in the restore database window click 'From device', f) then click '...' to browse and g) click add to browse and add the backup file to be restored.
I am doing the above steps for the non .bak extension backup file but I am unable tio add the file?
In SQL 2005 managment studio how can I restore a backup (that doesn't have .bak extension) against a exsisting database?
Can someone tell me why this thing in the end return Null?
declare @uz_id uniqueidentifier set @uz_id=null set @uz_id= case @Uz_ID when null then '00000000-0000-0000-0000-000000000000' else @Uz_ID end select @uz_id
...it should return '00000000-0000-0000-0000-000000000000' in my opintion
P.S. When I say return i mean the value that is shown after 'select @uz_id' is executed:)
This is an insert statement i'm trying to run. I want it to only insert this recird if the corresponding EMPLOY_REF exists in the EMPLOYEE table. Heres my statement:
INSERT INTO SALHISTY(EMPLOY_REF, SALARY, SAL_REASON, SAL_DATE) VALUES ('8971','175000.0000','ANNRV','2007-04-01 00:00:00.000') WHERE '8971' IN (SELECT EMPLOY_REF FROM EMPLOYEE)
This is the error message i'm getting.
Server: Msg 156, Level 15, State 1, Line 3 Incorrect syntax near the keyword 'WHERE'.
from ( select count(*) as Patients, [pct of res] as pct from testing where [18 week wait] <= 18 group by [pct of res] ) as a right outer join (select distinct[pct of res] from testing) as c on a.pct=c.[pct of res]and a.pct <> 'null' --is not null
(select count(*) as Patients, [pct of res] as pct from testing where [18 week wait] >18 group by [pct of res] ) as a left outer join as b on c.[pct of res]=b.pct
I have created a report which works great when the users run from IE6, but when anyone runs report from IE7, the report displays ok, but the document appears to build but displays absolutely nothing.
Has anyone seen this problem with IE7 using Reporting Services 2000?
actuallu the earlier obviously worked but now i am fetching values from 2 colums and in collection we can pass 2 strings i did that.but then how to increment the collection c.will just post the code . query fetching 2 records can add only 1 NameValueCollection c = new NameValueCollection(); cmd2.CommandText="select Pname ,HoursWorked from TimeSheet1 ts , ProjResource pr,ProjectDetails pd where ts.rid = pr.rid and ts.pcode=pr.pcode and pd.Pcode = ts.Pcode and pr.Rid = '" + Ridtxt.Text + " '"; cmd2 .Connection = con1; con1.Open(); SqlDataReader dr = cmd2.ExecuteReader();
while (dr.Read()) { c.Add(dr["pname"].ToString(), dr["hoursworked"].ToString()); }
as earliar supose c# 12 asp 11 only c# getting added even though loop is while dr.read() { } actually how to increment key as in c both strings are occupied
hi evryone I have a question! in my ASP.NET page I use a SqlDataAdapter object for working on my database first I declare it as a global vaiable(SqlDataAdapter objDataAdapter;) then I construct it in my Page_Load procedure like this (objDataAdapter=new SqlDataAdapter(strSql,objConnention)) then when I want to use it in my other procedures an error tells me that your object does not exist for solving this error I should construct my objDataAdapter in evry procedure using it. but I think such variables should not be erased from Heap automatically(with Garbage Collection) because it has a reference to Stack. I mean the global variable... any opinion ? Thanks
I'm having trouble obtaining errors raised in a stored procedure via the ADO Errors collection after the second FETCH NEXT statement from within that stored procedure.
Consider the following table created in a SQL Server database:
This is a very simple table with one column, and three rows containing the values 1, 2 and 3.
Consider this stored procedure: CREATE PROCEDURE TestStoredProc as BEGIN set rowcount 0 Set NoCount ON
declare @TestInt int declare @ErrMsg char(7) declare TestCursor cursor forward_only for select * from TestTable
open TestCursor Fetch next from TestCursor into @TestInt
While @@fetch_status<>-1 Begin select @ErrMsg = 'Error ' + convert(char, @testint) raiserror(@ErrMsg, 16, 1) raiserror(@ErrMsg, 16, 1) Fetch next from TestCursor into @TestInt end
Close TestCursor DeAllocate TestCursor return END
This stored procedure simply defines a cursor on all rows in TestTable. For each row fetched from the cursor, the error message 'Error n' is raised twice, where n is the integer that had just been fetched from the cursor.
Finally, consider this VB code using ADO to execute the above stored procedure. After the stored procedure is executed, the code loops through the errors collection, and creates a message box for each error in the collection:
Private Sub Form_Load() Dim cn As Connection Dim cm As Command Dim oErr As Error
If I have N different xml document formats and I want to store those xml data files as typed xml in one table (one column), can I do it using xml schema collection (by adding schema file to schema collection for each document type and assigning xml schema collection to this column)?
Is this possible using xml schema collection? Or did I miss something about xml schema collection usage scenario?
I need to feed head office sql server with the data from regional servers. Servers are spread through all continents Data input done locally on Head office server as well and plus need to ship data from other servers. So clarify this - Head office server is not standby one. Mirroring is out of the picture, I think.. Initially, I thought ship a log every 15 min and restore on Head office server but is this going to create an issue for the local data processing?
Precedence Constraint Editor Values: Expression Operation: Expression and Constraint Value: Failure Expression: @GotRecs == 1 Radio button: Logical AND. All contraints must evaluate to True
Stored Procedure has an IF (that contains a SELECT) statement that checks for records if no records are returned processing stops. I SET the parameter after the BEGIN that follows the IF statement.
The step that contains the above code is step #3. I placed the constraint between step #3 and step #4 (Data Flow task) just Exports to a Flat File.
When I clicked the TEST button in the Precedence Constraint Editor I got the following msg: Error at Constraint 3: The variable €śGotRecs€? was not found in the variables collection. The variable might not exist in the correct scope.
I have to create a CLR Proc for Reporting Services report that will use SharePoint (MOSS 2007) assemblies, so my datasource won't be a database, but the SharePoint object model that returns a collection.
How can I return these data (it's not necessary to be a collection exactly) without having to create a temp table just to return the SqlDataReader?
Thanks.
And sorry for my previous message, I just forgot that I was posting a message at the Global MSDN forums.
I have the following in my commandtext but it doesnt seem to replace the LanguageColumnName variable: Dim cmd As New SqlCommand("SELECT '+@LanguageColumnName+' FROM tblSports a INNER JOIN tblUsersAndSports b ON a.SportID=b.SportID " & _ "WHERE b.UserCode=@UserCode", MyConnection) cmd.Parameters.Add(New SqlParameter("@UserCode", UserCode)) cmd.Parameters.Add(New SqlParameter("@LanguageColumnName", LanguageColumnName))I have tried '+@LanguageColumnName+' and also just @LanguageColumnName but this variable isnt replaced for some reason.The value of LanguageColumnName is "de"...the funny thing is that when I just type my command like the following it DOES work..:SELECT de FROM tblSports a INNER JOIN tblUsersAndSports b ON a.SportID=b.SportID " & _ "WHERE b.UserCode=@UserCodeWhat am I doing wrong?
Hello, Im having a problem with this query....SELECT a.ref, COUNT(b.entrypage) AS counter FROM SiteCore.dbo.Campaigns AS a LEFT OUTER JOIN webStats AS b ON b.entrypage LIKE '%?ref=partners%' GROUP BY a.ref But i want it to look more like this, so it pulls the approprite rows its selfSELECT a.ref, COUNT(b.entrypage) AS counter FROM SiteCore.dbo.Campaigns AS a LEFT OUTER JOIN webStats AS b ON b.entrypage LIKE '%?ref=' + a.ref + '%' GROUP BY a.ref The first one return the correct count where as the latter doesnt retuen anything, could any one shed any light as to what the problem could be? Thanks Bart
I am trying to select records based upon last name WHERE (Last_Name BETWEEN 'A%' AND 'C%') When I run this I get only last names starting with A and B--no C. ?!? This is confusing to me....I ran it with lastname >= 'A%' and lastname <='C%'and it returned only names starting with B. Why does SQL ignore the "=" I hope this isnt obvious :/
hi guys i keep getting this error when trying to start the sql server agent service.
"The SQLSERVERAGENT service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service".
the SQL server service starts fine and i tryied starting the agent with the same user but it fails still.