Placing Data And Log Files Seperately
Mar 4, 2004
Hi, Gurus, I am running SQL-Server 2000 on SCSIIs with Raid-5. Three disks. I see only one Logical Disk with 3 partitions. Since it's recommended to have Log files seperate to Data files physicially, currently both exist in the D-Drive. How can it be accomplished?
Another question for ur kind suggestion. I have a merge-repl setup. Publisher and distributor at the same machine. One subscriber over the internet. Replication works through VPN rather that FTP. Whenever i apply SNAPSHOT it takes more that 12 hrs to replicate the 2 GB DB. Although VPN is more secured but the tunneling makes the replication rather slow i guess. Will there be a major difference if i open the default port of ftp on the ISA and change the subscriber to get the SNAPSHOT as Anonymous Subsciption. I mean What's better, Security VS Performance. During the SNAPSHOT the Web-users running on the Subscriber wait for the latest data which is very much annoying.
Another question please, I wanna replace the current publisher-DB machine with a new Hardware-Machine. I don't wanna lose Replication and re-running the SNAPSHOT. Is it possible to retain the publication by restoring the Master, Publication and Distributor respectively on the new machine. The new machine will have the same Operating system name and configuration.
Regards!!
View 3 Replies
ADVERTISEMENT
Mar 5, 2005
Hi,
I know that SQL Server (MSDE), databases run much faster when the data and log files are on seperate physical devices. I can do this explictly when I write a CREATE DATABASE SQL script, but would like to change the MODEL database so that all new databases use the sperate data/log file assignments by default. I haven't found a way to alter the sysfiles table in model - I can read the data, but it balks at trying to update it. (recordset is not updateable, or adhoc querries not allowed against a system database).
I didn't see any options on the MSDE install that implements seperate data/log paths.
I don't have the SQL Server tools (like Enterprise Manager) available, but I do have VS.NET 03 (Standard). And Web Data Administrator.
Any suggestions? Thanks in advance.
View 5 Replies
View Related
Jan 27, 2004
I have a stored procedure that takes various parameters and performs simple selects using these. A quick summary of the db structure this is working on would be :
lookup_table1
table1_id
description
lookup_table2
table2_id
description
This stored procedure attempts to select the given description from the given table and return the id, if the id isnt present it then inserts the new value and returns the new id.
Now I have this working, ish, but the problem that I have is that in the case of a new insert the procedure returns two datasets, an empty one (as the initial select returned no results) and another with the id of the newly inserted value.
This procedure as it stands right now
CREATE PROCEDURE aida_lookup
@lookup_table varchar(255),
@lookup_id_name varchar(255),
@lookup_description_col varchar(255),
@lookup_value varchar(255)
AS
declare @sql nvarchar(2048)
--
-- Check if the given lookup value exists in the give table / column
--
set @sql ='SELECT ' + @lookup_id_name + ' FROM ' + @lookup_table + ' WHERE ' + @lookup_description_col + ' = ''' + @lookup_value + ''''
EXECUTE sp_executesql @sql
if (@@rowcount = 0) goto new_value
if (@@error <> 0) goto on_error
return(1)
--
-- Insert new lookup value into the given table / column
--
new_value:
-- NEED TO CLEAR PREVIOUS NULL SELECT
begin transaction
set @sql = 'INSERT INTO ' + @lookup_table + ' (' + @lookup_description_col + ') VALUES (''' + @lookup_value + '''); SELECT SCOPE_IDENTITY()'
execute sp_executesql @sql
if (@@error <> 0) goto on_error
commit transaction
return(1)
--
-- Error handler
--
on_error:
rollback transaction
return (0)
GO
The problem being is that if the value is inserted as a new value I need to remove the empty dataset so that regardless of how the procedure is run, it will always return the id at position row 0 column 0.
My attempted solution was to declare a @temp var and place the return value of sp_executesql into this, and if it wasnt null then return it, and if it was then proceed to insert, e.g.
declare @temp int
...
SET @temp = EXECUTE sp_executesql @SQL
if (@@temp = null) goto new_value
SELECT @temp
return(1)
Obviously this doesnt work, so I am open to suggestions. To be completly honest I have run out of hair to rip out and I am sure this can probably be done in a much more elegant fashion, so any help will be greatly appreciated
View 11 Replies
View Related
Jan 9, 2015
I proposed on a new server that we separate Data Files, Log Files, tempDB, Backups, etc. onto separate LUNS on a SAN with High Speed Solid State Drives.I was told that with the new technology with solid state SAN's that it would decrease performance and that it did not work the same way as it did when you had RAID 5's etc.I thought that if things were cared out correctly by a SAN Administrator they would know how to configure for optimal performance.
View 2 Replies
View Related
May 30, 2007
I have SQL 2005 Server and Visual Studio 2005 and I am working in vb. I want to create a database which has photographs.
View 3 Replies
View Related
May 19, 2008
Hi everyone, I have a small dilema here. I am running SSRS 2000, and I have a report that is grouped by Part Number. I have =Fields!Formula.Value < .1 so I can view only what is greater than .1 Well, my problem is that when I put it under the group Visibility properties, it does not pull all the data. and if i put it under detail Visibility. It does show me everything but any Part Number that is less than .1 shows just the part number but no detail. How can I make my report show all my data but without leaving data out????
Thanks ahead of time,
Abner
View 1 Replies
View Related
Mar 7, 2008
Do anyone know how I can automatically place a value eg. €œNOTHING€? in a database column when there is no or has a NULL value. Thanks.
View 2 Replies
View Related
May 29, 2007
hi all
i have a filed in my database with name address which contains addresses.
i want to split address in multiple line .
LIke
addressline1
addressline2
addressline3
i.e
Robart Peter
4th Banglow road
MC city
can any one help me.
View 4 Replies
View Related
Sep 17, 2004
Hi!
I'm using replication with two database on SQL 2000,when begin, the log files size is 50mb and the data files size is 150mb. But now the log files size is 2Gb and the data files size is 4Gb. I would like to decrease the log files and the data files ??? How do i do this???
(I using Truncate and shrink doesn't change )
Thanks!!!
View 2 Replies
View Related
Apr 17, 2008
Hi,
I am using Sql Server 2005.
I want to place a LOCK, insert something in the table then return back to the code (with the ID of the inserted item) and then call FUNCTION_A and then based on the outcome of the function I either want to
I want to keep the inserted item and release the lock or
I want to delete the inserted item and release the lock
Any suggestion is greatly appreciated.
Regards
naimulah
View 3 Replies
View Related
Jul 23, 1998
Our development server is limited on RAM and I have been asked to increase Tempdb. I made the decision to put it back on disk; something I have done dozens of times before. I have used the Enterprise Manager`s GUI interface and I have manually typed in the SQL using ISQL/w, both ways have resulted in the same error message.
Microsoft SQL-DMO
Error 5016: [SQL Server] Incorrect database name or device name(s).
I have dropped the old and created new database devices (with different names) and I still receive the error message. I have even tried rebooting with Tempdb back in RAM and on disk 1t 2MB (which works). And yes, I HAVE checked my typing.
I would GREATLY appreciate any ideas on what may be wrong. The system is 6.5 with SP4 on Win NT with SP3. I inherited the system, so I am not certain what the hisory is.
Thanks,
Mike Gaudet
Visages, Inc.
View 3 Replies
View Related
Nov 28, 2007
I'm generating emails using sp_send_dbmail. Everything works perfectly except for one thing. In the body of the email I need to show a link to a web page (eg http://myweb/login.aspx).
The problem is that the received email shows the "link" as plain text, ie it is not a clickable link. I've tried adding char(13) (and char(10) and both) after the link text but that doesn't help.
Is there a way to make the link text a real link when received by Outlook? (All recipients will be using Outlook if that helps).
Thanks,
John
View 6 Replies
View Related
Apr 3, 2007
I have created my packages and i want them to place them on the server.Do i need to place the entire project of dts packages on the server or is there any option to place executables...if so please explain....
And to run these packages on the server do i need to set them as new job at sql server agent or is there any other way i need to run on the server.
I want then to run whenever the text file gets updated is it possible to set anything for my packages to run as and when the text file gets updated..
Please help me with all my questions
Thanks in advance..
View 5 Replies
View Related
Jan 30, 2007
I have been requested to add the sum of an interger field to the table header. I have the sum in the footer (which is very easy to do), but I cannot get the sum to appear in the table header.
I then set-up the stored procedure to run the sum, and place it into a dummy field. I still cannot add this field to the table header. Instead of printing the data for the dummy field (the correct total), it instead prints the actual field name on the report.
Is there anyway to place a sum in a table header on a SQL Server Report?
Let me know.
Thank you,
T.J.
View 7 Replies
View Related
Jan 4, 2008
Hi,
After exporting the report the column headers in the rreport should not scroll, it has to fix with report headers. If i move the column headers to report header the columns are merging in excel, some columns are hiding.
For ex: I have 10 columns, it has to take from A to K but it is taking A to P. one column is occupying two columns. how to avoid this merging and how to place the column headers in the report header.
Thanks
Dinesh
View 4 Replies
View Related
Jan 29, 2008
I have a define formula that is SUM(Loan Loan Amount[2]) and this formula has a addition filter off of it.
The report is pulling off of calander months months so if in some of the fields it has a dollar amount but in others it is blank. Trying to write formula that if there is no amount then place zero otherwise put the $ amount.
thanks
View 1 Replies
View Related
Jan 9, 2008
Hi. I have an sql query that i use to insert articles to a sql databse table and for that i use addWithValue to select witch textboxes etc goes where in the database.
Now i need to retrive these values and place them back into some other textboxes (some of them multiline) ,and i wonder if there are any similar ways to retrive values like AddWithparameter so i can easily do textBox.text = //whatever goes here ?
View 4 Replies
View Related
Feb 29, 2008
I am working on a form that when text is entered, the action Page is to execute the following query:
SELECT PhList.Name AS Employee, PhList.Phone, Department.Name, PhList.JobTitle FROM PhList INNER JOIN Department ON PhList.Department = Department.ID WHERE (PhList.Name LIKE @Search) OR (PhList.Phone LIKE @Search) OR (Department.Name LIKE @Search)"
BUT... i am having trouble making my @Search Parameter = %value% (where only 'value' was typed into the original form)
Here is my SQLDataSourceCode...<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Intranet %>"
SelectCommand="SELECT PhList.Name AS Employee, PhList.Phone, Department.Name, PhList.JobTitle FROM PhList INNER JOIN Department ON PhList.Department = Department.ID WHERE (PhList.Name LIKE @Search) OR (PhList.Phone LIKE @Search) OR (Department.Name LIKE @Search)"
OnSelecting="SqlDataSource1_Selecting">
<SelectParameters>
<asp:QueryStringParameter Name="Search" QueryStringField="Search" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
here is my Selecting code... Protected Sub SqlDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) e.Command.Parameters("Search").Value = "%" & Request.QueryString("Search") & "%" End Sub
The error i am getting is...
An SqlParameter with ParameterName 'Search' is not contained by this SqlParameterCollection. (From the e.command.par.........)
View 2 Replies
View Related
Apr 7, 2008
I've read that if particular tables are frequently queried together through a join then these tables should be placed on different devices on different physical disks.
What does this mean exactly and how would you configure this?
Is this a common practice in high-performance real-world environments (or should it be)?
View 3 Replies
View Related
Oct 6, 2004
I am working on deploying my production DB's to a new server and am looking for some advice. The new server is running RAID-5 (the old one is RAID-0) but it only has one controller therefore I can not create another array group. So I was wondering since the disk setup is C: and D: (Virtual Drive) if I would see any benefits from placing my log files on C: and my Data files on D:?
The other question is related to the size of my log files. Some of the DB's were not created by me and there are no constraints in log file growth causing some very large TRANS logs. For example, there is a 100 MB DB with a 1 GB trans log. I restored the DB on my new server and truncated the log file (manually, the Ent Mgr Shrink DB tool doesn't work worth a hoot) to half the size of the DB and it functions properly. I was just wondering if this would cause any problems down the road if I did all of my DB's like this?
I am restricting log file growth to approximately half the size of the DB.
There is one DB that is 1.5 GB and the log file was set restricted to 2mb and it works fine, but I feel that I should bump this up a bit.
Any recommendations?
View 10 Replies
View Related
Apr 26, 2000
Anyone know how to place additional indexes on system tables?
View 1 Replies
View Related
Jul 20, 2005
Hello folks,first of all I really don't know how you gurus call this way ofwriting joins:SELECTA.FIELD,B.FIELDFROMTABLE_A A,TABLE_B BWHEREA.ID_FIELD = B.ID_FIELDI find this way very useful and readable. It works also with left andright Joins (using *= or =* instead of = )A friend of mine found that the inner join way (using = ) in Access ismuch more slower than using the classic INNER JOIN TABLE ON FIELDsintax. My question is: was MSSQL Server studied for using the shortway, or it is just a workaround found by someone? Is there aperformance degrade folllowing this way?TIA,tK
View 1 Replies
View Related
Apr 27, 2015
I have a question regarding saving hashtags in another table. I have two tables with these columns:
Table1
ItemId, Name, Description (it may contains several hashtags like this example "hey I am an #example of this #question")
Table2
HashtagId, ItemId, Hashtag
So I want to detect #example and #question and put them in Table2. I'd like to create a trigger for table1 that if there was a hashtag, it added a record in table 2.
CREATE TRIGGER [dbo].[tr_Events_ForInsert_Hashtag]
ON Table1
FOR INSERT
AS
BEGIN
DECLARE @ItemId bigint
SELECT @ItemId = ItemId FROM inserted
[Code] .....
View 3 Replies
View Related
Dec 17, 2007
Hi everyone, I have created a matrix report which takes 3 parameters being store, year and quarter which then displays budget information in a matrix. This all works fine but I would also like to have a bar chart below the matrix to visually show the results.
However when I add the bar chart and add the relevent dataset details etc the chart does not appear when I preview the report. I wondered if the chart wasn't showing because the parameter values are not being passed to the chart.
Has anybody any idea of adding charts to reports in this way or knows of any instructions to do so.
Thanks
Sally
View 3 Replies
View Related
Mar 2, 2007
This one is driving me crazy. I have followed several steps given in examples both online and in the four SRS books I own to no avail. I have created a new report.rdl template and have all the required features for our company needs, except placing the company logo as a background image in watermark style (similar to the Company Sales report that comes with the SRS report samples). I right-click on the body and in properties set the image name (URHCSlogo), it defaults to external, but I can not get it to be embedded and it will not let me set the mimetype. Could someone please give me a step-by-step method to do this? Thanks!
View 5 Replies
View Related
Apr 20, 2001
We are in the process of replacing our primary production server. In the process of determining how SQL server is going to be structured, it has been suggested that I place all current and new indexes on a separate file group. These filegroups would then reside on a separate shelf on the server. What are the pros and cons of doing this?
View 2 Replies
View Related
Jul 4, 2007
Hi,
If I am taking a Matrix and right clicking on the column header and click on the SubTotal then it always place that column on the right of it .If I want to place that column to the left of my original column then I can't do it.
Adding manual column and then puuting the Expresstion =Sum(Fields!MyCol.Value) is not halping as it will give me the same value that is there in the column instead of giving me the column
-Thanks,
Digs
View 1 Replies
View Related
Jan 8, 2008
Hi,
I am novice to SQL reporting services.
I have created a report using SSRS.
In this report I would like to show a column value as button and wants to execute vbscript code on click.
Or at least execute vbscript code on click of that field (button is just an option!)
The code will launch another application (exe file or else)
Help in this regard would be appreciated.
Thanks
View 2 Replies
View Related
Jul 20, 2005
Hello all. Before my arrival at my current employer, our consultantsphysically set up our MSSQL 7 server as follows:drive c: contains the mssql enginedrive d: contains the transaction logdrive e: contains the data filesNo filegroups were set up and the data files consist of only 1 largephysical file. Currently, our data file is >10GB. When I was trained onthe physical aspects of sqlserver, I was told to never create physical files[color=blue]> 2048MB each. If I did, I could expect inefficient physical storage of[/color]data and slower performance (due to the OS).Our server has 2 RAID-5 arrays. Drive c: and e: are located on the firstarray and drive d: on the second. We're running Windows 4.0 NT Server SP6with NTFS.Can someone comment on the use of 1 single large data file vs. more smallerdata files?
View 2 Replies
View Related
Aug 7, 2015
I have an MVC asp.net application that stores many records in a table on sql server, in its own system. Â used the system for 2 months, worked fine accessing, changing data.
Now that other users are logging in? there is cross coupling going on. Â one user gets the data from another users sql search.
In the mvc app it had used the get async method to read the ID record from the db, i set that to synchronous. Â no effect; Â the user makes their own login id but that does nt matter either.
View 8 Replies
View Related
Mar 10, 2008
i am really in need of help. i have a text file consiting of some data.i want to update my database from that text file periodically say 12 hours.the text file is being updated by another server program in every 12 hours can any one help me in this case? i am lost for this scenario?? help me please.....
View 1 Replies
View Related
Dec 10, 2005
Hi,I have(had) an old Win2k Server server with about 30 web site databases(SQL 2000) that just went under due to hardware problems. Thankfully, Ihave backups of all the databases plus the MDF and LDF files from thehard drive.I want to move all of these sites and their data to a newer server(Win2003) running SQL2000.What's the best way to copy the database from the old server hard drive(now mounted as an extrnal drive to a local machine; I'm currentlyFTPing all of the web site directories from it to the new server)?Just upload the original data to the new server and then mount the MDFand LDF files within the new SQL server? Or do I restore the backupfiles in the new SQL2000?All of my previous data migrations have been DTS operations from onelive server to another, so no experience with either of the abovescenarios. I'll certainly have a lot more experience at one of them bythe time this weekend is through.Thanks for any help you can offer.
View 1 Replies
View Related
Sep 17, 2001
I have an sql 6.5 server that has had it OS (nt4.0) reinstalled on c:.
sql was installed on d: and all of the dat files are still there, i need to recover data from one of these, i tried install on a new machine and creating a device/db with same name and then over writing the file with the old one but enterprise manager shows it as suspect and will not let me work on it.
Any assistance would be appreciated.
Dominic
View 1 Replies
View Related