In all OLTP environments, virtually all indexes will become fragmented over time. Nearly all UPDATE, INSERT or DELETE activity will cause your indexes to become less well organized than they were when they were first created. There will be more page splits, there will be a greater number of pages with less data on them, [...]
In SQL Server 2000, if you have a requirement to copy/transfer multiple DTS packages from one instance to the other, doing it manually becomes cumbersome. There are utilities in the market that do that for you but what if you have to make this import a part of your install? If you have such a [...]
Yes it should work. If I remember correctly, don’t close the cursor on result sets that you intend to return. Phil
You want a query like this then. <pre>SELECT Detail.ProjectDetail FROM Detail JOIN User on Detail.ProjectId = User.ProjectId AND User.UserId = TT15</pre> As I understood, Minuvinu needs a comma-separated list. Here the sketch of solution (MS SQL 2005): <pre>select userid, (select cast(projectid as varchar)+’, ‘ as ‘data()’ from [user] u1 where u1.userid=u2.userid for xml path(”)) list [...]
You could do it this way: <pre>INSERT INTO YourTable SELECT * FROM YourTable GO</pre>
Yes, you can. You should consider creating indexes on columns that are frequently used in the WHERE ( and ORDER BY, and GROUP BY ) clause of queries. Fields with low selectivity (such as gender) are not good candidates for indexing.
Hi, You can use CPYF with the record format field mapping options to do this :- CPYF FROMFILE(Yourlib/Oldfile) TOFILE(Yourlib/Newfile) MBROPT(*REPLACE) FMTOPT(*MAP *DROP) Regards, Martin Gilbert.
When buying SQL Server there are a couple of different Licensing modes that you have to link into. They are CPU based licensing and CAL (Client Access License) based licensing. With CPU based licensing you buy one license for each CPU in the SQL Server. For CAL based licensing you buy a server license and [...]
Here is a <a href=”http://www.sqlservercentral.com/articles/Administering/beginningsqlserverloginsandusers/1460/”>good article.</a>. You will have to register to read it, but registration is free. ——- Each login which is setup within the SQL Server has its own password. The login is what allows the user to see the databases. Logins are mapped to users within the database and rights within the [...]
Try this: <pre>select sysobjects.name from syscolumns left join sysobjects on sysobjects.id = syscolumns.id where syscolumns.name = ‘FieldName’ and sysobjects.type = ‘U’ order by 1</pre> Or this <pre>SELECT name FROM syscolumns WHERE name = ‘YourColumnName’ and id = object_id(‘YourTable’)</pre> A standard way: <pre>select table_name, column_name from information_schema.columns where column_name=’YourColumnName’</pre>
Here is a <a href=”http://www.sqlservercentral.com/articles/Administering/beginningsqlserverloginsandusers/1460/”>good article</a>. It requires you register to read it, but registration is free.
Upgrading from SQL 2000 to SQL 2005 in a clustered environment is very similar to going through the upgrade process in a non-clustered environment. After verifying that your code is ready for backup, stop your clients from connecting, and backup the database (or backup the last log). If the upgrade fails badly enough you’ll need [...]
If the database is attached to a SQL 2000 instance then the database has already been upgraded to SQL 2000. Setting the compatibility level from 65 to 80 simply changes the way some commands respond from the way they responded in SQL 6.5 to the way they respond in SQL 2000. For the most part [...]
The IDENT_CURRENT function will give you the most recently used identity. You can then use the IDENT_INCR to get the number by increment by (usually 1, but not always). Add them together and you’ll get the next value to be used. However it is better to insert the new record then get the value of [...]
Hi, Do you think you need many tables as many business categories exists ? No, you don’t. You need one table to save all 4816 business categories. If you need to save more or detailed information for each business category, then you can create another table with the resting data, and create a relation between [...]
To be able to help, I think we would need to know your table structures, and see what results are you getting and what results are you expecting with some example data. When joining tables, if you do not write the appropriate join conditions, you could be duplicating rows.
You may try using Exec SP_ExecuteSQL in SQL Server, or ADO.NET and the System.Data.SQLClient Namespace. – Parameters for Stored procedure @DataBase_Name nVarchar(20) – set variables in SQL Declare @sql_All nVarchar(1024), @sql_Select nVarchar(1024), @sql_From nVarchar(1024) /* @sql_Where nVarchar(1024), @sql_Order nVarchar(1024) */ set @sql_Select = ‘ Select field1, field2′ + CHAR(13) set @sql_From = ‘ From ‘ [...]
You can certainly run backups of the Primary node of the mirror and do them online just like a server that is not being mirrored. As far as the backups are concerned they do not care if you are mirroring. I would recommend backing your DBs up and do not rely on the mirror as [...]
<b>I believe the contest should be quantitative and measurable in regards to sales? For instance as an expert replies to a question, and it leads directly to a Solution – and preferrably a SALE. That will show real value, and results too!</b> Bob VL but how to measure it – objectively (not subjectively)? Jaideep Sales [...]
Typically you set up a maintenance plan in SQL to do a backup “dump” to disk then you tell the Veritas software to back up that backup folder on the SQL server. That way work is not interrupted while SQL does its backup and then when veritas backs up that folder. Here is <a href=”http://www.sql-server-performance.com/articles/dba/creating_backup_jobs_p1.aspx”>one [...]





