Hi all, I am brandnew with SQL2000, so sorry in advance for
stupidities....
SQL2000, SP3, running on a SBS2003-server with WindowsSharePoint
Services.
I want to make a dataconnection (from within the LAN with InfoPath) from
a client to this server. I got the error that whether the server doesnot
exists (it does) or no permission. Where can I find (in SQL2000) which
users have access to the databases ???
Help is appreciated, Ger.
*** Sent via Developersdex http://www.developersdex.com ***
We have DTS package automatically pouring data into the publishing database(source tables). During this process, we want to temporary disable certain triggers. However, the command
Alter table 'tbl' disable trigger 'abc' errored out. The error message said:
''Cannot alter the table 'tbl' because it is being published for replication."
I've digged more into this and found although it's not allowed to disable a triggers,
the SQLServer do allow delete the trigger and recreate them.
Is there any way to disable the trigger directly?
Thanks in advance,
Don
BTW:
I've used the following sql directly, however the trigger still fires.
UPDATE sysobjects SET status = status|2048 WHERE type = 'TR' AND parent_obj = OBJECT_ID (@table_name)
The only other way around now is to create stored procedures that dynamically create the trigger. Because our trigger is normmally larger than 8000 bytes. We have to create one stored procedure per trigger. This option is not acceptable because not only it takes quite a time, but also a maintainance nightmare.
Hi, I was trying to run an insert statement which has subquery, But it is returning the error like this.. Subqueries are not allowed in this context. Only scalar expressions are allowed. -------------- Is there a way to reparse the insert statement without have to assign the subquery to a temp value and insert it? thanks.. Here is my SQL.. insert into admincriteria values (nextID,(select id from nodetable where description like 'Example - Quality Analytics'),8071,2,'Failures by Customer',2,0,0)
Hi everyone , i am trying to find logins which has blank password in SQL2000 . i wrote cursor to find these logins. But i cannot catch the logins.Beacuse sp_password sistem procedure does not return @@ERROR.
I can easily do it with SQL2005 (BEGIN -TRY -CATCH).
How can i catch sp_password error in SQL Server 2000?? or are there any suggestions to find these logins. How can i find blank password logins in SQL2000???
We are evaluating users. We need to isolate certain users and certain groups. I can not figure out how to use a stored procedure or a script to filter a list of ALL users with the same 'Type'. Does this make sense? Any advice would be appreciated. I am on a deadline here and i could use any input u might offer. I can always TYPE them in using the EM - Security - Login, but I thought that there might be an easier way to do it. Thanks! Billy
Also , is it true that Grants to service accounts should go through roles as it is against audit & compliance standards? If yes, than how to find out the list of users who has direct grant to a service account ?
- Then how to revoke this grant from service account and than how to grant through the role ? - Is there a script that i can run and find the list of users in each SQL server instance ?
Hi, Imagine that I have a select something like this select * from T where T.Name Like '%Maria%' "Maria" would be what the user what to find. But for example in spanish we use í, ó, ú, ü... The same happens in french, german... The user want to find Maria and does not care if another user (or himself) has inserted the client as Maria, María, Marïa or whatever. Of course one solution is putting in the DB only the simple characters (a,e,i,o,u) and look for these, replacing the "strange" chars in the application to the "normal" ones. But if we want to be professionals we would need to insert in the DB the name in their original spelling (the image is the most important!) Any idea, help or reference? Thx in advance and happy new year. David
Hello,I have an ASP web app with an SQL back end. I am currently migrating to anew Windows 2003 Server machine and SQL Server 2005 Express. When I importthe old database, I'm trying to grant the IUSR_MachineName account access tothe database, but I can't seem to find that user account. I'm clicking newusers, and when I type this user in, SQL doesn't recognize it, and when Iclick "Browse" all I see is BUILTIN/Administrators, BUILTIN/Users NTAuthority/System SA (which is not in use) and a long name that includes alot of dollar signs, the machine name and SQL express in it (it's a bigcryptic looking thing). Any idea how I get this to work again?Thanks!
Hello there,I'm a new one to asp.net, so I need some help, and hope someone out there wanna take the time to help me, with my problem..I had set up a Custom "Membership", you know click on a file, and it create a database ASPNETDB...There I need to find 5 random users where they are e.g. females..Right now I can find 5 random users, but I dont know how to put in there Where statement, because I need to read something from thier profile?This is my code so far: SELECT TOP 5 [UserName] FROM [aspnet_Users] ORDER BY NEWID() Then I have to put in WHERE (profile.Gender = female)<--- But how do I do that?Hope you wanna, and can help me,Regards Jeppe RichardtPS,Im using the language vb.net
i have sql2000 & sql2005 on the same machine. I am unable to register my localhost in sql2000, get an access denied error. How can I make my localhost use sql2000 database?
We have an existing SSRS server, and have just created a new child domain. We'll be migrating users from the parent to the child, and want to add the users of that new domain with access to SSRS. In the parent domain they are able to access, but after migration with the child domain account, they cannot.
I have added the group CHILDDomain Users with a system user role on SSRS, and PARENTDomain Users was already there.
Is there any additional step I should/could take to get this active?
I have had this issue just pop up. I have local users who can connect fine, but my users that require connection by VPN cannot connect. I get the server not available or access denied error. I did confirm that the VPN'ers are connected to the network correctly and can see that their shares and mappings are correct. Any ideas? Thanking you all in advance!!
I am trying to revert back to Windows 7 after upgrading to Windows 10, however it will not let me and the following message occurs: "Remove new accounts.Before you can go back to a previous version of Windows, you'll need to remove any user accounts you added after the most recent upgrade. The accounts need to be completely removed, including their profiles.You created one account (NT SERVICEMSSQLSERVER) Go to Settings> Accounts> Other users to remove these accounts and then try again".However I did not create any new users and there are no other users listed in the Accounts section.
hi alli've got two tables called "webusers" (id, name, fk_country) and "countries" (id, name) at the meantime, i've a search-page where i can fill a form to search users. in the dropdown to select the country i included an option which is called "all countries". now the problem is: how can i make a stored procedure that makes a restriction to the fk_country depending on the submitted fk_country parameter?it should be something like SELECT * FROM webusers(if @fk_country > 0, which is the value for "all countries"){ WHERE fk_country = @fk_country} who has an idea how to solve this problem?
i am in the process of Migrating SQL 2000 to my new SQL2000 server i want to know the what would the best way for me to migrate one SQL server to another SQL server on the same network and rename the new server to the old server and bring it up for use in our ecommerce website.
I have a sql select statement, then I have a datareader and I'm trying to loop through that reader and insert a record into another table each time until there are no more records in the loop. I'm not sure how to do this though without using 2 datareaders. Please help. Thanks 1 ' Retrieve Data from database based on selections chosen in ListBox 2 Dim cmdCommittee As New SqlCommand("Select * from committees_tbl where committee_id in" & _ 3 "(" & strCommitteesRemoveLast & ") order by committee_name", conn_Insert) 4 5 ' setup a datareader 6 Dim drCommittee As SqlDataReader = cmdCommittee.ExecuteReader() 7 8 9 ' Loop through datareader and insert rows 10 ' into the xref_person_committees_tbl 11 While drCommittee.Read() 12 Dim strCommitteeName As String = drCommittee("committee_name") 'retrieve committee_name from datareader 13 14 ' Create a sql string 15 Dim strAddCommittee As String = String.Empty 16 strAddCommittee = "Insert into xref_person_committees_tbl (committee_name) values ('" & strCommitteeName & "')" 17 'Response.Write(strAddCommittee & "<br>") 18 19 ' Create a sql command to process the insert 20 Dim sqlAddCommittee As New SqlCommand(strAddCommittee, conn_Insert) 21 Dim drNewCommittee As SqlDataReader = sqlAddCommittee.ExecuteReader() 22 23 24 25 26 End While 27 ' ----------------------------------------------------------------------------------- 28 29 drCommittee.Close()
I want to pass the string "select @@servername" in the print statement, it throws error as:=
Msg 1046, Level 15, State 1, Line 3 Subqueries are not allowed in this context. Only scalar expressions are allowed. Msg 1046, Level 15, State 1, Line 28 Subqueries are not allowed in this context. Only scalar expressions are allowed.
declare @account_name nvarchar(400) = 'Mail Account'; IF exists (select * from msdb.dbo.sysmail_account where name = @account_name) PRint 'Database Mail Account ' + quotename (@account_name) + 'is already setup in the Server:= ' + (select @@servername);
I mean why such restriction? In such queries results will be only 1 so it does not violate the SET operation. correct??
I want to put some trace in the a UDF, so I put print in the function. IT gave error. Can anyone please explain why this happen. But this work with SPs.
Could someone please tell WHY it is not allowed to use the following construction in a stored procedure!?
AS IF @taxparent = 0 THEN SET @taxparent = NULL IF @museum = 0 THEN SET @museum = NULL IF @collection = 0 THEN SET @collection = NULL SELECT ID, SpecimenNr, ScientificName, Locality, Taxon FROM QueryView
I get the following error messsages:
Msg 156, Level 15, State 1, Procedure DynamicQuery, Line 9Incorrect syntax near the keyword 'THEN'.Msg 156, Level 15, State 1, Procedure DynamicQuery, Line 10Incorrect syntax near the keyword 'THEN'.Msg 156, Level 15, State 1, Procedure DynamicQuery, Line 11Incorrect syntax near the keyword 'THEN'
I am using the SQLEXPRESS database, and connect from to locations:
Windows Service ASP.NET web application.
whenever I start the windows service I get the error: Cannot open user default database. Login failed. so I am going to visual studio and close the connection. then I close the web browser, and the windows service succeed connect to database. but then, after windows service is connected, I open the web browser application and fails to login because the login system using the same database of windows service, and since the connection is being used by windows service, login is impossible.
Do you know how I can allow 2 connections at the same time for the same database? what are the risks to do that? and how do I handle this risks. thanks alot
Can anyone tell me what is the maximum number of rows that I can code in a T-SQL step if I want to include this in a job? I do not want to use stored procedure for certain task, so I want to put the same code in a T-SQL step. Thanks! Sheila.
Inserting info into a table, where one of the columns meets a certain criteria.
insert into employee (/*emp_id,*/ fname, lname, start_date, dept_id, title, assigned_branch_id) values (/*null,*/ 'Michael', 'Smith', '2001-06-22', (select dept_id from department where name = 'Administration'), 'President', (select branch_id from branch where name = 'Headquarters'));
But I'm getting this error:
Msg 1046, Level 15, State 1, Line 5 Subqueries are not allowed in this context. Only scalar expressions are allowed.
I am trying to make the following SQL statement, but there seems to a limiton how long a statement can be:INSERT INTO CUSTOMER (forename, surname, company_name, title, addressA,addressB, postal_number, city, country, home_phone, mobile_phone,work_phone, fax, email, sale_procentage, bank, account_number,creation_initials, creation_date, creation_reason) values ("test", "test","test", etc...);But I can only enter this much text:INSERT INTO CUSTOMER (forename, surname, company_name, title, addressA,addressB, postal_number, city, country, home_phone, mobile_phone,work_phone, fax, email, sale_procentage, bank, account_number,creation_initials, creation_date, creation_reason) vaIs there some upper limit? And how do I make a long SQL statement like this?JS
I have a simple table, for some reason, certain columns seem to acceptNulls even though they shouldn't, for example the I can set the 'Name'field to Null using my web application or directly in EnterpriseManager. field How do I prevent this? However the 'RecCreated' doessnot permit nulls.CREATE TABLE [dbo].[Group] ([GroupID] [int] IDENTITY (1000, 1) NOT NULL ,[Name] [nvarchar] (50) NOT NULL ,[Description] [nvarchar] (750) NULL ,[RecCreated] [datetime] NOT NULL ,[RecUpdated] [datetime] NOT NULL ,[RecCreatedBy] [int] NOT NULL ,[RecUpdatedBy] [int] NOT NULL ,[RecActive] [int] NOT NULL) ON [PRIMARY]GOthanks for any help you can give on this