If you encounter a “Filename too long” error in Windows, it means that the file or folder name you are trying to use is longer than the maximum allowed length for a file name in the Windows operating system. The maximum length for a file name in Windows is 260 characters.
To resolve this issue, you can try one of the following solutions:
- Shorten the file or folder name: Try to rename the file or folder to a shorter name that is within the maximum length limit.
- Use a shorter path: Move the file or folder to a location with a shorter path. This can help reduce the overall length of the file or folder name.
- Use a third-party tool: There are various third-party tools available that can help you manage long file paths in Windows. For example, Long Path Tool is a popular tool that can handle file names and paths that are too long for Windows.
- Enable long path support: If you are using Windows 10 version 1607 or later, you can enable long path support by modifying the Group Policy or Registry settings. This will allow you to use file names and paths longer than 260 characters. However, this method is not recommended as it can cause compatibility issues with older applications.
This is a simple script that makes use of ASM and classic duplicate, although I guess it’s possible to use the standby DB for a duplicate from active database.
You can launch it everyday to align your test env at a point in time.
if [ $USER != 'oracle' ] ; then
echo "need to be oracle"
srvctl stop database -d test -o immediate
## this is supposed to be a script that erase your ASM from your old test dbfiles:
## it's as simple as running with the CORRECT ENV:
## asmcmd rm -rf \
ssh grid@testsrv /shared/refresh_test/remove_test_files.sh
sqlplus / as sysdba < <EOF
set echo on
alter system set cluster_database=false scope=spfile;
connect target sys/mystrongpassword@stdby
connect auxiliary /
duplicate database to 'test' until time "trunc(sysdate)+6/24";
sqlplus / as sysdba <<EOF
set echo on
alter system set cluster_database=true scope=spfile;
alter database noarchivelog;
srvctl start database -d test