Showing posts with label drive. Show all posts
Showing posts with label drive. Show all posts

Sunday, March 25, 2012

changing the default drive and folder for DBs


Hi;

I feel like an idiot to be asking this,
but how do I change the default drive and folder
in which new databases are created?

I've been looking all over Server Mgmt Studio,
and I can't find anything. I'm thinking that someone
can tell me this off the top of their heads,
or slip me a link to a web page.

Thanks,

Never mind everyone - I found my own solution.

THANKS anyway.

|||

Please tell us how you fix that

Wednesday, March 7, 2012

Changing path of data & log files on the fly

We have a SQL Server setup as a publisher to 15 subscribers. We need to change the path of the data & log files to a new drive (added a new harddisk). We plan to take a cold backup of the database and shift the data & log files to the new drive. Then we just attach the data & log files from the new path.

Will this disturb my existing replication Setup?
Is the the correct procedure for changing the path of the existing data & log files?
What is the appropriate method for shifting data & log file of a live database to a different location (directory/drive) ?

thanks in advancedisable replication;
sp_detach_db;
move files to new location;
sp_attach_db;
enable replication.|||Thanks for the suggestion. I'll try this out and confirm back. Thanks again anyways.

Changing paper size through asp

I have designed a report on my local drive to be used as a label (4" X2") I've installed the driver for the label printer and set the paper size. Works Great. I put the report on our Crystal Server where it is called through asp. Instead of getting individual 4X2 labels, I get an 8X10 with all the labels listed. Is there a way to define the paper size through the asp page? Or does the printer driver need to be installed on the server? I don't want to mess things up for our IT people and none of them know the solution. Thanks!Hi,

To set the papersize you can use,

session("oRpt").PaperSize property.

=>session("oRpt") is the Report Object

But I'm not sure about the driver. Postively it will expect all the resources in Server.

Thursday, February 16, 2012

Changing folder for databases to reside in?

Can I change the folder that the databases reside in for my installation of SQL Server? I would like to have them in a folder on another drive, but I can't seem to find where the path is configured.
Any help is appreciated.I don't think you can because all SQL Server files are in Microsoft SQL Server folder under programs in the C drive but I am not a networking person so you may get a better answer. I am assuming you could tell setup to put the folder in a different drive during installation but I could be wrong. Hope this helps.|||When restoring the Database you can select the folders to use in the options tab.
I am 95% sure you can not change the folders after restoring.
Mathias|||Ok, thanks for the information!|||In Enterprise Manager, open the property dialogue for your Sql Server Instance. Click the "Database Settings" TAB. You'll see "New database default location". Use this to set a new locations for DataBases and Logfiles. Next time you create a DB, it will be created in this Directory.
I believe it's possible to backup and recreate all your database to the new location.
NOT FOR THE FAINT OF HEART

You will need to change the "startup parameters" to point to the new location of the Master DB, ErrorLog and MastLog files after recreating them in the new location. This is done at your own risk. I am not even sure if it is possible to move the MASTER etc.
NOT FOR THE FAINT OF HEART

Changing Drive Letters

I am new to SQL server so any guidance is much appreciated.
We have two logical drives for our SQL server.We are upgrading from a
smaller driver to a bigger one. We have copied everything from one drive to
the other after doing so we decided the easiest thing to do would be to
change the drive letter to what the old drive used to be. We went into disk
management and tried to do it from there but had no luck with getting the
cluster or the services restarted and back up. This seems like such an easy
thing to do but I can not seem to get it right! Again, if anyone has any
advice it would be greatly appreciated.
Changing a drive letter "under the covers" works, but you have to do a few
tweaks to make it work on a cluster. Make sure you have created the new
disk as a cluster resource. Put it in the SQL server group and make the SQL
service dependant on the new disk. If that doesn't fix it, check the
application and system logs to see what SQL and/or the cluster service is
complaining about.
Geoff N. Hiten
"Mel" <Mel@.discussions.microsoft.com> wrote in message
news:8B9A7516-D136-4044-9284-3F5E4590D197@.microsoft.com...
>I am new to SQL server so any guidance is much appreciated.
> We have two logical drives for our SQL server.We are upgrading from a
> smaller driver to a bigger one. We have copied everything from one drive
> to
> the other after doing so we decided the easiest thing to do would be to
> change the drive letter to what the old drive used to be. We went into
> disk
> management and tried to do it from there but had no luck with getting the
> cluster or the services restarted and back up. This seems like such an
> easy
> thing to do but I can not seem to get it right! Again, if anyone has any
> advice it would be greatly appreciated.
|||Mel
Check out the ClusterRecovery.exe from
http://www.microsoft.com/downloads/d...displaylang=en
If your new to clustering and want to swap disks, this might be a little
more user friendly for you. This will take care of the dependancy issue as
well.
Good Luck
Regards
CT
"Mel" wrote:

> I am new to SQL server so any guidance is much appreciated.
> We have two logical drives for our SQL server.We are upgrading from a
> smaller driver to a bigger one. We have copied everything from one drive to
> the other after doing so we decided the easiest thing to do would be to
> change the drive letter to what the old drive used to be. We went into disk
> management and tried to do it from there but had no luck with getting the
> cluster or the services restarted and back up. This seems like such an easy
> thing to do but I can not seem to get it right! Again, if anyone has any
> advice it would be greatly appreciated.

Changing drive letter

Hi there. I have to change the drive letter where SQL server have his
datfiles (master included). If I do that, ob the SQL fail to start, becouse
it's unable to find the master datfiles. Is it possible changing driver
letter without reinstalling the complete product?

BR
amnsia"amnsia" <secondotetidoilmioindirizzocosilospammi@.nondirecaz zate.it> wrote in message news:<cdqqkq$cmj$1@.domitilla.aioe.org>...
> Hi there. I have to change the drive letter where SQL server have his
> datfiles (master included). If I do that, ob the SQL fail to start, becouse
> it's unable to find the master datfiles. Is it possible changing driver
> letter without reinstalling the complete product?
> BR
> amnsia

From KB224071

Moving the master database
Change the path for the master data and log files in SQL Server Enterprise Manager.

NOTE: You may optionally change the location of the error log here as well.
Right-click the SQL Server in Enterprise Manager and click Properties.
Click the Startup Parameters button and you will see the following entries:
-dD:\MSSQL7\data\master.mdf
-eD:\MSSQL7\log\ErrorLog
-lD:\MSSQL7\data\mastlog.ldf

-d is the fully qualified path for the master database data file.

-e is the fully qualified path for the error log file.

-l is the fully qualified path for the master database log file.
Change these values as follows:
Remove the current entries for the Master.mdf and Mastlog.ldf files.
Add new entries specifying the new location:
-dE:\SQLDATA\master.mdf
-lE:\SQLDATA\mastlog.ldf

Stop SQL Server.
Copy the Master.mdf and Mastlog.ldf files to the new location (E:\Sqldata).
Restart SQL Server.|||amnsia (secondotetidoilmioindirizzocosilospammi@.nondireca zzate.it) writes:
> Hi there. I have to change the drive letter where SQL server have his
> datfiles (master included). If I do that, ob the SQL fail to start,
> becouse it's unable to find the master datfiles. Is it possible changing
> driver letter without reinstalling the complete product?

Could try playing with the registry keys in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Setup.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp