Showing posts with label folder. Show all posts
Showing posts with label folder. 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

Sunday, February 19, 2012

Changing HOME folder per user

I am wondering how I could do the following -

Right now the default folder is Home, what if I have two users User1 and User2, my folder structure is the following -
Home/User1
Home/User2

I want each user to only have access to their folder. That is easy to do.

Once both users have proper access to their folders they still don't have access to Home folder. In Report Builder when I do 'open file' it defaults to Home folder so I get an error. How can I specify the home folder to be User1 for that user and User2 for the second user? I know I can give them both browsing permissions to Home but it's not very elegant.

There must be a way to programmatically change the folder as soon as proper user logs in. Anyone knows how to do that?

Thanks.
Anybody?

How about this, is there a way to do custom folder access, for example a user who has a proper flag set in a custom DB can only have access to one set of models, another user to another and so on. None of this is in RS DB except for one big organizational user who has access to everything. I want to be able to restrict access on the fly so once the user logs in using custom DB credentials they can only have access to some things and not the others.

Thanks
|||

There's no way to change the home folder programmatically. What you can do is given everyone browser permission on the home folder and then content manager or publisher permission on their home/user1 folder.

Not sure if you're aware of the My Reports feature that essentially lets you not have to manage the creation of User1..N folders your self. Everyone would see a folder called "My Reports".

-Lukasz

|||Thanks for your answer. The solution you proposed is what I'm doing right now.

As to My Reports, I am trying to get away from RS users/roles completely. We have all this defined in a custom DB and it's a real pain for me to make all that security work with RS.

Right now I'm trying to figure out how to get a folder name from CheckAccess so I can see in my DB if I should allow access to this folder from this user. Not sure if that's possible at all. Ideally my RS would only have one user (main RS admin) and the rest of the users/roles/permissions would be taken from a custom DB and inside my authentication extension I would give out permissions depending on that.
|||You can build your custom web that integrates your custom security (DB) with that you will be 100% positive that you are listing / giving the right access to the users.|||

Paul.G. wrote:

You can build your custom web that integrates your custom security (DB) with that you will be 100% positive that you are listing / giving the right access to the users.

I am not even using the web at this point. All the client is given is a link to Report Builder. There is a lot of underlying stuff other than the website that I have to deal with, that's the issue.
|||

RS does not expose the folder/path of the item being accessed to the security extension. We don't really support this scenario very well, but it is possible with enough determination :-).

The key thing is that the security descriptor stored with a given item in RS is entirely in the control of the authorization extension. The authorization extension builds the ACL, sets the group names, etc. You could try using it to store some relation information associated with the item. Then you'd use this information in your checkaccess method implementation to go look up the corresponding values in your own database.

The consequence of this approach is that assigning role based security in the RS UI/tools is likely to result in mismatches with your database. You'll want to write your own code to manage the security rights and not allow users to change it on the RS side.

Hope that helps,

-Lukasz

|||So you are saying that somehow I can relate acl info to something in my database to add more information to every entry while creating a descriptor?

That sounds interesting. Is there some kind of a unique key I can tie this extra info to?

Thanks very much for the idea.

Code Snippet

public byte[] CreateSecurityDescriptor(
AceCollection acl,
SecurityItemType itemType,
out string stringSecDesc)
{
BinaryFormatter bf = new BinaryFormatter();
using (MemoryStream result = new MemoryStream())
{
bf.Serialize(result, acl);
stringSecDesc = null;
return result.GetBuffer();
}
}


|||Why doesn't CreateSecurityDescriptor execute on folder creation? Shouldn't the descriptor be created during that time?

And once again, is there any unique key (I guess it would be in acl) that I can tie custom stuff to (like have it as a uuid in my db which corresponds to whatever extra security I create)?
|||

Not sure of the specific reason, but the default is to inherit from parent.

Unique IDs - you should assigne a unique ID in your own database of items, for example you might use the rowguid. This will make it *much* eaiser to relate items in SRS to your database. It will also mean that the first step in item creation in SRS is to create the item in your own database. Natural consequences are 1) you need to build custom publishing/management interfaces in your application and 2) you'll need to ensure your applications service account has sufficient permission in RS to at least craete all items and 3) you don't want users publishing reports directly against SRS - this would invalidate your security extension model.

Hope that helps,

-Lukasz

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 flat file connection file name property

Hi,

I have a task to traverse a folder of CSV files of same format and then populate into one sql server table.

Is there a way where I can change the source CSV file name runtime using FOR EACH loop container for flat file connection manager ?

any help would be much appriciated.

Thanks,

Furrukh Baig

Yes. By using package expressions. There is an example in the SSIS tutorials that I think does exactly what you want to do assuming all files are in the same directory.|||Thanks mate... you are star ...|||

I'm also trying to do the same thing, except that each folder has a number of different csv files. Would appreciate if someone could give me a link of the sample (as mentioned in the previous post) and whether it's better to have different flat file source for each type of csv file format or should I just use 1 flat file source.

I've tried using 1 flat file source but the number of columns are different for each files and the number of columns in the flat file source isn't dynamic (I've to prespecify it first).

|||I'm assuming you're talking about the foreach loop container in the tutorial (ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/sqltut9/html/88a973cc-0f23-4ecf-adb6-5b06279c2df6.htm) Can you use a similar concept to loop thru xml files? I have an xml source, 2 sorts and a merge-join. Whenever I change the input file, I need to open my sorts and click ok. How will that work if I need to iterate thru a directory of files?

Changing flat file connection file name property

Hi,

I have a task to traverse a folder of CSV files of same format and then populate into one sql server table.

Is there a way where I can change the source CSV file name runtime using FOR EACH loop container for flat file connection manager ?

any help would be much appriciated.

Thanks,

Furrukh Baig

Yes. By using package expressions. There is an example in the SSIS tutorials that I think does exactly what you want to do assuming all files are in the same directory.|||Thanks mate... you are star ...|||

I'm also trying to do the same thing, except that each folder has a number of different csv files. Would appreciate if someone could give me a link of the sample (as mentioned in the previous post) and whether it's better to have different flat file source for each type of csv file format or should I just use 1 flat file source.

I've tried using 1 flat file source but the number of columns are different for each files and the number of columns in the flat file source isn't dynamic (I've to prespecify it first).

|||I'm assuming you're talking about the foreach loop container in the tutorial (ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/sqltut9/html/88a973cc-0f23-4ecf-adb6-5b06279c2df6.htm) Can you use a similar concept to loop thru xml files? I have an xml source, 2 sorts and a merge-join. Whenever I change the input file, I need to open my sorts and click ok. How will that work if I need to iterate thru a directory of files?

Tuesday, February 14, 2012

Changing default location for FTDATA folder

When I restore a database it will place the catalogs in the default location
"C:\Program Files\Microsoft SQL Server\MSSQL\FTDATA", how can I change this
default location so that when I restore a new database, the full text
catalogs are stored elsewhere ?
Changing the location of the catalog is only an option in SQL 2005.
Basically the full text catalog is in a different file group so you have an
option of exactly where you want to park it.
For SQL 200 I suggest you follow the instructions in
http://support.microsoft.com/default...b;en-us;240867
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"GMG" <nospam@.nospam.com> wrote in message
news:evgizv87FHA.3048@.TK2MSFTNGP10.phx.gbl...
> When I restore a database it will place the catalogs in the default
> location
> "C:\Program Files\Microsoft SQL Server\MSSQL\FTDATA", how can I change
> this
> default location so that when I restore a new database, the full text
> catalogs are stored elsewhere ?
>
|||I am aware of this document and have found it very complicated and with a
lot of registry updates which makes me uneasy. I have finally opted for
dropping the catalog and then recreating it in a different location,
followed by full population.
Despite this when the documentation for sp_help_fulltext_catalogs states:
"NULL indicates the default directory determined during installation", my
question is how do I change this default directory ?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:equvR897FHA.3224@.TK2MSFTNGP09.phx.gbl...
> Changing the location of the catalog is only an option in SQL 2005.
> Basically the full text catalog is in a different file group so you have
an
> option of exactly where you want to park it.
> For SQL 200 I suggest you follow the instructions in
> http://support.microsoft.com/default...b;en-us;240867
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "GMG" <nospam@.nospam.com> wrote in message
> news:evgizv87FHA.3048@.TK2MSFTNGP10.phx.gbl...
>
|||Try this key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\SQL2000\MSSQLServer
And set it using this entry FullTextDefaultPath
Note that my instance name is SQL2000, so it could be
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer for you
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"GMG" <nospam@.nospam.com> wrote in message
news:O4vaSO%237FHA.3592@.TK2MSFTNGP12.phx.gbl...
>I am aware of this document and have found it very complicated and with a
> lot of registry updates which makes me uneasy. I have finally opted for
> dropping the catalog and then recreating it in a different location,
> followed by full population.
> Despite this when the documentation for sp_help_fulltext_catalogs states:
> "NULL indicates the default directory determined during installation", my
> question is how do I change this default directory ?
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:equvR897FHA.3224@.TK2MSFTNGP09.phx.gbl...
> an
>

Changing default folder for saving query text

When I save a query (not a query result) in SSMS, the default root folder is
My Documents\SQL Server Management Studio\Projects
Is there any way to change this default and make it persist beyond the current session?

Hello,

Yes it is possible for you to set the default folder to your prefered location. Open Microsoft SQL Server 2005 Management Studio.

From the Menu select Tools -> Options. Select Query Results noted and enter your prefered location where you want to save your queries in the "Default locations for saving query results" text box.

Thanks

|||Yes, I'm well aware that this setting is available for query results, but I'm asking about the query text itself - how do I change the default save path for the query text?

Friday, February 10, 2012

Changing Data Folders In a clustered environment

All,
I need to move the OLAP data folder across disks. The problem is that we
are running on a cluster environment, and I cannot see how to change the Dat
a
Folder setting on the general tab of the properties dialog, and its greyed
out.
Is it simply a matter of changing this on the Cluster resources to point at
the new data folder or do I have to move anything else?
TIA
JasonThat and moving the data.
As this is a production system, and the whole point of a cluster is
high-availability, I recommend that you open up a PSS case and work with
them directly to get the right sequences of events. It would be easy to mess
things up and have the whole AS service go down.
--
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jason Lees" <JasonLees@.discussions.microsoft.com> wrote in message
news:E373CF5F-A126-49B5-ACFA-E4FBF57A95AA@.microsoft.com...
> All,
> I need to move the OLAP data folder across disks. The problem is that we
> are running on a cluster environment, and I cannot see how to change the
Data
> Folder setting on the general tab of the properties dialog, and its greyed
> out.
> Is it simply a matter of changing this on the Cluster resources to point
at
> the new data folder or do I have to move anything else?
> TIA
> Jason
>
>

Changing Data Folders In a clustered environment

All,
I need to move the OLAP data folder across disks. The problem is that we
are running on a cluster environment, and I cannot see how to change the Data
Folder setting on the general tab of the properties dialog, and its greyed
out.
Is it simply a matter of changing this on the Cluster resources to point at
the new data folder or do I have to move anything else?
TIA
Jason
That and moving the data.
As this is a production system, and the whole point of a cluster is
high-availability, I recommend that you open up a PSS case and work with
them directly to get the right sequences of events. It would be easy to mess
things up and have the whole AS service go down.
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jason Lees" <JasonLees@.discussions.microsoft.com> wrote in message
news:E373CF5F-A126-49B5-ACFA-E4FBF57A95AA@.microsoft.com...
> All,
> I need to move the OLAP data folder across disks. The problem is that we
> are running on a cluster environment, and I cannot see how to change the
Data
> Folder setting on the general tab of the properties dialog, and its greyed
> out.
> Is it simply a matter of changing this on the Cluster resources to point
at
> the new data folder or do I have to move anything else?
> TIA
> Jason
>
>

Changing Data and Backup folder properties in SSAS

Hi All -

Can we change the data and backup folder location from SSAS properties? Can it have any kind of adverse impact ?

Thanks for help in advance.

Hi,

Changing the backup location is not an issue, just remember to create the new directory folder otherwise it doesn't actually back it up. Would assume the same is true for the data folder, but I haven't tried this.

Cheers

Matt