Showing posts with label filename. Show all posts
Showing posts with label filename. Show all posts

Monday, March 19, 2012

Changing source filename in DTS

Hi!
Is there a way I can make the source file in my DTS dynamic so that every time I run it using ASP I can tell it which file to use?Hi!

Is there a way I can make the source file in my DTS dynamic so that every time I run it using ASP I can tell it which file to use?

Check out the Dynamic Properties Task.

Regards,

hmscott

Friday, February 24, 2012

changing logical filename

I have a database called test. it has 2 logical files : test_data,
test_log. they are in the following physical files: test_data.mdf,
test_log.ldf.
I make a backup of the database test.
I wish to make a copy of the test database with a different name on teh same
machine. I want to end up with a databse called test_new which has
test_new_data and test_new_log as logical files. It ahsould then have
test_new_data.mdf and test_new_log.ldf for physical files. I want to do
this using a dump fro the test database.
Does anyone know how to do this ? The reason for doing it this way is that
on one of my servers i created the copy of est databse called test_new. On
that test_new databse i had logical files of test_data and test_log. but
the physical files were called test_new_data.mdf and test_new_log.ldf.
since teh logical file names were the same there seems to be a problem in
which in order for me to access the test_new database, i must give access to
the test database as well as the test_new database to an id. otherwise i
get an access violation.
Any insight into this problem or my proprsed solution would be greatly
appreciated.
Aron
Create a new database test_new, then
when you will restore data from backup over this database
either use MOVE optin in RESTORE DATABASE command in QA
or choose Device names and paths on Options tab in EM
How to restore a database with a new name (Transact-SQL)
http://msdn.microsoft.com/library/de...ackpc_6ng9.asp
Regards.
"Aron E. Tekulsky" wrote:

> I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is that
> on one of my servers i created the copy of est databse called test_new. On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>
>
|||One way to deal with it is to restore the db into a different directory than
the original. The other is to use the WITH MOVE option of RESTORE to get a
new physical name. You can rename the Logical names with ALTER DATABASE
after you restore it.
Andrew J. Kelly SQL MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:uaQkgQiYFHA.2768@.tk2msftngp13.phx.gbl...
>I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh
> same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is
> that
> on one of my servers i created the copy of est databse called test_new.
> On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access
> to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>
|||Thanks for the information. But that does not give the desired result. I
will still have logical file names that are the same as teh original
database. I am looking for a way to have diffrent logical file names as
well.
"SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> Create a new database test_new, then
> when you will restore data from backup over this database
> either use MOVE optin in RESTORE DATABASE command in QA
> or choose Device names and paths on Options tab in EM
> How to restore a database with a new name (Transact-SQL)
>
http://msdn.microsoft.com/library/de...ackpc_6ng9.asp[vbcol=seagreen]
>
> Regards.
> "Aron E. Tekulsky" wrote:
same[vbcol=seagreen]
that[vbcol=seagreen]
On[vbcol=seagreen]
but[vbcol=seagreen]
in[vbcol=seagreen]
access to[vbcol=seagreen]
i[vbcol=seagreen]
|||As Andrew mentioned already you can rename logical name with ALTER DATABASE
after it will restored.
Regards.
"Aron E. Tekulsky" wrote:

> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> http://msdn.microsoft.com/library/de...ackpc_6ng9.asp
> same
> that
> On
> but
> in
> access to
> i
>
>
|||Hi,
For changing the Logical file name see the below command:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
'NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
Thanks
Hari
SQL Server MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:%23BXP2giYFHA.796@.TK2MSFTNGP10.phx.gbl...
> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> http://msdn.microsoft.com/library/de...ackpc_6ng9.asp
> same
> that
> On
> but
> in
> access to
> i
>

changing logical filename

I have a database called test. it has 2 logical files : test_data,
test_log. they are in the following physical files: test_data.mdf,
test_log.ldf.
I make a backup of the database test.
I wish to make a copy of the test database with a different name on teh same
machine. I want to end up with a databse called test_new which has
test_new_data and test_new_log as logical files. It ahsould then have
test_new_data.mdf and test_new_log.ldf for physical files. I want to do
this using a dump fro the test database.
Does anyone know how to do this ? The reason for doing it this way is that
on one of my servers i created the copy of est databse called test_new. On
that test_new databse i had logical files of test_data and test_log. but
the physical files were called test_new_data.mdf and test_new_log.ldf.
since teh logical file names were the same there seems to be a problem in
which in order for me to access the test_new database, i must give access to
the test database as well as the test_new database to an id. otherwise i
get an access violation.
Any insight into this problem or my proprsed solution would be greatly
appreciated.
AronCreate a new database test_new, then
when you will restore data from backup over this database
either use MOVE optin in RESTORE DATABASE command in QA
or choose Device names and paths on Options tab in EM
How to restore a database with a new name (Transact-SQL
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
Regards.
"Aron E. Tekulsky" wrote:
> I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is that
> on one of my servers i created the copy of est databse called test_new. On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>
>|||One way to deal with it is to restore the db into a different directory than
the original. The other is to use the WITH MOVE option of RESTORE to get a
new physical name. You can rename the Logical names with ALTER DATABASE
after you restore it.
--
Andrew J. Kelly SQL MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:uaQkgQiYFHA.2768@.tk2msftngp13.phx.gbl...
>I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh
> same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is
> that
> on one of my servers i created the copy of est databse called test_new.
> On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access
> to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>|||Thanks for the information. But that does not give the desired result. I
will still have logical file names that are the same as teh original
database. I am looking for a way to have diffrent logical file names as
well.
"SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> Create a new database test_new, then
> when you will restore data from backup over this database
> either use MOVE optin in RESTORE DATABASE command in QA
> or choose Device names and paths on Options tab in EM
> How to restore a database with a new name (Transact-SQL)
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
>
> Regards.
> "Aron E. Tekulsky" wrote:
> > I have a database called test. it has 2 logical files : test_data,
> > test_log. they are in the following physical files: test_data.mdf,
> > test_log.ldf.
> > I make a backup of the database test.
> >
> > I wish to make a copy of the test database with a different name on teh
same
> > machine. I want to end up with a databse called test_new which has
> > test_new_data and test_new_log as logical files. It ahsould then have
> > test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> > this using a dump fro the test database.
> >
> > Does anyone know how to do this ? The reason for doing it this way is
that
> > on one of my servers i created the copy of est databse called test_new.
On
> > that test_new databse i had logical files of test_data and test_log.
but
> > the physical files were called test_new_data.mdf and test_new_log.ldf.
> > since teh logical file names were the same there seems to be a problem
in
> > which in order for me to access the test_new database, i must give
access to
> > the test database as well as the test_new database to an id. otherwise
i
> > get an access violation.
> >
> > Any insight into this problem or my proprsed solution would be greatly
> > appreciated.
> > Aron
> >
> >
> >|||As Andrew mentioned already you can rename logical name with ALTER DATABASE
after it will restored.
Regards.
"Aron E. Tekulsky" wrote:
> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> > Create a new database test_new, then
> > when you will restore data from backup over this database
> > either use MOVE optin in RESTORE DATABASE command in QA
> > or choose Device names and paths on Options tab in EM
> >
> > How to restore a database with a new name (Transact-SQL)
> >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
> >
> >
> > Regards.
> >
> > "Aron E. Tekulsky" wrote:
> >
> > > I have a database called test. it has 2 logical files : test_data,
> > > test_log. they are in the following physical files: test_data.mdf,
> > > test_log.ldf.
> > > I make a backup of the database test.
> > >
> > > I wish to make a copy of the test database with a different name on teh
> same
> > > machine. I want to end up with a databse called test_new which has
> > > test_new_data and test_new_log as logical files. It ahsould then have
> > > test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> > > this using a dump fro the test database.
> > >
> > > Does anyone know how to do this ? The reason for doing it this way is
> that
> > > on one of my servers i created the copy of est databse called test_new.
> On
> > > that test_new databse i had logical files of test_data and test_log.
> but
> > > the physical files were called test_new_data.mdf and test_new_log.ldf.
> > > since teh logical file names were the same there seems to be a problem
> in
> > > which in order for me to access the test_new database, i must give
> access to
> > > the test database as well as the test_new database to an id. otherwise
> i
> > > get an access violation.
> > >
> > > Any insight into this problem or my proprsed solution would be greatly
> > > appreciated.
> > > Aron
> > >
> > >
> > >
>
>|||Hi,
For changing the Logical file name see the below command:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME ='NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
Thanks
Hari
SQL Server MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:%23BXP2giYFHA.796@.TK2MSFTNGP10.phx.gbl...
> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
>> Create a new database test_new, then
>> when you will restore data from backup over this database
>> either use MOVE optin in RESTORE DATABASE command in QA
>> or choose Device names and paths on Options tab in EM
>> How to restore a database with a new name (Transact-SQL)
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
>>
>> Regards.
>> "Aron E. Tekulsky" wrote:
>> > I have a database called test. it has 2 logical files : test_data,
>> > test_log. they are in the following physical files: test_data.mdf,
>> > test_log.ldf.
>> > I make a backup of the database test.
>> >
>> > I wish to make a copy of the test database with a different name on teh
> same
>> > machine. I want to end up with a databse called test_new which has
>> > test_new_data and test_new_log as logical files. It ahsould then have
>> > test_new_data.mdf and test_new_log.ldf for physical files. I want to
>> > do
>> > this using a dump fro the test database.
>> >
>> > Does anyone know how to do this ? The reason for doing it this way is
> that
>> > on one of my servers i created the copy of est databse called
>> > test_new.
> On
>> > that test_new databse i had logical files of test_data and test_log.
> but
>> > the physical files were called test_new_data.mdf and test_new_log.ldf.
>> > since teh logical file names were the same there seems to be a problem
> in
>> > which in order for me to access the test_new database, i must give
> access to
>> > the test database as well as the test_new database to an id. otherwise
> i
>> > get an access violation.
>> >
>> > Any insight into this problem or my proprsed solution would be greatly
>> > appreciated.
>> > Aron
>> >
>> >
>> >
>

changing logical filename

I have a database called test. it has 2 logical files : test_data,
test_log. they are in the following physical files: test_data.mdf,
test_log.ldf.
I make a backup of the database test.
I wish to make a copy of the test database with a different name on teh same
machine. I want to end up with a databse called test_new which has
test_new_data and test_new_log as logical files. It ahsould then have
test_new_data.mdf and test_new_log.ldf for physical files. I want to do
this using a dump fro the test database.
Does anyone know how to do this ? The reason for doing it this way is that
on one of my servers i created the copy of est databse called test_new. On
that test_new databse i had logical files of test_data and test_log. but
the physical files were called test_new_data.mdf and test_new_log.ldf.
since teh logical file names were the same there seems to be a problem in
which in order for me to access the test_new database, i must give access to
the test database as well as the test_new database to an id. otherwise i
get an access violation.
Any insight into this problem or my proprsed solution would be greatly
appreciated.
AronCreate a new database test_new, then
when you will restore data from backup over this database
either use MOVE optin in RESTORE DATABASE command in QA
or choose Device names and paths on Options tab in EM
How to restore a database with a new name (Transact-SQL)
kpc_6ng9.asp" target="_blank">http://msdn.microsoft.com/library/d...>
kpc_6ng9.asp
Regards.
"Aron E. Tekulsky" wrote:

> I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh sa
me
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is tha
t
> on one of my servers i created the copy of est databse called test_new. O
n
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access
to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>
>|||One way to deal with it is to restore the db into a different directory than
the original. The other is to use the WITH MOVE option of RESTORE to get a
new physical name. You can rename the Logical names with ALTER DATABASE
after you restore it.
Andrew J. Kelly SQL MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:uaQkgQiYFHA.2768@.tk2msftngp13.phx.gbl...
>I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh
> same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is
> that
> on one of my servers i created the copy of est databse called test_new.
> On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access
> to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>|||Thanks for the information. But that does not give the desired result. I
will still have logical file names that are the same as teh original
database. I am looking for a way to have diffrent logical file names as
well.
"SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> Create a new database test_new, then
> when you will restore data from backup over this database
> either use MOVE optin in RESTORE DATABASE command in QA
> or choose Device names and paths on Options tab in EM
> How to restore a database with a new name (Transact-SQL)
>
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp[/ur
l][vbcol=seagreen]
>
> Regards.
> "Aron E. Tekulsky" wrote:
>
same[vbcol=seagreen]
that[vbcol=seagreen]
On[vbcol=seagreen]
but[vbcol=seagreen]
in[vbcol=seagreen]
access to[vbcol=seagreen]
i[vbcol=seagreen]|||As Andrew mentioned already you can rename logical name with ALTER DATABASE
after it will restored.
Regards.
"Aron E. Tekulsky" wrote:

> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> ackpc_6ng9.asp" target="_blank">http://msdn.microsoft.com/library/d...
ackpc_6ng9.asp
> same
> that
> On
> but
> in
> access to
> i
>
>|||Hi,
For changing the Logical file name see the below command:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
'NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
Thanks
Hari
SQL Server MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:%23BXP2giYFHA.796@.TK2MSFTNGP10.phx.gbl...
> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> ackpc_6ng9.asp" target="_blank">http://msdn.microsoft.com/library/d...
ackpc_6ng9.asp
> same
> that
> On
> but
> in
> access to
> i
>

Sunday, February 19, 2012

changing in sysaltfiles doesnt work


HI All,

I have started sqlserver in single user mode and changed filename in sysaltfiles for tempdb too point to new location. While starting sqlserver in normal it points to the old path and doesnt get updated with the new path.

1.)is there any systable still to be altered?
2.) i have even tried alter database, doesnt work.
3.)The master files have been taken from server1 (where tempdb points to d:\data) to server2 ( where i need to point tempdb to point E:\mssql\data). i can detach and attach msdb and model successfully, but in the case of tempdb, i cant either alter sysaltfiles or detach and attach tempdb to new path.

, too tired in trying all the possiblities... Is there any possibility to update tempdb to point to new path?

These should work and take effect after a restart.

ALTER DATABASE tempdb MODIFY FILE (NAME='tempdev', FILENAME='e:\mssql\data\tempdb.mdf')

GO

ALTER DATABASE tempdb MODIFY FILE (NAME='templog', FILENAME='e:\mssql\data\tempdb.ldf')

GO

SHUTDOWN
GO

What version of SQL Server are you running?

|||Hi Peter,

If tempdb exists on D:\data drive then above script is working fine. Here in my case no D:\data exists, ive copied master from another server and i need this to point to E: drive. I have tried the above and got a error as

tempdb not found
connection broken

hence i cant change the tempdb path alone.

Thx|||

Could you please post what version of SQL Server are you running? Did you run the statment from master? What is in the error log?

-Sue

|||

You can start the server with the -f parameter to get a minimal sized tempdb in the same directory as master, then move it where you want.

i.e., for the default instance, you would do:

net start mssqserver /f

changing in sysaltfiles doesnt work


HI All,

I have started sqlserver in single user mode and changed filename in sysaltfiles for tempdb too point to new location. While starting sqlserver in normal it points to the old path and doesnt get updated with the new path.

1.)is there any systable still to be altered?
2.) i have even tried alter database, doesnt work.
3.)The master files have been taken from server1 (where tempdb points to d:\data) to server2 ( where i need to point tempdb to point E:\mssql\data). i can detach and attach msdb and model successfully, but in the case of tempdb, i cant either alter sysaltfiles or detach and attach tempdb to new path.

, too tired in trying all the possiblities... Is there any possibility to update tempdb to point to new path?

These should work and take effect after a restart.

ALTER DATABASE tempdb MODIFY FILE (NAME='tempdev', FILENAME='e:\mssql\data\tempdb.mdf')

GO

ALTER DATABASE tempdb MODIFY FILE (NAME='templog', FILENAME='e:\mssql\data\tempdb.ldf')

GO

SHUTDOWN
GO

What version of SQL Server are you running?

|||Hi Peter,

If tempdb exists on D:\data drive then above script is working fine. Here in my case no D:\data exists, ive copied master from another server and i need this to point to E: drive. I have tried the above and got a error as

tempdb not found
connection broken

hence i cant change the tempdb path alone.

Thx|||

Could you please post what version of SQL Server are you running? Did you run the statment from master? What is in the error log?

-Sue

|||

You can start the server with the -f parameter to get a minimal sized tempdb in the same directory as master, then move it where you want.

i.e., for the default instance, you would do:

net start mssqserver /f

Thursday, February 16, 2012

changing filename of PDF-Report

Hello,
we use the Report Services to generate bills from our orders. Therefor a
url with all the report parameters is created and send to the internet
explorer which displays the report with the pdf plugin (standard).
Our problem is that all reports have the same name (for example bill.pdf).
Is it possible to send a paramter (maybe a system one) which the report
server is using and named the file like it?
For example we give in the url &reportname=bill001 and then the file
generated names bill001.pdf?
Thanks for all answers.Hi Thomas,
We are using RS to generate pdf files, but we are just streaming directly
the resulting pdf to the client browser.
So, the result of the Render method of the ReportingServices object (which
is of type "array of bytes" ) gets passed to the browser using
Response.BinaryWrite(result).
I think you could use something to write the array of bytes to a pdf file -
and at this step you can choose the name you want for this pdf file.
Example:
Dim fs As New System.IO.FileStream("c:\customers\BILL001.pdf",
System.IO.FileMode.CreateNew)
' Create the writer for data.
Dim w As New System.io.BinaryWriter(fs)
' Write data to Test.data.
Dim b() As Byte
b = rs.Render(...parameters for report rendering)
w.Write(b)
w.Close()
fs.Close()
Hope this helps,
Andrei.
"Thomas Weiler" <Thomas.Weiler@.bigfoot.de> wrote in message
news:ec8HJOGPFHA.1088@.TK2MSFTNGP14.phx.gbl...
> Hello,
> we use the Report Services to generate bills from our orders. Therefor a
> url with all the report parameters is created and send to the internet
> explorer which displays the report with the pdf plugin (standard).
> Our problem is that all reports have the same name (for example bill.pdf).
> Is it possible to send a paramter (maybe a system one) which the report
> server is using and named the file like it?
> For example we give in the url &reportname=bill001 and then the file
> generated names bill001.pdf?
> Thanks for all answers.