Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

Monday, March 26, 2012

please help

Hi! I'm new at asp .net programming, and would appreciate a littlehelp with a problem I have. I am trying to create a social network, andthe aim of this specific VB page is to show all of the friends of theuser who is logged in. I would like to do this without using gridviews,so that I have more freedom in the way the results of the select areshown and formatted. I found some code which is perfect for anotherpage where I simply show all the users in the database. However, forthis page where I show the friends of the logged in user, I am havingdifficulties because I need to use a parameter @.Param1 which passes thevalue of the username of who is logged in. Previously I was doing thiswith gridviews, and the passing of the parameter was easy, since on thepagepreinit I could declare Session("username") = User.Identity.Nameand then simply use username inside the select command of thesqldatasource ( <asp:SessionParameter Name="Param1"SessionField="username" />)

However, now without the gridview I don't know how I can continue using this parameter. Any suggestions?
Thanks a lot!

Here is the VB code:

<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %
<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
<script language="VB" runat="server">
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs)
Page.Theme = Profile.MyTheme
Session("username") = User.Identity.Name

End Sub
Sub Page_Load(Sender As Object, E As EventArgs)

Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As New SqlDataAdapter


' MyCommand.SelectCommand.Parameters.AddWithValue("@.Param1", "")
' not sure about the above line, something is missing


MyConnection = New SqlConnection("DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;IntegratedSecurity=True;User Instance=True")
MyCommand = NewSqlDataAdapter("select c.UserName from aspnet_Users a inner joinaspnet_friendship b on (a.userId = b.userId or a.userId = b.buddyId)inner join aspnet_Users c on (b.userId = c.userId or b.buddyId =c.userId) where a.UserName = @.Param1 and c.UserName <>@.Param1", MyConnection)
DS = New DataSet()
MyCommand.Fill(DS, "aspnet_Users")

MyDataList.DataSource = DS.Tables("aspnet_Users").DefaultView
MyDataList.DataBind()
End Sub

</script
<body
<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox
<ASP:DataList id="MyDataList" RepeatColumns="1" runat="server"
<ItemTemplate
<table cellpadding=10 style="font: 10pt verdana">
<tr>
<td width=1 bgcolor="BD8672"/
<td valign="top">

</td
<td valign="top"
<b>Name: </b><%#DataBinder.Eval(Container.DataItem, "UserName")%><br>
<b>Photo: </b><%#DataBinder.Eval(Container.DataItem, "UserName")%><br>
<p
<a href='<%# DataBinder.Eval(Container.DataItem, "UserName", "purchase.aspx?titleid={0}") %>' >
<img border="0" src="http://pics.10026.com/?src=/quickstart/aspplus/images/purchase_book.gif" >
</a
</td>
</tr>
</table
</ItemTemplate
</ASP:DataList

</body
</asp:Content>

This should do what you are looking for

Sub Page_Load(Sender As Object, E As EventArgs)

Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter


MyConnection = New SqlConnection("DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;IntegratedSecurity=True;User Instance=True")
MyCommand = NewSqlDataAdapter("select c.UserName from aspnet_Users a inner joinaspnet_friendship b on (a.userId = b.userId or a.userId = b.buddyId)inner join aspnet_Users c on (b.userId = c.userId or b.buddyId =c.userId) where a.UserName = @.Param1 and c.UserName <>@.Param1", MyConnection)

MyCommand.SelectCommand.Parameters.AddWithValue("@.Param1", Session("username"))


DS = New DataSet()
MyCommand.Fill(DS, "aspnet_Users")

MyDataList.DataSource = DS.Tables("aspnet_Users").DefaultView
MyDataList.DataBind()
End Sub

|||

Thanks for the help. Now I get an error in the line:

MyCommand.Fill(DS, "aspnet_Users")

The error is: "The parameterized query '(@.Param1 nvarchar(4000))select c.UserName fromaspnet_Users a in' expects the parameter '@.Param1', which was notsupplied."

I am not sure what I should include inside the MyCommand.Fill in order to show the results that I want, considering what I posted before. I would like to show the friends of the logged in user.
I'm sorry I have to ask all this, but I am relatively new at this and would appreciate any help :)

Thanks.


|||

Hi!

I managed to solve the problem :)

The final code is:

<script language="VB" runat="server">
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs)
Page.Theme = Profile.MyTheme
Session("username") = User.Identity.Name
End Sub
Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)

Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter


MyConnection = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True")

MyCommand = New SqlDataAdapter("select c.UserName from aspnet_Users a inner join aspnet_friendship b on (a.userId = b.userId or a.userId = b.buddyId) inner join aspnet_Users c on (b.userId = c.userId or b.buddyId = c.userId) where a.UserName = @.Param1 and c.UserName <> @.Param1", MyConnection)

MyCommand.SelectCommand.Parameters.AddWithValue("@.Param1", Session("username"))

DS = New DataSet()
MyCommand.Fill(DS, "aspnet_friendship")

MyDataList.DataSource = DS.Tables("aspnet_friendship").DefaultView
MyDataList.DataBind()
End Sub
</script>

Thanks once again.

Wednesday, March 21, 2012

Please answer my queries for fresh Installation

Hi Group,
For some reasons I have to pull the SQL Server Production
server out of network and reinstall from OS level. I have
few queries about Backing up the SQL server Databases and
choosing cluster size.
1. Do I need to Backup/detach the Master,MSDB databases
along with User database to restore again when SQL server
is installed again freshly?. MSDB just has two maintenance
plans running.I fell that I can just take the backups of
User databases as I have to restore them on fresh
installation.
2. I am creating three arrays on this server
C: RAID1 Array ( OS) - Array1
D: RAID1 (SQL Tran logs files)- Array2
D: RAID5E ( SQL Data files) - Array3
While installing SQLServer I will choose Array3 for SQL
system databases. How do i move the master.ldf msdb.ldf
model.ldf temp.ldf to Array2 ? does detach/attach work for
system databses?
3. I am choosing 8KB Cluster on NTFS instead of Default
4KB cluster, does this help in enhancing the access of 8K
SQL database pages in terms of I/O?
4. Are there any patches/fixes released after
SQLServer2000 Service Pack 3a?
OS Windows 2000 Server SP4
SQL Server 2000 Standard Edition
IBM x250 dual PIII Xeon 700MHz
4GB RAM
18GB for OS on server
1.4TB on IBM FAStT200 HA + EXP500 expansion.
Thanks for your patience
Regards
Chip
Hi,
1. This link details you the steps to move the system and user databases.
http://www.support.microsoft.com/?id=224071 Moving SQL Server
Databases to a New Location with Detach/Attach
It is always good to move the Master and MSDB databases to new server.
But it is a must that you should move master database
since it stores Server config, Logins permissions..If you are
notloading master all the database users chanin will be lost.
2. For Master database after starting sql server using trace flag "-T3608"
and use sp_detach_db and then copy to new drive and use
sp_attach_db to attach Master database. For Tempdb use ALTER DATBASE ..
MODIFY FILE option. Both methodologies are detailed
in the above link
3. This represent the smallest amount of disk space allocated to hold a
file.
I feel this might not reduce your I/O.
4. No, Sp3a is the latest service pack.
Thanks
Hari
MCDBA
"Chip" <Chipsin007@.yahoo.com> wrote in message
news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
> Hi Group,
> For some reasons I have to pull the SQL Server Production
> server out of network and reinstall from OS level. I have
> few queries about Backing up the SQL server Databases and
> choosing cluster size.
> 1. Do I need to Backup/detach the Master,MSDB databases
> along with User database to restore again when SQL server
> is installed again freshly?. MSDB just has two maintenance
> plans running.I fell that I can just take the backups of
> User databases as I have to restore them on fresh
> installation.
> 2. I am creating three arrays on this server
> C: RAID1 Array ( OS) - Array1
> D: RAID1 (SQL Tran logs files)- Array2
> D: RAID5E ( SQL Data files) - Array3
> While installing SQLServer I will choose Array3 for SQL
> system databases. How do i move the master.ldf msdb.ldf
> model.ldf temp.ldf to Array2 ? does detach/attach work for
> system databses?
> 3. I am choosing 8KB Cluster on NTFS instead of Default
> 4KB cluster, does this help in enhancing the access of 8K
> SQL database pages in terms of I/O?
> 4. Are there any patches/fixes released after
> SQLServer2000 Service Pack 3a?
> OS Windows 2000 Server SP4
> SQL Server 2000 Standard Edition
> IBM x250 dual PIII Xeon 700MHz
> 4GB RAM
> 18GB for OS on server
> 1.4TB on IBM FAStT200 HA + EXP500 expansion.
> Thanks for your patience
> Regards
> Chip
|||Hi Hari,
Thanks for the help! one more doubt.. When I install SQL
Server by default it will create Master,MSDB . How do i
get rid of them and attach the last backed up master
(.mdf,.ldf), MSDB(.mdf,.ldf).
I guess I have to login in singleuser mode, detach them,
overwrite with the backed up files then attach?
Please give me step by step ( you are always awesome in
dealing step by step)
Sincerely
Chip
>--Original Message--
>Hi,
>1. This link details you the steps to move the system
and user databases.
> http://www.support.microsoft.com/?id=224071
Moving SQL Server
>Databases to a New Location with Detach/Attach
> It is always good to move the Master and MSDB
databases to new server.
>But it is a must that you should move master database
> since it stores Server config, Logins
permissions..If you are
>notloading master all the database users chanin will be
lost.
>2. For Master database after starting sql server using
trace flag "-T3608"
>and use sp_detach_db and then copy to new drive and use
> sp_attach_db to attach Master database. For Tempdb
use ALTER DATBASE ..
>MODIFY FILE option. Both methodologies are detailed
> in the above link
>3. This represent the smallest amount of disk space
allocated to hold a[vbcol=seagreen]
>file.
> I feel this might not reduce your I/O.
>
>4. No, Sp3a is the latest service pack.
>Thanks
>Hari
>MCDBA
>
>"Chip" <Chipsin007@.yahoo.com> wrote in message
>news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
Production[vbcol=seagreen]
have[vbcol=seagreen]
and[vbcol=seagreen]
server[vbcol=seagreen]
maintenance[vbcol=seagreen]
for[vbcol=seagreen]
8K
>
>.
>
|||Moving databases and database files:
Moving SQL Server Databases
http://www.support.microsoft.com/?id=224071
Moving Databases between Servers
http://www.support.microsoft.com/?id=314546
Using WITH MOVE in a Restore to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465
How To Transfer Logins and Passwords Between SQL Servers
http://www.support.microsoft.com/?id=246133
Mapping Logins & SIDs after a Restore
http://www.support.microsoft.com/?id=298897
Utility to map users to the correct login
http://www.dbmaint.com/SyncSqlLogins.asp
How to Resolve Permission Issues When a Database Is Moved Between SQL Servers
http://www.support.microsoft.com/?id=240872
User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
Disaster Recovery Articles for SQL Server
http://www.support.microsoft.com/?id=307775
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chip" <anonymous@.discussions.microsoft.com> wrote in message news:34a801c4292b$29db0a90$a001280a@.phx.gbl...[vbcol=seagreen]
> Hi Hari,
> Thanks for the help! one more doubt.. When I install SQL
> Server by default it will create Master,MSDB . How do i
> get rid of them and attach the last backed up master
> (.mdf,.ldf), MSDB(.mdf,.ldf).
> I guess I have to login in singleuser mode, detach them,
> overwrite with the backed up files then attach?
> Please give me step by step ( you are always awesome in
> dealing step by step)
> Sincerely
> Chip
> and user databases.
> Moving SQL Server
> databases to new server.
> permissions..If you are
> lost.
> trace flag "-T3608"
> use ALTER DATBASE ..
> allocated to hold a
> Production
> have
> and
> server
> maintenance
> for
> 8K
|||Hi Tibor,
I have all the links you posted. In fact I saved them from
one of your post. What I was asking is.. When I install a
SQL Server, It will create Master, MSDB databases. How do
I get rid of them to restore/attach the backed up Master &
MSDB .
Regards
Chip
>--Original Message--
>Moving databases and database files:
>
>Moving SQL Server Databases
>http://www.support.microsoft.com/?id=224071
>Moving Databases between Servers
>http://www.support.microsoft.com/?id=314546
>Using WITH MOVE in a Restore to a New Location with
Detach/Attach
>http://support.microsoft.com/?id=221465
>How To Transfer Logins and Passwords Between SQL Servers
>http://www.support.microsoft.com/?id=246133
>Mapping Logins & SIDs after a Restore
>http://www.support.microsoft.com/?id=298897
>Utility to map users to the correct login
>http://www.dbmaint.com/SyncSqlLogins.asp
>How to Resolve Permission Issues When a Database Is Moved
Between SQL Servers
>http://www.support.microsoft.com/?id=240872
>User Logon and/or Permission Errors After Restoring Dump
>http://www.support.microsoft.com/?id=168001
>Disaster Recovery Articles for SQL Server
>http://www.support.microsoft.com/?id=307775
>
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Chip" <anonymous@.discussions.microsoft.com> wrote in
message news:34a801c4292b$29db0a90$a001280a@.phx.gbl...[vbcol=seagreen]
databases[vbcol=seagreen]
backups of[vbcol=seagreen]
SQL[vbcol=seagreen]
msdb.ldf[vbcol=seagreen]
work[vbcol=seagreen]
Default[vbcol=seagreen]
of
>
>.
>
|||That should be in the articles. You can restore MSDB as well as master. For master, you need to be in single
user mode in order to do a restore.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chip" <anonymous@.discussions.microsoft.com> wrote in message news:3a2b01c429a2$ac8eb190$a001280a@.phx.gbl...[vbcol=seagreen]
> Hi Tibor,
> I have all the links you posted. In fact I saved them from
> one of your post. What I was asking is.. When I install a
> SQL Server, It will create Master, MSDB databases. How do
> I get rid of them to restore/attach the backed up Master &
> MSDB .
> Regards
> Chip
> Detach/Attach
> Between SQL Servers
> message news:34a801c4292b$29db0a90$a001280a@.phx.gbl...
> databases
> backups of
> SQL
> msdb.ldf
> work
> Default
> of

Please answer my queries for fresh Installation

Hi Group,
For some reasons I have to pull the SQL Server Production
server out of network and reinstall from OS level. I have
few queries about Backing up the SQL server Databases and
choosing cluster size.
1. Do I need to Backup/detach the Master,MSDB databases
along with User database to restore again when SQL server
is installed again freshly?. MSDB just has two maintenance
plans running.I fell that I can just take the backups of
User databases as I have to restore them on fresh
installation.
2. I am creating three arrays on this server
C: RAID1 Array ( OS) - Array1
D: RAID1 (SQL Tran logs files)- Array2
D: RAID5E ( SQL Data files) - Array3
While installing SQLServer I will choose Array3 for SQL
system databases. How do i move the master.ldf msdb.ldf
model.ldf temp.ldf to Array2 ? does detach/attach work for
system databses?
3. I am choosing 8KB Cluster on NTFS instead of Default
4KB cluster, does this help in enhancing the access of 8K
SQL database pages in terms of I/O?
4. Are there any patches/fixes released after
SQLServer2000 Service Pack 3a?
OS Windows 2000 Server SP4
SQL Server 2000 Standard Edition
IBM x250 dual PIII Xeon 700MHz
4GB RAM
18GB for OS on server
1.4TB on IBM FAStT200 HA + EXP500 expansion.
Thanks for your patience
Regards
ChipHi,
1. This link details you the steps to move the system and user databases.
http://www.support.microsoft.com/?id=224071 Moving SQL Server
Databases to a New Location with Detach/Attach
It is always good to move the Master and MSDB databases to new server.
But it is a must that you should move master database
since it stores Server config, Logins permissions..If you are
notloading master all the database users chanin will be lost.
2. For Master database after starting sql server using trace flag "-T3608"
and use sp_detach_db and then copy to new drive and use
sp_attach_db to attach Master database. For Tempdb use ALTER DATBASE ..
MODIFY FILE option. Both methodologies are detailed
in the above link
3. This represent the smallest amount of disk space allocated to hold a
file.
I feel this might not reduce your I/O.
4. No, Sp3a is the latest service pack.
Thanks
Hari
MCDBA
"Chip" <Chipsin007@.yahoo.com> wrote in message
news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
> Hi Group,
> For some reasons I have to pull the SQL Server Production
> server out of network and reinstall from OS level. I have
> few queries about Backing up the SQL server Databases and
> choosing cluster size.
> 1. Do I need to Backup/detach the Master,MSDB databases
> along with User database to restore again when SQL server
> is installed again freshly?. MSDB just has two maintenance
> plans running.I fell that I can just take the backups of
> User databases as I have to restore them on fresh
> installation.
> 2. I am creating three arrays on this server
> C: RAID1 Array ( OS) - Array1
> D: RAID1 (SQL Tran logs files)- Array2
> D: RAID5E ( SQL Data files) - Array3
> While installing SQLServer I will choose Array3 for SQL
> system databases. How do i move the master.ldf msdb.ldf
> model.ldf temp.ldf to Array2 ? does detach/attach work for
> system databses?
> 3. I am choosing 8KB Cluster on NTFS instead of Default
> 4KB cluster, does this help in enhancing the access of 8K
> SQL database pages in terms of I/O?
> 4. Are there any patches/fixes released after
> SQLServer2000 Service Pack 3a?
> OS Windows 2000 Server SP4
> SQL Server 2000 Standard Edition
> IBM x250 dual PIII Xeon 700MHz
> 4GB RAM
> 18GB for OS on server
> 1.4TB on IBM FAStT200 HA + EXP500 expansion.
> Thanks for your patience
> Regards
> Chip|||Hi Hari,
Thanks for the help! one more doubt.. When I install SQL
Server by default it will create Master,MSDB . How do i
get rid of them and attach the last backed up master
(.mdf,.ldf), MSDB(.mdf,.ldf).
I guess I have to login in singleuser mode, detach them,
overwrite with the backed up files then attach?
Please give me step by step ( you are always awesome in
dealing step by step)
Sincerely
Chip
>--Original Message--
>Hi,
>1. This link details you the steps to move the system
and user databases.
> http://www.support.microsoft.com/?id=224071
Moving SQL Server
>Databases to a New Location with Detach/Attach
> It is always good to move the Master and MSDB
databases to new server.
>But it is a must that you should move master database
> since it stores Server config, Logins
permissions..If you are
>notloading master all the database users chanin will be
lost.
>2. For Master database after starting sql server using
trace flag "-T3608"
>and use sp_detach_db and then copy to new drive and use
> sp_attach_db to attach Master database. For Tempdb
use ALTER DATBASE ..
>MODIFY FILE option. Both methodologies are detailed
> in the above link
>3. This represent the smallest amount of disk space
allocated to hold a
>file.
> I feel this might not reduce your I/O.
>
>4. No, Sp3a is the latest service pack.
>Thanks
>Hari
>MCDBA
>
>"Chip" <Chipsin007@.yahoo.com> wrote in message
>news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
>> Hi Group,
>> For some reasons I have to pull the SQL Server
Production
>> server out of network and reinstall from OS level. I
have
>> few queries about Backing up the SQL server Databases
and
>> choosing cluster size.
>> 1. Do I need to Backup/detach the Master,MSDB databases
>> along with User database to restore again when SQL
server
>> is installed again freshly?. MSDB just has two
maintenance
>> plans running.I fell that I can just take the backups of
>> User databases as I have to restore them on fresh
>> installation.
>> 2. I am creating three arrays on this server
>> C: RAID1 Array ( OS) - Array1
>> D: RAID1 (SQL Tran logs files)- Array2
>> D: RAID5E ( SQL Data files) - Array3
>> While installing SQLServer I will choose Array3 for SQL
>> system databases. How do i move the master.ldf msdb.ldf
>> model.ldf temp.ldf to Array2 ? does detach/attach work
for
>> system databses?
>> 3. I am choosing 8KB Cluster on NTFS instead of Default
>> 4KB cluster, does this help in enhancing the access of
8K
>> SQL database pages in terms of I/O?
>> 4. Are there any patches/fixes released after
>> SQLServer2000 Service Pack 3a?
>> OS Windows 2000 Server SP4
>> SQL Server 2000 Standard Edition
>> IBM x250 dual PIII Xeon 700MHz
>> 4GB RAM
>> 18GB for OS on server
>> 1.4TB on IBM FAStT200 HA + EXP500 expansion.
>> Thanks for your patience
>> Regards
>> Chip
>
>.
>|||Moving databases and database files:
Moving SQL Server Databases
http://www.support.microsoft.com/?id=224071
Moving Databases between Servers
http://www.support.microsoft.com/?id=314546
Using WITH MOVE in a Restore to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465
How To Transfer Logins and Passwords Between SQL Servers
http://www.support.microsoft.com/?id=246133
Mapping Logins & SIDs after a Restore
http://www.support.microsoft.com/?id=298897
Utility to map users to the correct login
http://www.dbmaint.com/SyncSqlLogins.asp
How to Resolve Permission Issues When a Database Is Moved Between SQL Servers
http://www.support.microsoft.com/?id=240872
User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
Disaster Recovery Articles for SQL Server
http://www.support.microsoft.com/?id=307775
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chip" <anonymous@.discussions.microsoft.com> wrote in message news:34a801c4292b$29db0a90$a001280a@.phx.gbl...
> Hi Hari,
> Thanks for the help! one more doubt.. When I install SQL
> Server by default it will create Master,MSDB . How do i
> get rid of them and attach the last backed up master
> (.mdf,.ldf), MSDB(.mdf,.ldf).
> I guess I have to login in singleuser mode, detach them,
> overwrite with the backed up files then attach?
> Please give me step by step ( you are always awesome in
> dealing step by step)
> Sincerely
> Chip
> >--Original Message--
> >Hi,
> >
> >1. This link details you the steps to move the system
> and user databases.
> > http://www.support.microsoft.com/?id=224071
> Moving SQL Server
> >Databases to a New Location with Detach/Attach
> > It is always good to move the Master and MSDB
> databases to new server.
> >But it is a must that you should move master database
> > since it stores Server config, Logins
> permissions..If you are
> >notloading master all the database users chanin will be
> lost.
> >
> >2. For Master database after starting sql server using
> trace flag "-T3608"
> >and use sp_detach_db and then copy to new drive and use
> > sp_attach_db to attach Master database. For Tempdb
> use ALTER DATBASE ..
> >MODIFY FILE option. Both methodologies are detailed
> > in the above link
> >
> >3. This represent the smallest amount of disk space
> allocated to hold a
> >file.
> > I feel this might not reduce your I/O.
> >
> >
> >4. No, Sp3a is the latest service pack.
> >
> >Thanks
> >Hari
> >MCDBA
> >
> >
> >
> >"Chip" <Chipsin007@.yahoo.com> wrote in message
> >news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
> >> Hi Group,
> >>
> >> For some reasons I have to pull the SQL Server
> Production
> >> server out of network and reinstall from OS level. I
> have
> >> few queries about Backing up the SQL server Databases
> and
> >> choosing cluster size.
> >>
> >> 1. Do I need to Backup/detach the Master,MSDB databases
> >> along with User database to restore again when SQL
> server
> >> is installed again freshly?. MSDB just has two
> maintenance
> >> plans running.I fell that I can just take the backups of
> >> User databases as I have to restore them on fresh
> >> installation.
> >>
> >> 2. I am creating three arrays on this server
> >> C: RAID1 Array ( OS) - Array1
> >> D: RAID1 (SQL Tran logs files)- Array2
> >> D: RAID5E ( SQL Data files) - Array3
> >>
> >> While installing SQLServer I will choose Array3 for SQL
> >> system databases. How do i move the master.ldf msdb.ldf
> >> model.ldf temp.ldf to Array2 ? does detach/attach work
> for
> >> system databses?
> >>
> >> 3. I am choosing 8KB Cluster on NTFS instead of Default
> >> 4KB cluster, does this help in enhancing the access of
> 8K
> >> SQL database pages in terms of I/O?
> >>
> >> 4. Are there any patches/fixes released after
> >> SQLServer2000 Service Pack 3a?
> >>
> >> OS Windows 2000 Server SP4
> >> SQL Server 2000 Standard Edition
> >> IBM x250 dual PIII Xeon 700MHz
> >> 4GB RAM
> >> 18GB for OS on server
> >> 1.4TB on IBM FAStT200 HA + EXP500 expansion.
> >>
> >> Thanks for your patience
> >>
> >> Regards
> >>
> >> Chip
> >
> >
> >.
> >|||Hi Tibor,
I have all the links you posted. In fact I saved them from
one of your post. What I was asking is.. When I install a
SQL Server, It will create Master, MSDB databases. How do
I get rid of them to restore/attach the backed up Master &
MSDB .
Regards
Chip
>--Original Message--
>Moving databases and database files:
>
>Moving SQL Server Databases
>http://www.support.microsoft.com/?id=224071
>Moving Databases between Servers
>http://www.support.microsoft.com/?id=314546
>Using WITH MOVE in a Restore to a New Location with
Detach/Attach
>http://support.microsoft.com/?id=221465
>How To Transfer Logins and Passwords Between SQL Servers
>http://www.support.microsoft.com/?id=246133
>Mapping Logins & SIDs after a Restore
>http://www.support.microsoft.com/?id=298897
>Utility to map users to the correct login
>http://www.dbmaint.com/SyncSqlLogins.asp
>How to Resolve Permission Issues When a Database Is Moved
Between SQL Servers
>http://www.support.microsoft.com/?id=240872
>User Logon and/or Permission Errors After Restoring Dump
>http://www.support.microsoft.com/?id=168001
>Disaster Recovery Articles for SQL Server
>http://www.support.microsoft.com/?id=307775
>
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Chip" <anonymous@.discussions.microsoft.com> wrote in
message news:34a801c4292b$29db0a90$a001280a@.phx.gbl...
>> Hi Hari,
>> Thanks for the help! one more doubt.. When I install SQL
>> Server by default it will create Master,MSDB . How do i
>> get rid of them and attach the last backed up master
>> (.mdf,.ldf), MSDB(.mdf,.ldf).
>> I guess I have to login in singleuser mode, detach them,
>> overwrite with the backed up files then attach?
>> Please give me step by step ( you are always awesome in
>> dealing step by step)
>> Sincerely
>> Chip
>> >--Original Message--
>> >Hi,
>> >
>> >1. This link details you the steps to move the system
>> and user databases.
>> > http://www.support.microsoft.com/?id=224071
>> Moving SQL Server
>> >Databases to a New Location with Detach/Attach
>> > It is always good to move the Master and MSDB
>> databases to new server.
>> >But it is a must that you should move master database
>> > since it stores Server config, Logins
>> permissions..If you are
>> >notloading master all the database users chanin will be
>> lost.
>> >
>> >2. For Master database after starting sql server using
>> trace flag "-T3608"
>> >and use sp_detach_db and then copy to new drive and use
>> > sp_attach_db to attach Master database. For Tempdb
>> use ALTER DATBASE ..
>> >MODIFY FILE option. Both methodologies are detailed
>> > in the above link
>> >
>> >3. This represent the smallest amount of disk space
>> allocated to hold a
>> >file.
>> > I feel this might not reduce your I/O.
>> >
>> >
>> >4. No, Sp3a is the latest service pack.
>> >
>> >Thanks
>> >Hari
>> >MCDBA
>> >
>> >
>> >
>> >"Chip" <Chipsin007@.yahoo.com> wrote in message
>> >news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
>> >> Hi Group,
>> >>
>> >> For some reasons I have to pull the SQL Server
>> Production
>> >> server out of network and reinstall from OS level. I
>> have
>> >> few queries about Backing up the SQL server Databases
>> and
>> >> choosing cluster size.
>> >>
>> >> 1. Do I need to Backup/detach the Master,MSDB
databases
>> >> along with User database to restore again when SQL
>> server
>> >> is installed again freshly?. MSDB just has two
>> maintenance
>> >> plans running.I fell that I can just take the
backups of
>> >> User databases as I have to restore them on fresh
>> >> installation.
>> >>
>> >> 2. I am creating three arrays on this server
>> >> C: RAID1 Array ( OS) - Array1
>> >> D: RAID1 (SQL Tran logs files)- Array2
>> >> D: RAID5E ( SQL Data files) - Array3
>> >>
>> >> While installing SQLServer I will choose Array3 for
SQL
>> >> system databases. How do i move the master.ldf
msdb.ldf
>> >> model.ldf temp.ldf to Array2 ? does detach/attach
work
>> for
>> >> system databses?
>> >>
>> >> 3. I am choosing 8KB Cluster on NTFS instead of
Default
>> >> 4KB cluster, does this help in enhancing the access
of
>> 8K
>> >> SQL database pages in terms of I/O?
>> >>
>> >> 4. Are there any patches/fixes released after
>> >> SQLServer2000 Service Pack 3a?
>> >>
>> >> OS Windows 2000 Server SP4
>> >> SQL Server 2000 Standard Edition
>> >> IBM x250 dual PIII Xeon 700MHz
>> >> 4GB RAM
>> >> 18GB for OS on server
>> >> 1.4TB on IBM FAStT200 HA + EXP500 expansion.
>> >>
>> >> Thanks for your patience
>> >>
>> >> Regards
>> >>
>> >> Chip
>> >
>> >
>> >.
>> >
>
>.
>|||That should be in the articles. You can restore MSDB as well as master. For master, you need to be in single
user mode in order to do a restore.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chip" <anonymous@.discussions.microsoft.com> wrote in message news:3a2b01c429a2$ac8eb190$a001280a@.phx.gbl...
> Hi Tibor,
> I have all the links you posted. In fact I saved them from
> one of your post. What I was asking is.. When I install a
> SQL Server, It will create Master, MSDB databases. How do
> I get rid of them to restore/attach the backed up Master &
> MSDB .
> Regards
> Chip
> >--Original Message--
> >Moving databases and database files:
> >
> >
> >Moving SQL Server Databases
> >http://www.support.microsoft.com/?id=224071
> >
> >Moving Databases between Servers
> >http://www.support.microsoft.com/?id=314546
> >
> >Using WITH MOVE in a Restore to a New Location with
> Detach/Attach
> >http://support.microsoft.com/?id=221465
> >
> >How To Transfer Logins and Passwords Between SQL Servers
> >http://www.support.microsoft.com/?id=246133
> >
> >Mapping Logins & SIDs after a Restore
> >http://www.support.microsoft.com/?id=298897
> >
> >Utility to map users to the correct login
> >http://www.dbmaint.com/SyncSqlLogins.asp
> >
> >How to Resolve Permission Issues When a Database Is Moved
> Between SQL Servers
> >http://www.support.microsoft.com/?id=240872
> >
> >User Logon and/or Permission Errors After Restoring Dump
> >http://www.support.microsoft.com/?id=168001
> >
> >Disaster Recovery Articles for SQL Server
> >http://www.support.microsoft.com/?id=307775
> >
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >http://www.karaszi.com/sqlserver/default.asp
> >
> >
> >"Chip" <anonymous@.discussions.microsoft.com> wrote in
> message news:34a801c4292b$29db0a90$a001280a@.phx.gbl...
> >> Hi Hari,
> >>
> >> Thanks for the help! one more doubt.. When I install SQL
> >> Server by default it will create Master,MSDB . How do i
> >> get rid of them and attach the last backed up master
> >> (.mdf,.ldf), MSDB(.mdf,.ldf).
> >>
> >> I guess I have to login in singleuser mode, detach them,
> >> overwrite with the backed up files then attach?
> >>
> >> Please give me step by step ( you are always awesome in
> >> dealing step by step)
> >>
> >> Sincerely
> >>
> >> Chip
> >> >--Original Message--
> >> >Hi,
> >> >
> >> >1. This link details you the steps to move the system
> >> and user databases.
> >> > http://www.support.microsoft.com/?id=224071
> >> Moving SQL Server
> >> >Databases to a New Location with Detach/Attach
> >> > It is always good to move the Master and MSDB
> >> databases to new server.
> >> >But it is a must that you should move master database
> >> > since it stores Server config, Logins
> >> permissions..If you are
> >> >notloading master all the database users chanin will be
> >> lost.
> >> >
> >> >2. For Master database after starting sql server using
> >> trace flag "-T3608"
> >> >and use sp_detach_db and then copy to new drive and use
> >> > sp_attach_db to attach Master database. For Tempdb
> >> use ALTER DATBASE ..
> >> >MODIFY FILE option. Both methodologies are detailed
> >> > in the above link
> >> >
> >> >3. This represent the smallest amount of disk space
> >> allocated to hold a
> >> >file.
> >> > I feel this might not reduce your I/O.
> >> >
> >> >
> >> >4. No, Sp3a is the latest service pack.
> >> >
> >> >Thanks
> >> >Hari
> >> >MCDBA
> >> >
> >> >
> >> >
> >> >"Chip" <Chipsin007@.yahoo.com> wrote in message
> >> >news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
> >> >> Hi Group,
> >> >>
> >> >> For some reasons I have to pull the SQL Server
> >> Production
> >> >> server out of network and reinstall from OS level. I
> >> have
> >> >> few queries about Backing up the SQL server Databases
> >> and
> >> >> choosing cluster size.
> >> >>
> >> >> 1. Do I need to Backup/detach the Master,MSDB
> databases
> >> >> along with User database to restore again when SQL
> >> server
> >> >> is installed again freshly?. MSDB just has two
> >> maintenance
> >> >> plans running.I fell that I can just take the
> backups of
> >> >> User databases as I have to restore them on fresh
> >> >> installation.
> >> >>
> >> >> 2. I am creating three arrays on this server
> >> >> C: RAID1 Array ( OS) - Array1
> >> >> D: RAID1 (SQL Tran logs files)- Array2
> >> >> D: RAID5E ( SQL Data files) - Array3
> >> >>
> >> >> While installing SQLServer I will choose Array3 for
> SQL
> >> >> system databases. How do i move the master.ldf
> msdb.ldf
> >> >> model.ldf temp.ldf to Array2 ? does detach/attach
> work
> >> for
> >> >> system databses?
> >> >>
> >> >> 3. I am choosing 8KB Cluster on NTFS instead of
> Default
> >> >> 4KB cluster, does this help in enhancing the access
> of
> >> 8K
> >> >> SQL database pages in terms of I/O?
> >> >>
> >> >> 4. Are there any patches/fixes released after
> >> >> SQLServer2000 Service Pack 3a?
> >> >>
> >> >> OS Windows 2000 Server SP4
> >> >> SQL Server 2000 Standard Edition
> >> >> IBM x250 dual PIII Xeon 700MHz
> >> >> 4GB RAM
> >> >> 18GB for OS on server
> >> >> 1.4TB on IBM FAStT200 HA + EXP500 expansion.
> >> >>
> >> >> Thanks for your patience
> >> >>
> >> >> Regards
> >> >>
> >> >> Chip
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >sql

Please answer my queries for fresh Installation

Hi Group,
For some reasons I have to pull the SQL Server Production
server out of network and reinstall from OS level. I have
few queries about Backing up the SQL server Databases and
choosing cluster size.
1. Do I need to Backup/detach the Master,MSDB databases
along with User database to restore again when SQL server
is installed again freshly?. MSDB just has two maintenance
plans running.I fell that I can just take the backups of
User databases as I have to restore them on fresh
installation.
2. I am creating three arrays on this server
C: RAID1 Array ( OS) - Array1
D: RAID1 (SQL Tran logs files)- Array2
D: RAID5E ( SQL Data files) - Array3
While installing SQLServer I will choose Array3 for SQL
system databases. How do i move the master.ldf msdb.ldf
model.ldf temp.ldf to Array2 ? does detach/attach work for
system databses?
3. I am choosing 8KB Cluster on NTFS instead of Default
4KB cluster, does this help in enhancing the access of 8K
SQL database pages in terms of I/O?
4. Are there any patches/fixes released after
SQLServer2000 Service Pack 3a?
OS Windows 2000 Server SP4
SQL Server 2000 Standard Edition
IBM x250 dual PIII Xeon 700MHz
4GB RAM
18GB for OS on server
1.4TB on IBM FAStT200 HA + EXP500 expansion.
Thanks for your patience
Regards
ChipHi,
1. This link details you the steps to move the system and user databases.
http://www.support.microsoft.com/?id=224071 Moving SQL Server
Databases to a New Location with Detach/Attach
It is always good to move the Master and MSDB databases to new server.
But it is a must that you should move master database
since it stores Server config, Logins permissions..If you are
notloading master all the database users chanin will be lost.
2. For Master database after starting sql server using trace flag "-T3608"
and use sp_detach_db and then copy to new drive and use
sp_attach_db to attach Master database. For Tempdb use ALTER DATBASE ..
MODIFY FILE option. Both methodologies are detailed
in the above link
3. This represent the smallest amount of disk space allocated to hold a
file.
I feel this might not reduce your I/O.
4. No, Sp3a is the latest service pack.
Thanks
Hari
MCDBA
"Chip" <Chipsin007@.yahoo.com> wrote in message
news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
> Hi Group,
> For some reasons I have to pull the SQL Server Production
> server out of network and reinstall from OS level. I have
> few queries about Backing up the SQL server Databases and
> choosing cluster size.
> 1. Do I need to Backup/detach the Master,MSDB databases
> along with User database to restore again when SQL server
> is installed again freshly?. MSDB just has two maintenance
> plans running.I fell that I can just take the backups of
> User databases as I have to restore them on fresh
> installation.
> 2. I am creating three arrays on this server
> C: RAID1 Array ( OS) - Array1
> D: RAID1 (SQL Tran logs files)- Array2
> D: RAID5E ( SQL Data files) - Array3
> While installing SQLServer I will choose Array3 for SQL
> system databases. How do i move the master.ldf msdb.ldf
> model.ldf temp.ldf to Array2 ? does detach/attach work for
> system databses?
> 3. I am choosing 8KB Cluster on NTFS instead of Default
> 4KB cluster, does this help in enhancing the access of 8K
> SQL database pages in terms of I/O?
> 4. Are there any patches/fixes released after
> SQLServer2000 Service Pack 3a?
> OS Windows 2000 Server SP4
> SQL Server 2000 Standard Edition
> IBM x250 dual PIII Xeon 700MHz
> 4GB RAM
> 18GB for OS on server
> 1.4TB on IBM FAStT200 HA + EXP500 expansion.
> Thanks for your patience
> Regards
> Chip|||Hi Hari,
Thanks for the help! one more doubt.. When I install SQL
Server by default it will create Master,MSDB . How do i
get rid of them and attach the last backed up master
(.mdf,.ldf), MSDB(.mdf,.ldf).
I guess I have to login in singleuser mode, detach them,
overwrite with the backed up files then attach?
Please give me step by step ( you are always awesome in
dealing step by step)
Sincerely
Chip
>--Original Message--
>Hi,
>1. This link details you the steps to move the system
and user databases.
> http://www.support.microsoft.com/?id=224071
Moving SQL Server
>Databases to a New Location with Detach/Attach
> It is always good to move the Master and MSDB
databases to new server.
>But it is a must that you should move master database
> since it stores Server config, Logins
permissions..If you are
>notloading master all the database users chanin will be
lost.
>2. For Master database after starting sql server using
trace flag "-T3608"
>and use sp_detach_db and then copy to new drive and use
> sp_attach_db to attach Master database. For Tempdb
use ALTER DATBASE ..
>MODIFY FILE option. Both methodologies are detailed
> in the above link
>3. This represent the smallest amount of disk space
allocated to hold a
>file.
> I feel this might not reduce your I/O.
>
>4. No, Sp3a is the latest service pack.
>Thanks
>Hari
>MCDBA
>
>"Chip" <Chipsin007@.yahoo.com> wrote in message
>news:32b801c4290c$a0a01a90$a501280a@.phx.gbl...
Production[vbcol=seagreen]
have[vbcol=seagreen]
and[vbcol=seagreen]
server[vbcol=seagreen]
maintenance[vbcol=seagreen]
for[vbcol=seagreen]
8K[vbcol=seagreen]
>
>.
>|||Moving databases and database files:
Moving SQL Server Databases
http://www.support.microsoft.com/?id=224071
Moving Databases between Servers
http://www.support.microsoft.com/?id=314546
Using WITH MOVE in a Restore to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465
How To Transfer Logins and Passwords Between SQL Servers
http://www.support.microsoft.com/?id=246133
Mapping Logins & SIDs after a Restore
http://www.support.microsoft.com/?id=298897
Utility to map users to the correct login
http://www.dbmaint.com/SyncSqlLogins.asp
How to Resolve Permission Issues When a Database Is Moved Between SQL Server
s
http://www.support.microsoft.com/?id=240872
User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
Disaster Recovery Articles for SQL Server
http://www.support.microsoft.com/?id=307775
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chip" <anonymous@.discussions.microsoft.com> wrote in message news:34a801c4292b$29db0a90$a00
1280a@.phx.gbl...[vbcol=seagreen]
> Hi Hari,
> Thanks for the help! one more doubt.. When I install SQL
> Server by default it will create Master,MSDB . How do i
> get rid of them and attach the last backed up master
> (.mdf,.ldf), MSDB(.mdf,.ldf).
> I guess I have to login in singleuser mode, detach them,
> overwrite with the backed up files then attach?
> Please give me step by step ( you are always awesome in
> dealing step by step)
> Sincerely
> Chip
> and user databases.
> Moving SQL Server
> databases to new server.
> permissions..If you are
> lost.
> trace flag "-T3608"
> use ALTER DATBASE ..
> allocated to hold a
> Production
> have
> and
> server
> maintenance
> for
> 8K|||Hi Tibor,
I have all the links you posted. In fact I saved them from
one of your post. What I was asking is.. When I install a
SQL Server, It will create Master, MSDB databases. How do
I get rid of them to restore/attach the backed up Master &
MSDB .
Regards
Chip
>--Original Message--
>Moving databases and database files:
>
>Moving SQL Server Databases
>http://www.support.microsoft.com/?id=224071
>Moving Databases between Servers
>http://www.support.microsoft.com/?id=314546
>Using WITH MOVE in a Restore to a New Location with
Detach/Attach
>http://support.microsoft.com/?id=221465
>How To Transfer Logins and Passwords Between SQL Servers
>http://www.support.microsoft.com/?id=246133
>Mapping Logins & SIDs after a Restore
>http://www.support.microsoft.com/?id=298897
>Utility to map users to the correct login
>http://www.dbmaint.com/SyncSqlLogins.asp
>How to Resolve Permission Issues When a Database Is Moved
Between SQL Servers
>http://www.support.microsoft.com/?id=240872
>User Logon and/or Permission Errors After Restoring Dump
>http://www.support.microsoft.com/?id=168001
>Disaster Recovery Articles for SQL Server
>http://www.support.microsoft.com/?id=307775
>
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Chip" <anonymous@.discussions.microsoft.com> wrote in
message news:34a801c4292b$29db0a90$a001280a@.phx.gbl...
databases[vbcol=seagreen]
backups of[vbcol=seagreen]
SQL[vbcol=seagreen]
msdb.ldf[vbcol=seagreen]
work[vbcol=seagreen]
Default[vbcol=seagreen]
of[vbcol=seagreen]
>
>.
>|||That should be in the articles. You can restore MSDB as well as master. For
master, you need to be in single
user mode in order to do a restore.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chip" <anonymous@.discussions.microsoft.com> wrote in message news:3a2b01c429a2$ac8eb190$a00
1280a@.phx.gbl...[vbcol=seagreen]
> Hi Tibor,
> I have all the links you posted. In fact I saved them from
> one of your post. What I was asking is.. When I install a
> SQL Server, It will create Master, MSDB databases. How do
> I get rid of them to restore/attach the backed up Master &
> MSDB .
> Regards
> Chip
> Detach/Attach
> Between SQL Servers
> message news:34a801c4292b$29db0a90$a001280a@.phx.gbl...
> databases
> backups of
> SQL
> msdb.ldf
> work
> Default
> of