USE Statement In SQL 6.5 Sp5a
Jan 13, 2000
I've got a script that runs regularly to monitor log space usage on a SQL 6.5 sp5a server. Where the log space usage is greater than 75% it then dumps the log. However the Enterprise Manager screen still shows usage as being above 75%. I'm aware that I need to run dbcc checktable(syslogs) to have EM reflect the change, and my question is:
Within my sql script how do I switch context to the database where I need to run the dbcc checktable(syslogs) command?
View 4 Replies
ADVERTISEMENT
Apr 11, 2000
Got the following message while trying to apply sp5a:
"Setup initialization could not be successfully completed.
ISQL.EXE could not be executed. Please check the relevant .OUT file."
And yes, i did check the readme file, but found no problem in the PATH variable.
(unless I'm looking at it wrong!)
Please help!
View 2 Replies
View Related
Feb 9, 1999
I am trying to apply SQL Server Service Pack 5a to my original SQL
Server 6.5 but an error keeps coming up "Setup initialization could not
be successfully executed. ISQL,EXE could not be executed.Pls check
relevant .out file".
The last line of the relevant .out file produced by this error is:
You cannot run SELECT INTO this database. The DBO would have to run
sp_dboption to enable this option.
Msg 208, Level 16, State 1, Server REYWINNT, Procedure sp_helpsort, Line
295
I would appreciate any help to solve my problem
Thanks a lot
Rey Caunca
View 2 Replies
View Related
Mar 10, 1999
I have a third party app that has been 'certified' by the vendor on SQL 6.5 SP5. We are aware of the dump database issues when using SP5 and Enterprise Manager. We would like to use SP5a to get around those issues.
Is anyone aware of any other 'bugs' or problems that have come about in SP5a....
Thanks tons!
Dean
View 1 Replies
View Related
Jun 28, 1999
Is there a proper order to installing SQL SP5a. Should you reinstall NT SP4 after you install
the SQL SP5a?
View 1 Replies
View Related
Sep 10, 1999
I currently have SP5 in a folder on the server desktop. MSSQL Server is installed on drive E:
Running setup, it finds SQL Server and shuts it down. It then returns errors about not being able to find files, though the files are actually there.
I appologize for the brain-cramps, as I know this has been discussed before, but I need HELP ASAP.
Thanks
Steve Jimmo
View 1 Replies
View Related
Jun 17, 1999
I run replication among several SQL 6.5 Servers with SP3. Recently,
I've applied SP5a to publisher/distributor. After that, some publications
continued to replicate normally, but two of them started to act strangely -
the distribution tasks end succesfully, but it seems that no transactions
were marked for replication.
After investigating a bit, I've found that the data that continued to
replicate normally is modified by stored procedures, while problematic
tables are updated directly. Then I've tried to run isql/w updates against
problematic tables - all the changes were succesfully applied to the
subscribers. The other difference between problematic and non-problematic
tables is their size - problematic tables are much bigger and more
frequently updated.
All the subscribers are still SQL 6.5 Servers with SP3. One of them
is also a publisher that uses SP5a-upgraded SQL Server as remote
distributor. Its publications replicate OK.
I'd appreciate any explanation of the above.
Thanks
Maja
View 2 Replies
View Related
Feb 22, 1999
I've installed SQL Server Service pack 5a on our test lab Database and have come up with problems with my protocol. Everything works fine IF I set the Net Library to Named pipes. But before the service patch, I was running Multi-Protocol WITH TCP/IP (much faster). How can I make SQL use Multi?
Using Named pipes screws up my replication. Any suggestions???
Thanks,
Andrew
P.S. I also have SP4 on WindowsNT.
View 2 Replies
View Related
Feb 3, 2000
HELP!!!!!!!!!!!!!!!!!!
I loaded SQL SP5a last night on my SQL Server and now none of my users can connect and run their applications.
I removed the virtual server and loaded the sp without any problems (so it seemed). "sa" works fine.
I am getting login failed errors:
Sql State 28000 and Sql Server 4002
Any thougts, ideas, curses would be GREATLY APPRECIATED!!!!!!!!!!!!
View 2 Replies
View Related
Dec 24, 1999
Hi:
I installed SQL sp5a on most SQL servers with no error. However, one server, a special application failed after upgrading to sp5a.
Is there a way to uninstall sp5a and back to sp3 without re-install entire SQL 6.5 on this particular machine?
thanks in advance
david
View 1 Replies
View Related
Jul 28, 1999
While installing the service pack 5a, I had the following error
"setup could not be successfully completed,
ISQL.EXE could not be executed. Please check the relevant *.Out file.
Now I am unable to start up my SQL service. When I try to start it , I get the following message:
Error : 1105, Severity: 17, State: 2
Can't allocate space for object 'Syslogs' in database 'master' because the 'logsegment' segment is full. If you ran out of space in Syslogs, dump the transaction log. Otherwise, use ALTER DATABASE or sp_extendsegment to increase the size of the segment.
Apparently 4 mb of free space in my master database was not enough for the service pack. I can't extend the size of my Master database because I can't get the SQL service to start.
Any suggestions?
LH
View 1 Replies
View Related
Jul 19, 2000
I am having problems with stack dumps (as many as 12 a day) at a production site running NT 4.0 SP4 with Sql Server 6.5 SP5A. I've tried running every diagnostic utility on the server but it shows no problems. Before I open a ticket with Microsoft on the stack dumps, I'd like to upgrade the server to NT Service Pack 6A. My question is, do I need to re-install SqlServer SP5A? Will the NT Service Pack 6A invalidate SQL SP5A?
TIA,
Mike
View 2 Replies
View Related
Dec 28, 1999
Hi all,
I recently upgraded to SQL 6.5- sp5a. I run DBCC TEXTALL as part of my nightly maintenance. Our db is about 3 GB and is heavy on text
fields. Since the upgrade, DBCC TEXTALL hangs up the server until I reboot it. The last message in the error log is "Warning:
out of RA slots... comfigure more RA slots." (or something like that). This never happened before.
BOL says don't monkey with the RA slots per thread, so
I've been adjusting the number of RA worker threads. I raise it, bounce SQL SERVER, and try to run the DBCC TEXTALL again.
Same results. Eventually I got up to 10 RA worker threads, at which point I got an "IO buf_wait" error, which also hung up the server.
I've read that increasing RA worker threads will eventually run you out of buffer space, and it looks like that's what happened.
I'm beginning to think that the problem isn't really with isn't really with the number of RA worker threads I have configured,
but rather with something that sp5a changed. Or maybe DBCC TEXTALL is running into some sort of corruption it can't handle...
Or something...
So, I'm reading up on the relationship between buffer cache, RA, etc., but
the sad fact is that information on that low down level is hard to find, and I don't understand most of it anyway.
Any suggestions, reading recommendations, comments, or jeers would be highly appreciated.
View 1 Replies
View Related
Dec 16, 1999
we have a client that just upgraded to sp5a and are encountering problems...one stored procedure seems to routinely become corrupted, and does not complete correctly. however, it does not error out, and the only way to tell that it did not complete successfully it to query the data.
the only solution that i have found to this problem is to recreate the procedure. i have tried using sp_recompile to force a recompile at next runtime, and the problem still occurs. i have tried recreating the calling procedure, and recreating procedures it calls, but neither fix the problem.
after recreating the procedure, it continues to run fine for anywhere from 1 hour to 8 hours, and then starts to fail again.
microsoft so far has not been able to give us help in diagnosing this, and i am coming up with nothing in my own investigations.
has anyone seen a problem like this in sp5a?
also, it is occurring on 5 similar dbs that are on the same server...
thanks
carl
View 2 Replies
View Related
Sep 3, 1999
When running Enterprise Manager from my desktop pc to try and expand a database device I am unable to do so. The size shown is negative, and the max size is the same, with the 'Change Now' box greyed out.
When I log on directly onto the server I can easily expand the db device. There is lots of free space on the server.
Our set up is quite small with four NT workstations and two NT servers with SQL Server 6.5 on them. All these six machines are in the same workgroup. The workstations are on a separate floor to the servers, which are in the computer room. I have a feeling this is a networking issue. Can anyone suggest why this is happening?
View 3 Replies
View Related
Aug 10, 1999
Hi,
Has anyone encountered this?
After applying SP 5a I found out that my SQL strings with sums and groups produced double rows. I found out that grouping one column (type CHAR(6)) produced two distinct rows of the equal values.
All the values in that column have 4 characters, but it seemed like some distinct values were grouped by the whole field length i.e 6 characters. I haven't seen earlier that those blanks after field value change the grouping results.
When I transferred the table and data to old SQL Server without any SPs, query showed distinct values correctly.
The sort order and other settings are the same. Can anyone tell where to look for help?
TIA, Al
View 1 Replies
View Related
Aug 4, 1999
Hi
I've recently upgraded 4 sql servers to sp5a and have just found that BCP fails on all of them with a DR Watson error. I did reinstall the Nt sp after installing sql server sp5a.
Can anyone help ?
Thanks
View 2 Replies
View Related
Mar 26, 1999
Has anyone gotten clustering to work via the Cluster Wizard in SP5a?
I've got two ProLiant 5500's with the Compaq Clustering S/100 option. I've done a fresh install of NT Enterprise 4.0 SP3, then installed clustering with the Compaq S/100 drivers... everything fails over nicely, can make shares off the virtual server, etc. I then install SQL Server 6.5 EE, then apply SP5a -- so far, so good.
Now I try to run the clustering wizard. The wiz prompts me for my SA password. I enter it, and it gives me a message box that it can't start or log onto the database... but when I look in the event log it appears to have logged on successfully with a Non-trusted connection.
Thanks for the help...
View 1 Replies
View Related
Dec 14, 1999
Hello,
Just in case anybody has had this problem after applying service pack 5a.
a stored procedure that sets serial numbers on records on a temporary table is skipping every other record.
I ran the code manually on isql and could not replicate the error, however when re-compiled on stored procedure it fails misserably.
when is Microsoft going to release a service pack that actually works?
Did you know that Executive does not recognize 2000 as a leap year?
If anybody has any suggestions on this problem, besides the obvious (using a real table) please write back
thanks.
David E. Pierri
Pseudo data-admin
ACNY
View 1 Replies
View Related
Aug 29, 2006
I am currently having this problem with gridview and detailview. When I drag either onto the page and set my select statement to pick from one table and then update that data through the gridview (lets say), the update works perfectly. My problem is that the table I am pulling data from is mainly foreign keys. So in order to hide the number values of the foreign keys, I select the string value columns from the tables that contain the primary keys. I then use INNER JOIN in my SELECT so that I only get the data that pertains to the user I am looking to list and edit. I run the "test query" and everything I need shows up as I want it. I then go back to the gridview and change the fields which are foreign keys to templates. When I edit the templates I bind the field that contains the string value of the given foreign key to the template. This works great, because now the user will see string representation instead of the ID numbers that coinside with the string value. So I run my webpage and everything show up as I want it to, all the data is correct and I get no errors. I then click edit (as I have checked the "enable editing" box) and the gridview changes to edit mode. I make my changes and then select "update." When the page refreshes, and the gridview returns, the data is not updated and the original data is shown. I am sorry for so much typing, but I want to be as clear as possible with what I am doing. The only thing I can see being the issue is that when I setup my SELECT and FROM to contain fields from multiple tables, the UPDATE then does not work. When I remove all of my JOIN's and go back to foreign keys and one table the update works again. Below is what I have for my SQL statements:------------------------------------------------------------------------------------------------------------------------------------- SELECT:SELECT People.FirstName, People.LastName, People.FullName, People.PropertyID, People.InviteTypeID, People.RSVP, People.Wheelchair, Property.[House/Day Hab], InviteType.InviteTypeName FROM (InviteType INNER JOIN (Property INNER JOIN People ON Property.PropertyID = People.PropertyID) ON InviteType.InviteTypeID = People.InviteTypeID) WHERE (People.PersonID = ?)UPDATE:UPDATE [People] SET [FirstName] = ?, [LastName] = ?, [FullName] = ?, [PropertyID] = ?, [InviteTypeID] = ?, [RSVP] = ?, [Wheelchair] = ? WHERE [PersonID] = ? ---------------------------------------------------------------------------------------------------------------------------------------The only fields I want to update are in [People]. My WHERE is based on a control that I use to select a person from a drop down list. If I run the test query for the update while setting up my data source the query will update the record in the database. It is when I try to make the update from the gridview that the data is not changed. If anything is not clear please let me know and I will clarify as much as I can. This is my first project using ASP and working with databases so I am completely learning as I go. I took some database courses in college but I have never interacted with them with a web based front end. Any help will be greatly appreciated.Thank you in advance for any time, help, and/or advice you can give.Brian
View 5 Replies
View Related
Jan 9, 2015
Ok I have a query "SELECT ColumnNames FROM tbl1" let's say the values returned are "age,sex,race".
Now I want to be able to create an "update" statement like "UPATE tbl2 SET Col2 = age + sex + race" dynamically and execute this UPDATE statement. So, if the next select statement returns "age, sex, race, gender" then the script should create "UPDATE tbl2 SET Col2 = age + sex + race + gender" and execute it.
View 4 Replies
View Related
Jul 20, 2005
hiI need to write a stored procedure that takes input parameters,andaccording to these parameters the retrieved fields in a selectstatement are chosen.what i need to know is how to make the fields of the select statementconditional,taking in consideration that it is more than one fieldaddedfor exampleSQLStmt="select"if param1 thenSQLStmt=SQLStmt+ field1end ifif param2 thenSQLStmt=SQLStmt+ field2end if
View 2 Replies
View Related
Oct 29, 2007
Hi guys,
I have the query below (running okay):
Code Block
SELECT DISTINCT Field01 AS 'Field01', Field02 AS 'Field02'
FROM myTables
WHERE Conditions are true
ORDER BY Field01
The results are just as I need:
Field01 Field02
------------- ----------------------
192473 8461760
192474 22810
Because other reasons. I need to modify that query to:
Code Block
SELECT DISTINCT Field01 AS 'Field01', Field02 AS 'Field02'
INTO AuxiliaryTable
FROM myTables
WHERE Conditions are true
ORDER BY Field01
SELECT DISTINCT [Field02] FROM AuxTable
The the results are:
Field02
----------------------
22810
8461760
And what I need is (without showing any other field):
Field02
----------------------
8461760
22810
Is there any good suggestion?
Thanks in advance for any help,
Aldo.
View 3 Replies
View Related
Nov 5, 2015
I've have a need with SQL Server 2005 (so I've no MERGE statement), I have to merge 2 tables, the target table has 10 fields, the first 4 are the clustered index and primary key, the source table has the same fields and index.Since I can't use the MERGE statement (I'm in SQL 2005) I have to make a double step operation, and INSERT and an UPDATE, I can't figure how to design the WHERE condition for the insert statement.
View 2 Replies
View Related
Aug 13, 2014
i was tasked to created an UPDATE statement for 6 tables , i would like to update 4 columns within the 6 tables , they all contains the same column names. the table gets its information from the source table, however the data that is transferd to the 6 tables are sometimes incorrect , i need to write a UPDATE statement that will automatically correct the data. the Update statement should also contact a where clause
the columns are [No] , [Salesperson Code], [Country Code] and [Country Name]
i was thinking of doing
Update [tablename]
SET [No] =
CASE
WHEN [No] ='AF01' THEN 'Country Code' = 'ZA7' AND 'Country Name' = 'South Africa'
ELSE 'Null'
END
What is the best way to script this
View 1 Replies
View Related
Jul 4, 2006
Hello friends,
I want to use select statement in a CASE inside procedure.
can I do it? of yes then how can i do it ?
following part of the procedure clears my requirement.
SELECT E.EmployeeID,
CASE E.EmployeeType
WHEN 1 THEN
select * from Tbl1
WHEN 2 THEN
select * from Tbl2
WHEN 3 THEN
select * from Tbl3
END
FROM EMPLOYEE E
can any one help me in this?
please give me a sample query.
Thanks and Regards,
Kiran Suthar
View 7 Replies
View Related
May 5, 2015
I am attempting to run update statements within a SELECT CASE statement.
Select case x.field
WHEN 'XXX' THEN
UPDATE TABLE1
SET TABLE1.FIELD2 = 1
ELSE
UPDATE TABLE2
SET TABLE2.FIELD1 = 2
END
FROM OuterTable x
I get incorrect syntax near the keyword 'update'.
View 7 Replies
View Related
Feb 4, 2006
I am using ASP.NET 2.0, and am attempting to write some code to connect to the database and query a data table. The compiler is not recognizing my SqlConnection statement. It does recognize other commands. And just to make sure, I created other sql objects such as ObjectDataSource and SqlDataSource. The compiler does not find a problem with that code.
Basically the compiler is telling me that I am missing a "using" directive. The compiler is wrong though, because I am including the statement "usingSystemData" Can someone please take a look at my code below and to see if you notice what the problem might be? Note that I numbered the lines of code below. Note that I also tried putting lines 3 trhough 6 before line 2(The page directive) but that did not fix the problem The compiler still gives me the same compiler message.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request.Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?)Source Error:
Line 21: SqlConnection sqlConn = new SqlConnection("server=localhost;uid=sa;pwd=password;database=master;");
1 <asp:sqldatasource runat="server"></asp:sqldatasource>
2 <%@ Page Language="C#"%>
3 using System;
4 using System.Data;
5 using System.Collections;
6 using System.Data.SqlClient;
7
8 <script runat=server>
9
10 protected void Page_Load(object o, EventArgs e)
11 {
12 ObjectDataSource dsa; // This works no problems from the compiler here
13 SqlDataSource ds; // This works no problems from the compiler
14
15 if (IsPostBack)
16 {
17 if (AuthenticateUser(txtUsername.Text,txtPassword.Text))
18 {
19 instructions.Text = "Congratulations, your authenticated!";
20 instructions.ForeColor = System.Drawing.Color.Red;
21 SqlConnection sqlConn = new SqlConnection("server=localhost;uid=sa;pwd=password;database=master;");
22 String sqlStmt = "Select UserName from LogIn where UserName='" + txtUsername.Text + "' and password='" + sHashedPassword + "'";
23 }
24 else
25 {
26 instructions.Text = "Please try again!";
27 instructions.ForeColor = System.Drawing.Color.Red;
28 }
29 }
30
31 }
32
33 bool AuthenticateUser(string username, string password)
34 {
35 // Authentication code goes here
36
37 }
View 1 Replies
View Related
May 26, 2006
Hi All,
I've looked through the forum hoping I'm not the only one with this issue but alas, I have found nothing so I'm hoping someone out there will give me some assistance.
My problem is the case statement in my Insert Statement. My overall goal is to insert records from one table to another. But I need to be able to assign a specific value to the incoming data and thought the case statement would be the best way of doing it. I must be doing something wrong but I can't seem to see it.
Here is my code:
Insert into myTblA
(TblA_ID,
mycasefield =
case
when mycasefield = 1 then 99861
when mycasefield = 2 then 99862
when mycasefield = 3 then 99863
when mycasefield = 4 then 99864
when mycasefield = 5 then 99865
when mycasefield = 6 then 99866
when mycasefield = 7 then 99867
when mycasefield = 8 then 99868
when mycasefield = 9 then 99855
when mycasefield = 10 then 99839
end,
alt_min,
alt_max,
longitude,
latitude
(
Select MTB.LocationID
MTB.model_ID
MTB.elevation, --alt min
null, --alt max
MTB.longitude, --longitude
MTB.latitude --latitude
from MyTblB MTB
);
The error I'm getting is:
Incorrect syntax near '='.
I have tried various versions of the case statement based on examples I have found but nothing works.
I would greatly appreciate any assistance with this one. I've been smacking my head against the wall for awhile trying to find a solution.
View 10 Replies
View Related
Oct 20, 2014
In the below code i want to use select statement for getting customer
address1,customeraddress2,customerphone,customercity,customerstate,customercountry,customerfirstname,customerlastname
from customer table.Rest of the things will be as it is in the following code.How do i do this?
INSERT INTO EMImportListing ("
sql += " CustId,Title,Description,JobCity,JobState,JobPostalCode,JobCountry,URL,Requirements, "
sql += " IsDraft,IsFeatured,IsApproved,"
sql += " Email,OrgName,customerAddress1,customerAddress2,customerCity,customerState,customerPostalCode,
[code]....
View 1 Replies
View Related
Feb 20, 2008
i want to display records as per if else condition in ms sql query,for this i have used tables ,queries as follows
as per data in MS Sql
my tables are as follows
1)material
fields are -- material_id,project_type,project_id,qty, --
2)AB_Corporate_project
fields are-- ab_crp_id,custname,contract_no,field_no
3)Other_project
fields are -- other_proj_id,other_custname,po
for ex :
vales in table's are
AB_Corporate_project
=====================
ab_crp_id custname contract_no field_no
1 abc 234 66
2 xyz 33 20
Other_project
============
other_proj_id other_custname po
1 xxcx 111
2 dsd 222
material
=========
material_id project_type project_id qty
1 AB Corporate 1 3
2 Other Project 2 7
i have taken AB Corporate for AB_Corporate_project ,Other Project for Other_project
sample query i write :--
select m.material_id ,m.project_type,m.project_id,m.qty,ab.ab_crp_id,
ab.custname ,op.other_proj_id,op.other_custname,op. po
case if m.project_type = 'AB Corporate' then
select * from AB_Corporate_project where ab.ab_crp_id = m.project_id
else if m.project_type = 'Other Project' then
select * from Other_project where op.other_proj_id=m.project_id
end
from material m,AB_Corporate_project ab,Other_project op
but this query not work,also it gives errors
i want sql query to show data as follows
material_id project_type project_id custname other_custname qty
1 AB Corporate 1 abc -- 3
2 Other Project 2 -- dsd 7
so plz help me how can i write sql query for to show the output
plz send a sql query
View 8 Replies
View Related
Aug 10, 2006
I have 3 tables, with this relation:
tblChats.WebsiteID = tblWebsite.ID
tblWebsite.AccountID = tblAccount.ID
I need to delete rows within tblChats where tblChats.StartTime - GETDATE() < 180 and where they are apart of @AccountID. I have this select statement that works fine, but I am having trouble converting it to a delete statement:
SELECT * FROM tblChats c
LEFT JOIN tblWebsites sites ON sites.ID = c.WebsiteID
LEFT JOIN tblAccounts accounts on accounts.ID = sites.AccountID
WHERE accounts.ID = 16 AND GETDATE() - c.StartTime > 180
View 1 Replies
View Related
Jul 11, 2007
Hello
How can i say this I would like my if statement to say: if what the client types in Form1.Cust is = to the Select Statement which should be running off form1.Cust then show the Cust otherwise INVALID CUSTOMER NUMBER .here is my if statement.
<% If Request.Form("Form1.Cust") = Request.QueryString("RsCustNo") Then%> <%=Request.Params("Cust") %> <% Else %> <p>INVALID CUSTOMER NUMBER</p> <% End If%>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RsCustNo %>"
ProviderName="<%$ ConnectionStrings:RsCustNo.ProviderName %>" SelectCommand="SELECT [CU_CUST_NUM] FROM [CUSTOMER] WHERE ([CU_CUST_NUM] = ?)">
<SelectParameters>
<asp:FormParameter FormField="Cust" Name="CU_CUST_NUM" Type="String" />
</SelectParameters>
</asp:SqlDataSource>any help would be appreciated
View 2 Replies
View Related